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
This commit is contained in:
Brad King
2020-08-10 13:29:29 -04:00
parent 63a65baf4c
commit 70ce1ad64a

View File

@@ -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 =