diff options
author | Brad King <brad.king@kitware.com> | 2019-08-29 13:40:40 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-08-29 13:41:06 (GMT) |
commit | 3ec986ce8e8df269eb6b6b9f37e12b02194168fd (patch) | |
tree | 324b5c27fdbb9224268539f856ba2286fa9a3403 /Source | |
parent | ee945a590b14601b912ec15a8247f6b6ec338dd5 (diff) | |
parent | 79b282425185b70426716f23feb06e7e9e6ed752 (diff) | |
download | CMake-3ec986ce8e8df269eb6b6b9f37e12b02194168fd.zip CMake-3ec986ce8e8df269eb6b6b9f37e12b02194168fd.tar.gz CMake-3ec986ce8e8df269eb6b6b9f37e12b02194168fd.tar.bz2 |
Merge topic 'per-lang-link-library-flag'
79b2824251 Add per-lang variants of CMAKE_LINK_LIBRARY_{FILE_FLAG,SUFFIX}
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3747
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 880d5c0..dd8d246 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -292,10 +292,20 @@ cmComputeLinkInformation::cmComputeLinkInformation( this->LibLinkFlag = this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG"); } - this->LibLinkFileFlag = - this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FILE_FLAG"); - this->LibLinkSuffix = - this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_SUFFIX"); + if (const char* flag = this->Makefile->GetDefinition( + "CMAKE_" + this->LinkLanguage + "_LINK_LIBRARY_FILE_FLAG")) { + this->LibLinkFileFlag = flag; + } else { + this->LibLinkFileFlag = + this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FILE_FLAG"); + } + if (const char* suffix = this->Makefile->GetDefinition( + "CMAKE_" + this->LinkLanguage + "_LINK_LIBRARY_SUFFIX")) { + this->LibLinkSuffix = suffix; + } else { + this->LibLinkSuffix = + this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_SUFFIX"); + } // Get options needed to specify RPATHs. this->RuntimeUseChrpath = false; |