summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmLocalGenerator.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 3e98341..04d2f50 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1978,14 +1978,16 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
cmValue deploymentTarget =
this->Makefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
- std::string deploymentTargetFlagVar =
- "CMAKE_" + lang + "_OSX_DEPLOYMENT_TARGET_FLAG";
- cmValue deploymentTargetFlag =
- this->Makefile->GetDefinition(deploymentTargetFlagVar);
- if (cmNonempty(deploymentTargetFlag) && cmNonempty(deploymentTarget)) {
- flags += " ";
- flags += *deploymentTargetFlag;
- flags += *deploymentTarget;
+ if (cmNonempty(deploymentTarget)) {
+ std::string deploymentTargetFlagVar =
+ "CMAKE_" + lang + "_OSX_DEPLOYMENT_TARGET_FLAG";
+ cmValue deploymentTargetFlag =
+ this->Makefile->GetDefinition(deploymentTargetFlagVar);
+ if (cmNonempty(deploymentTargetFlag)) {
+ flags += " ";
+ flags += *deploymentTargetFlag;
+ flags += *deploymentTarget;
+ }
}
}
}