summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-06-12 16:44:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-06-12 16:45:15 (GMT)
commit1af08229a7b871ea592cdf6d2aa41e47787eb713 (patch)
tree070f0519937bdd64a04d2d7a74ab0323b9fe82fc /Source
parent00132e60a6b85d12a6614d773e8d0d86810ede76 (diff)
parenta982916304fc7a66edb7a587144cb192f13ef6be (diff)
downloadCMake-1af08229a7b871ea592cdf6d2aa41e47787eb713.zip
CMake-1af08229a7b871ea592cdf6d2aa41e47787eb713.tar.gz
CMake-1af08229a7b871ea592cdf6d2aa41e47787eb713.tar.bz2
Merge topic 'language-dependent-linker-flags'
a982916304 Support per-language library link flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3429
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index fe5c8af..3abf2dd 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1444,10 +1444,23 @@ void cmLocalGenerator::OutputLinkLibraries(
std::string linkLanguage = cli.GetLinkLanguage();
- const std::string& libPathFlag =
- this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG");
- const std::string& libPathTerminator =
- this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR");
+ std::string libPathFlag;
+ if (const char* value = this->Makefile->GetDefinition(
+ "CMAKE_" + cli.GetLinkLanguage() + "_LIBRARY_PATH_FLAG")) {
+ libPathFlag = value;
+ } else {
+ libPathFlag =
+ this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG");
+ }
+
+ std::string libPathTerminator;
+ if (const char* value = this->Makefile->GetDefinition(
+ "CMAKE_" + cli.GetLinkLanguage() + "_LIBRARY_PATH_TERMINATOR")) {
+ libPathTerminator = value;
+ } else {
+ libPathTerminator =
+ this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_TERMINATOR");
+ }
// Add standard libraries for this language.
std::string standardLibsVar = "CMAKE_";