[cmake-developers] Depends information in buildsystem files
Brad King
brad.king at kitware.com
Mon Feb 11 14:45:20 EST 2013
On 02/11/2013 02:38 PM, Stephen Kelly wrote:
> How would that be done in 'full project' mode? The best we can do is
> generate a file with the imported targets (my branch already does that
> much), and allow the user to include() it, right? And we'd generate that
> file directly in the binary_dir the user specified in the try_compile call?
> And the file would be called something generic so that the user does this?
>
> include("${CMAKE_CURRENT_BINARY_DIR}/tryCompileTargets.cmake")
>
> in their own 'full project' code?
Yes, though one of the options to try_compile could be TARGETS_FILE
to say where to put the file.
> try_compile(TCRESULT
> "${CMAKE_CURRENT_BINARY_DIR}/tcresultbindir"
> "tcresult_src.cpp"
> TARGETS foo bar
> LINK_LIBRARIES foo bar
> )
No, for the source form the LINK_LIBRARIES would automatically
handle targets. I just don't want to try doing it with the
-DLINK_LIBRARIES= options.
>> They would replace the current
>> -D convention which pre-dated keyword arguments in CMake.
>
> I see more policies coming :). This is future work anyway.
No, we would just support the keywords for projects that use them.
If used then the -D equivalents would be disallowed or ignored.
>> The outer
>> try_compile call would handle target exports for LINK_LIBRARIES.
>
> What do you mean 'outer'?
s/outer//
-Brad
More information about the cmake-developers
mailing list