[cmake-developers] Depends information in buildsystem files
Stephen Kelly
steveire at gmail.com
Mon Feb 11 14:18:47 EST 2013
Brad King wrote:
> On 02/11/2013 01:34 PM, Stephen Kelly wrote:
>> I also considered splitting the targets from the non-targets in the
>> implementation of the macros. That would mean changing the order of the
>> content of target_link_libraries calls generated by cmCoreTryCompile
>> because we would have two lists send from the macros to try_compile (one
>> of libraries, the other of targets). That would maybe need a policy.
>
> I don't think we need to split anything. The macros can pass everything
> in ${CMAKE_REQUIRED_LIBRARIES} to -DLINK_LIBRARIES and take the targets
> out of it to pass to a TARGETS argument for transformation. The latter
> would handle the export/import and the former would work as it does now
> but without CMakeExpandImportedTargets.
I see.
Would cmCoreTryCompile also generate a target_link_libraries line for the
targets after the existing target_link_libraries line?
Otherwise using the raw try_compile would not do what you expect:
try_compile( ... TARGETS foo ...)
# Generates an imported target for foo, but does not link to it.
What effect would the TARGETS parameter have in 'full project' mode?
Thanks,
Steve.
More information about the cmake-developers
mailing list