On 11/02/2015 04:19 PM, Chris Bieneman wrote: >> What we need is for try_compile to learn to check for some global >> option to be set by a toolchain or platform information module that >> tells it there is no linker. Then try_compile could handle this >> case by using add_library(... STATIC …). > > That would be exactly what we need.
Okay. I don't know when I'll get a chance to work on this myself. If you want to try it then look at the code here: https://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmCoreTryCompile.cxx;hb=v3.3.2#l477 Instead of hard-coding add_executable one could check this->Makefile->IsOn("...") to see if some boolean variable has been set (typically by the toolchain file). Can you suggest a name for the option? Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers