[cmake-developers] compile_feature test results

Brad King brad.king at kitware.com
Tue Nov 19 13:00:43 EST 2013


On 11/19/2013 12:53 PM, Stephen Kelly wrote:
> 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. 

Great!

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

Let's not optimize prematurely.  It is much simpler to have a single
approach that works everywhere.  The direct-compile approach requires
extra/duplicate infrastructure like _CMAKE_${lang}_CREATE_OBJECT_FILE
to be maintained and it may not exactly match how the project will be
generated (where the try_compile approach does).

-Brad



More information about the cmake-developers mailing list