diff options
author | Brad King <brad.king@kitware.com> | 2014-05-19 13:17:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-05-19 13:17:38 (GMT) |
commit | 8c420ad3145306ff3606e9697fe2421a7bacfc64 (patch) | |
tree | 5fe16ba163b77631791e3559104cf4d36d0693cf | |
parent | e07f406439997e08fd4c8bf8af4894ae39a6d449 (diff) | |
parent | 40b9cd0f614fdbc53f9048f18f774a3d06dedf00 (diff) | |
download | CMake-8c420ad3145306ff3606e9697fe2421a7bacfc64.zip CMake-8c420ad3145306ff3606e9697fe2421a7bacfc64.tar.gz CMake-8c420ad3145306ff3606e9697fe2421a7bacfc64.tar.bz2 |
Merge branch 'backport-fix-CMP0022-language-propagation' into release
-rw-r--r-- | Source/cmTarget.cxx | 20 | ||||
-rw-r--r-- | Tests/Fortran/CMakeLists.txt | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 219560e..63c5908 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -5515,11 +5515,6 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, } } } - if(this->LinkLanguagePropagatesToDependents()) - { - // Targets using this archive need its language runtime libraries. - iface.Languages = impl->Languages; - } } } } @@ -5536,11 +5531,6 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, iface.ImplementationIsInterface = true; iface.Libraries = impl->Libraries; iface.WrongConfigLibraries = impl->WrongConfigLibraries; - if(this->LinkLanguagePropagatesToDependents()) - { - // Targets using this archive need its language runtime libraries. - iface.Languages = impl->Languages; - } if(this->PolicyStatusCMP0022 == cmPolicies::WARN && !this->Internal->PolicyWarnedCMP0022) @@ -5607,6 +5597,16 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, } } + if(this->LinkLanguagePropagatesToDependents()) + { + // Targets using this archive need its language runtime libraries. + if(LinkImplementation const* impl = + this->GetLinkImplementation(config, headTarget)) + { + iface.Languages = impl->Languages; + } + } + if(this->GetType() == cmTarget::STATIC_LIBRARY) { // How many repetitions are needed if this library has cyclic diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index adc4308..7918129 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.0) project(testf C CXX Fortran) if(NOT DEFINED CMAKE_TEST_MAKEPROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio") set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}") |