[cmake-developers] Depends information in buildsystem files

Brad King brad.king at kitware.com
Mon Feb 11 09:26:17 EST 2013


On 02/09/2013 06:24 AM, Stephen Kelly wrote:
> The approach that I took was to not expose the feature through the cmake 
> language, and instead make the use of CMakeExpandImportedTargets obsolete, 
> and make try_compile directly handle CMAKE_REQUIRED_LIBRARIES containing 
> IMPORTED targets. (This also means that try_compile will compute the link 
> information for the targets correctly now - the macro didn't do that).
> 
> It's in the updated try_compile_targets branch. Will I merge it to next?

The branch looks like a great start!  However, I do not think looking for

 -DLINK_LIBRARIES:STRING=

as a literal will be reliable.  There is no reason projects have to include
the :STRING part.  I'd rather this be made a first-class keyword argument
to try_compile or something like that.  It could also be useful for the
full-project form of the command in addition to the single-source form.

-Brad



More information about the cmake-developers mailing list