[cmake-developers] compile_feature test results

Stephen Kelly steveire at gmail.com
Tue Nov 19 12:53:31 EST 2013


Brad King wrote:

> You can take an approach similar to CMAKE_DETERMINE_COMPILER_ABI,
> perhaps called CMAKE_DETERMINE_COMPILE_FEATURES, in order to do the
> try_compile calls necessary to detect available features.  We should
> need just one such call per language, just as with the ABI.

I've implemented this and it is superior in several ways - There's less code 
duplication, more cohesion of related code, fewer area to expand when adding 
new features, and a log with all relevant information. 

As try_compile is much slower, I retained the more simple compile-only 
version for generators which can handle it.

Thanks,

Steve.





More information about the cmake-developers mailing list