summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 3339ee4..851e34f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1784,6 +1784,10 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
this->Makefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
std::string isysrootVar = std::string("CMAKE_") + lang + "_HAS_ISYSROOT";
bool hasIsysroot = this->Makefile->IsOn(isysrootVar.c_str());
+ std::string deploymentTargetFlagVar =
+ std::string("CMAKE_") + lang + "_OSX_DEPLOYMENT_TARGET_FLAG";
+ const char* deploymentTargetFlag =
+ this->Makefile->GetDefinition(deploymentTargetFlagVar.c_str());
bool flagsUsed = false;
if(!archs.empty() && sysroot && lang && (lang[0] =='C' || lang[0] == 'F'))
{
@@ -1815,10 +1819,11 @@ void cmLocalGenerator::AddArchitectureFlags(std::string& flags,
flags += sysroot;
}
- if (deploymentTarget && *deploymentTarget &&
- lang && (lang[0] =='C' || lang[0] == 'F'))
+ if (deploymentTargetFlag && *deploymentTargetFlag &&
+ deploymentTarget && *deploymentTarget)
{
- flags += " -mmacosx-version-min=";
+ flags += " ";
+ flags += deploymentTargetFlag;
flags += deploymentTarget;
}
}