From 70ce1ad64a04a244bb1c03753da0752c61fc3a37 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 10 Aug 2020 13:29:29 -0400 Subject: 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 --- Source/cmGeneratorTarget.cxx | 3 +++ 1 file changed, 3 insertions(+) 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& archVec) const { + if (!this->Makefile->IsOn("APPLE")) { + return; + } cmProp archs = nullptr; if (!config.empty()) { std::string defVarName = -- cgit v0.12