summaryrefslogtreecommitdiffstats
path: root/Source/cmCommonTargetGenerator.cxx
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-06-08 09:29:35 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-08 20:41:41 (GMT)
commitde4ee088e7ab60213b551ecf98bc9e1b512ee393 (patch)
treefc9997106972da0449dcc63d7a36c8f047ada324 /Source/cmCommonTargetGenerator.cxx
parentb0d3e693f1ab466451c7a0d17bbbdd3cae76e93a (diff)
downloadCMake-de4ee088e7ab60213b551ecf98bc9e1b512ee393.zip
CMake-de4ee088e7ab60213b551ecf98bc9e1b512ee393.tar.gz
CMake-de4ee088e7ab60213b551ecf98bc9e1b512ee393.tar.bz2
cmCommonTargetGenerator: De-duplicate CMAKE_BUILD_TYPE lookup
Diffstat (limited to 'Source/cmCommonTargetGenerator.cxx')
-rw-r--r--Source/cmCommonTargetGenerator.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index a6f2a2e..cb62bde 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -159,8 +159,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
if (const char* modpath_flag =
this->Makefile->GetDefinition("CMAKE_Fortran_MODPATH_FLAG")) {
std::vector<std::string> includes;
- const std::string& config =
- this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
+ const std::string& config = this->ConfigName;
this->LocalGenerator->GetIncludeDirectories(
includes, this->GeneratorTarget, "C", config);
for (std::vector<std::string>::const_iterator idi = includes.begin();
@@ -202,6 +201,7 @@ void cmCommonTargetGenerator::AppendFortranFormatFlags(
std::string cmCommonTargetGenerator::GetFrameworkFlags(std::string const& l)
{
+ std::string const& config = this->ConfigName;
if (!this->Makefile->IsOn("APPLE")) {
return std::string();
}
@@ -218,8 +218,6 @@ std::string cmCommonTargetGenerator::GetFrameworkFlags(std::string const& l)
#endif
std::vector<std::string> includes;
- const std::string& config =
- this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
this->LocalGenerator->GetIncludeDirectories(includes, this->GeneratorTarget,
"C", config);
// check all include directories for frameworks as this
@@ -235,9 +233,8 @@ std::string cmCommonTargetGenerator::GetFrameworkFlags(std::string const& l)
}
std::string flags;
- const char* cfg = this->LocalGenerator->GetConfigName().c_str();
if (cmComputeLinkInformation* cli =
- this->GeneratorTarget->GetLinkInformation(cfg)) {
+ this->GeneratorTarget->GetLinkInformation(config)) {
std::vector<std::string> const& frameworks = cli->GetFrameworkPaths();
for (std::vector<std::string>::const_iterator i = frameworks.begin();
i != frameworks.end(); ++i) {