summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-06-07 14:30:58 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-08 20:18:31 (GMT)
commitb0d3e693f1ab466451c7a0d17bbbdd3cae76e93a (patch)
treeb2eca1da7409310744f707274e83b48884053662 /Source/cmake.cxx
parentba92e11f8b461513566d5cc3c0b53b2215bb85f7 (diff)
downloadCMake-b0d3e693f1ab466451c7a0d17bbbdd3cae76e93a.zip
CMake-b0d3e693f1ab466451c7a0d17bbbdd3cae76e93a.tar.gz
CMake-b0d3e693f1ab466451c7a0d17bbbdd3cae76e93a.tar.bz2
cmLocalGenerator: Pass configuration to GetTargetFlags
Move the configuration lookup to call sites. This will allow multi-configuration callers to use the method.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 89ea955..f35939b 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -482,6 +482,9 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
mf->AddLinkLibraryForTarget(targetName, *libIt, GENERAL_LibraryType);
}
+ std::string buildType = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
+ buildType = cmSystemTools::UpperCase(buildType);
+
std::string linkLibs;
std::string frameworkPath;
std::string linkPath;
@@ -490,8 +493,8 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
gg->CreateGenerationObjects();
cmGeneratorTarget* gtgt = gg->FindGeneratorTarget(tgt->GetName());
cmLocalGenerator* lg = gtgt->GetLocalGenerator();
- lg->GetTargetFlags(linkLibs, frameworkPath, linkPath, flags, linkFlags,
- gtgt, false);
+ lg->GetTargetFlags(buildType, linkLibs, frameworkPath, linkPath, flags,
+ linkFlags, gtgt, false);
linkLibs = frameworkPath + linkPath + linkLibs;
printf("%s\n", linkLibs.c_str());