42bbf1307a
The languages used in compiling STATIC libraries need to be propagated to dependents regardless of the settings of INTERFACE_LINK_LIBRARIES or CMP0022. They are independent of the libraries in the link interface. Prior to commit v2.8.12~192^2~2 (Introduce the INTERFACE_LINK_LIBRARIES property, 2013-06-04) the cmTarget::ComputeLinkInterface code path for "explicitLibraries" could never be taken for STATIC libraries, so the logic to propagate languages existed only in the non-explicitLibraries code path. After that commit, INTERFACE_LINK_LIBRARIES could be set for STATIC libraries to cause the "explicitLibraries" code path to be taken. The commit also left the old non-explicitLibraries code path conditional on CMP0022 not being set to NEW. Thus link language propagation was left missing from two cases by that commit. The explicitLibraries code path was fixed to propagate languages by commit v2.8.12~149^2~1 (cmTarget: Fix iface libraries and languages for static libraries, 2013-07-26). However, the non-explicitLibraries case was never taught to propagate languages when CMP0022 is set to NEW. Fix that now. Factor the logic to propagate link languages out of the link interface libraries conditions so that it always occurs. Update Tests/Fortran to set CMP0022 to NEW to test this case (because the test passes only if link language propagation works). |
||
---|---|---|
.. | ||
Executable | ||
External | ||
Library | ||
in_interface | ||
include | ||
CMakeLists.txt | ||
foo.f | ||
hello.f | ||
mainc.c | ||
maincxx.c | ||
myc.c | ||
mycxx.cxx | ||
mysub.f | ||
test_module_implementation.f90 | ||
test_module_interface.f90 | ||
test_module_main.f90 | ||
test_preprocess.F90 | ||
test_use_in_comment_fixedform.f | ||
test_use_in_comment_freeform.f90 | ||
testf.f | ||
world.f | ||
world_gnu.def | ||
world_icl.def |