[CMake] How to disable the configuration test

transgohan at free.fr transgohan at free.fr
Mon Feb 17 11:16:42 EST 2014


Hello,

i have a very specific toolchain that absolutly can't work like a GCC.
Thanks to that i can't compile the test project at configuration (or maybe after a lot of work, time i don't have).

I change Compiler Constant in my CMakeLists.txt and when i do that i have an infinite loop of the configuration's detection...
Example :
-- The C compiler identification is GNU
-- Check for working C compiler: /system_global/local/bin/gcc
-- Check for working C compiler: /system_global/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found assembler: /usr/ccs/bin/as
-- Loaded CMakeASMInformation - ASM support is still experimental, please report issues
-- Loaded CMakeASMInformation - ASM support is still experimental, please report issues
-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= /system_global/local/bin/gcc
CMAKE_ASM_COMPILER= /usr/ccs/bin/as

-- The C compiler identification is GNU
-- Check for working C compiler: /system_global/local/bin/gcc
-- Check for working C compiler: /system_global/local/bin/gcc -- works
-- Detecting C compiler ABI info
... ect ...

I use Cmake 2.6 on Solaris (can't change, latest version, can't install anything...).

How can i disable checks ? Or solve this ? (because it's like i need to disable cache to solve it when i read that, that i absolutly don't want)
I had read about set a line like :
project(name_of_my_project NONE) # none to disable the test
But it works only (i mean no infinite loop) when i don't have add_subdirectory().

Best Regards,
xTG.


More information about the CMake mailing list