summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-06 20:25:44 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-07 12:42:25 (GMT)
commit0f1fedbd6a298cf9af2f36577cc66c4ee167be3d (patch)
tree6cbfd061ed6d164e150f032ff70697582af68d2b /Source/cmLocalGenerator.cxx
parent7f1cd3280cf484b5d565a12ae57022de018faa57 (diff)
downloadCMake-0f1fedbd6a298cf9af2f36577cc66c4ee167be3d.zip
CMake-0f1fedbd6a298cf9af2f36577cc66c4ee167be3d.tar.gz
CMake-0f1fedbd6a298cf9af2f36577cc66c4ee167be3d.tar.bz2
CMP0065: Put computed flags into LINK_FLAGS not LINK_LIBRARIES
These flags are redundant anyway in the NEW case of the policy, and could be merged with CMAKE_EXE_EXPORTS_${lang}_FLAG content for that case. That is deferred to the future, but now at least the similar code is located close to each other.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index a0f6423..3fabd53 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1248,6 +1248,14 @@ void cmLocalGenerator::GetTargetFlags(
linkFlags += this->Makefile->GetSafeDefinition(exportFlagVar);
linkFlags += " ";
}
+
+ std::string cmp0065Flags =
+ this->GetLinkLibsCMP0065(linkLanguage, *target);
+ if (!cmp0065Flags.empty()) {
+ linkFlags += cmp0065Flags;
+ linkFlags += " ";
+ }
+
const char* targetLinkFlags = target->GetProperty("LINK_FLAGS");
if (targetLinkFlags) {
linkFlags += targetLinkFlags;
@@ -1430,7 +1438,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
std::string linkLanguage = cli.GetLinkLanguage();
- std::string linkLibs = this->GetLinkLibsCMP0065(linkLanguage, tgt);
+ std::string linkLibs;
std::string libPathFlag =
this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG");