summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2017-06-29 12:19:23 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-29 13:52:44 (GMT)
commitc2a6df94ed639de2192c8baf2350efb2a4fd9c50 (patch)
treebd67ce25ac2c4adf44f58284f018ad6a30ebff48 /Source
parent372de3f8039f69b3a2edcf7120083ec4097f8bd3 (diff)
downloadCMake-c2a6df94ed639de2192c8baf2350efb2a4fd9c50.zip
CMake-c2a6df94ed639de2192c8baf2350efb2a4fd9c50.tar.gz
CMake-c2a6df94ed639de2192c8baf2350efb2a4fd9c50.tar.bz2
Xcode: Use correct Object Library paths for cross-SDK builds
When calculating Object Library paths take a look at the `XCODE_EMIT_EFFECTIVE_PLATFORM_NAME` property to enable builds with different SDKs. Otherwise a hard-coded architecture could be chosen. Fixes: #16040
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx8
-rw-r--r--Source/cmGlobalXCodeGenerator.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 45c1764..9037961 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -147,7 +147,7 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(
this->XcodeBuildCommandInitialized = false;
this->ObjectDirArchDefault = "$(CURRENT_ARCH)";
- this->ComputeObjectDirArch();
+ this->ObjectDirArch = this->ObjectDirArchDefault;
cm->GetState()->SetIsGeneratorMultiConfig(true);
}
@@ -3087,12 +3087,12 @@ void cmGlobalXCodeGenerator::ComputeArchitectures(cmMakefile* mf)
}
}
- this->ComputeObjectDirArch();
+ this->ComputeObjectDirArch(mf);
}
-void cmGlobalXCodeGenerator::ComputeObjectDirArch()
+void cmGlobalXCodeGenerator::ComputeObjectDirArch(cmMakefile* mf)
{
- if (this->Architectures.size() > 1) {
+ if (this->Architectures.size() > 1 || this->UseEffectivePlatformName(mf)) {
this->ObjectDirArch = "$(CURRENT_ARCH)";
} else if (!this->Architectures.empty()) {
this->ObjectDirArch = this->Architectures[0];
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index f38fa3c..e69793b 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -247,7 +247,7 @@ private:
const cmGeneratorTarget* t) const;
void ComputeArchitectures(cmMakefile* mf);
- void ComputeObjectDirArch();
+ void ComputeObjectDirArch(cmMakefile* mf);
void addObject(cmXCodeObject* obj);
std::string PostBuildMakeTarget(std::string const& tName,