diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 06c32fe94b..889ad7c17b 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3124,6 +3124,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 =