[CMake] Can cmake do configure tests?

Michael Wild themiwi at gmail.com
Thu Aug 6 04:12:32 EDT 2009


On 6. Aug, 2009, at 3:03, Joseph Garvin wrote:

> One of the cool features of autotools is configure tests -- actually
> invoking the compiler on a small sample program and seeing if it's
> successful. Does CMake do this or do you have to depend on #ifdef
> SOME_PLATFORM blocks to enable/disable features?
>

Yep, definitely possible. You can check for the availability of  
functions, structs, symbols, libraries, headers etc. If that is not  
enough, you can try to compile your own test code, and even try to run  
it (although that has its problems when cross-compiling)


Michael



More information about the CMake mailing list