summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-08-10 17:29:29 (GMT)
committerBrad King <brad.king@kitware.com>2020-08-10 17:29:29 (GMT)
commit70ce1ad64a04a244bb1c03753da0752c61fc3a37 (patch)
tree25a2ad7a6da50c3212001dd9085097c96cbaa231 /Source/cmGeneratorTarget.cxx
parent63a65baf4c343c73b2142078ef0045d3711dea1d (diff)
downloadCMake-70ce1ad64a04a244bb1c03753da0752c61fc3a37.zip
CMake-70ce1ad64a04a244bb1c03753da0752c61fc3a37.tar.gz
CMake-70ce1ad64a04a244bb1c03753da0752c61fc3a37.tar.bz2
PCH: Avoid Apple-specific architecture flags on other platforms
Since commit f593b354da (PCH: Add support for multi architecture iOS projects, 2020-04-02, v3.18.0-rc1~414^2) the `OSX_ARCHITECTURES` target property (and corresponding `CMAKE_OSX_ARCHITECTURES` variable) affects flags on non-Apple platforms by accident. Add a missing condition to avoid this. Fixes: #21072
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index c7baf2b..ab6a26c 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3032,6 +3032,9 @@ std::string cmGeneratorTarget::GetCompilePDBDirectory(
void cmGeneratorTarget::GetAppleArchs(const std::string& config,
std::vector<std::string>& archVec) const
{
+ if (!this->Makefile->IsOn("APPLE")) {
+ return;
+ }
cmProp archs = nullptr;
if (!config.empty()) {
std::string defVarName =