summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmTarget.cxx14
-rw-r--r--Tests/Fortran/CMakeLists.txt2
2 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 3f2ae9e..a243de5 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6481,11 +6481,6 @@ void cmTargetInternals::ComputeLinkInterface(cmTarget const* thisTarget,
}
}
}
- if(thisTarget->LinkLanguagePropagatesToDependents())
- {
- // Targets using this archive need its language runtime libraries.
- iface.Languages = impl->Languages;
- }
}
}
}
@@ -6497,9 +6492,14 @@ void cmTargetInternals::ComputeLinkInterface(cmTarget const* thisTarget,
impl = thisTarget->GetLinkImplementation(config, headTarget);
iface.ImplementationIsInterface = true;
iface.WrongConfigLibraries = impl->WrongConfigLibraries;
- if(thisTarget->LinkLanguagePropagatesToDependents())
+ }
+
+ if(thisTarget->LinkLanguagePropagatesToDependents())
+ {
+ // Targets using this archive need its language runtime libraries.
+ if(cmTarget::LinkImplementation const* impl =
+ thisTarget->GetLinkImplementation(config, headTarget))
{
- // Targets using this archive need its language runtime libraries.
iface.Languages = impl->Languages;
}
}
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index bf6d629..ef3b317 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_NESTED_MAKE_PROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
set(CMake_TEST_NESTED_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM}")