diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index c7baf2b713..ab6a26c974 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 =