[cmake-developers] Using CMake to bootstrap clang builtins
Brad King
brad.king at kitware.com
Wed Nov 11 16:13:18 EST 2015
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
More information about the cmake-developers
mailing list