Pārlūkot izejas kodu

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
Brad King 5 gadi atpakaļ
vecāks
revīzija
70ce1ad64a
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      Source/cmGeneratorTarget.cxx

+ 3 - 0
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 =