cmCommonTargetGenerator: De-duplicate CMAKE_BUILD_TYPE lookup
This commit is contained in:
parent
b0d3e693f1
commit
de4ee088e7
|
@ -159,8 +159,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
|
||||||
if (const char* modpath_flag =
|
if (const char* modpath_flag =
|
||||||
this->Makefile->GetDefinition("CMAKE_Fortran_MODPATH_FLAG")) {
|
this->Makefile->GetDefinition("CMAKE_Fortran_MODPATH_FLAG")) {
|
||||||
std::vector<std::string> includes;
|
std::vector<std::string> includes;
|
||||||
const std::string& config =
|
const std::string& config = this->ConfigName;
|
||||||
this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
|
|
||||||
this->LocalGenerator->GetIncludeDirectories(
|
this->LocalGenerator->GetIncludeDirectories(
|
||||||
includes, this->GeneratorTarget, "C", config);
|
includes, this->GeneratorTarget, "C", config);
|
||||||
for (std::vector<std::string>::const_iterator idi = includes.begin();
|
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 cmCommonTargetGenerator::GetFrameworkFlags(std::string const& l)
|
||||||
{
|
{
|
||||||
|
std::string const& config = this->ConfigName;
|
||||||
if (!this->Makefile->IsOn("APPLE")) {
|
if (!this->Makefile->IsOn("APPLE")) {
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
|
@ -218,8 +218,6 @@ std::string cmCommonTargetGenerator::GetFrameworkFlags(std::string const& l)
|
||||||
#endif
|
#endif
|
||||||
std::vector<std::string> includes;
|
std::vector<std::string> includes;
|
||||||
|
|
||||||
const std::string& config =
|
|
||||||
this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
|
|
||||||
this->LocalGenerator->GetIncludeDirectories(includes, this->GeneratorTarget,
|
this->LocalGenerator->GetIncludeDirectories(includes, this->GeneratorTarget,
|
||||||
"C", config);
|
"C", config);
|
||||||
// check all include directories for frameworks as this
|
// check all include directories for frameworks as this
|
||||||
|
@ -235,9 +233,8 @@ std::string cmCommonTargetGenerator::GetFrameworkFlags(std::string const& l)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string flags;
|
std::string flags;
|
||||||
const char* cfg = this->LocalGenerator->GetConfigName().c_str();
|
|
||||||
if (cmComputeLinkInformation* cli =
|
if (cmComputeLinkInformation* cli =
|
||||||
this->GeneratorTarget->GetLinkInformation(cfg)) {
|
this->GeneratorTarget->GetLinkInformation(config)) {
|
||||||
std::vector<std::string> const& frameworks = cli->GetFrameworkPaths();
|
std::vector<std::string> const& frameworks = cli->GetFrameworkPaths();
|
||||||
for (std::vector<std::string>::const_iterator i = frameworks.begin();
|
for (std::vector<std::string>::const_iterator i = frameworks.begin();
|
||||||
i != frameworks.end(); ++i) {
|
i != frameworks.end(); ++i) {
|
||||||
|
|
Loading…
Reference in New Issue