[CMake] ADD_COMPILE_TEST macro

Alexander Neundorf a.neundorf-work at gmx.net
Mon Feb 11 12:35:36 EST 2008


On Monday 11 February 2008, Mathieu Malaterre wrote:
> Hi there,
>
>   I would like to know if anyone has written a ADD_COMPILE_TEST macro
> for cmake. Basically I would like to check that some template
> instantiation should not compile, while other should. I tried quickly
> doing cmake -P + TRY_COMPILE but I am getting an error :
>
>    Command TRY_COMPILE not scriptable
>
>   Code can be found here:

Maybe you want CHECK_CXX_SOURCE_COMPILES ? It comes with cmake.

Alex


More information about the CMake mailing list