summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-11-23 19:20:08 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-11-23 19:20:08 (GMT)
commitef91fb02f3658954b631e46858e254008ca58132 (patch)
treeadf5e1de4a729c07eacc90e41722da39c46f40c5 /Source/cmGlobalGenerator.cxx
parentd1b6879ececa9fd24d346ddb6c3474cada9f1823 (diff)
downloadCMake-ef91fb02f3658954b631e46858e254008ca58132.zip
CMake-ef91fb02f3658954b631e46858e254008ca58132.tar.gz
CMake-ef91fb02f3658954b631e46858e254008ca58132.tar.bz2
cmGlobalGenerator: FindMakeProgram() at a generator-specific time
d5b5c192 moved FindMakeProgram() to an earlier time, which resulted in CMAKE_MAKE_PROGRAM not being read from the toolchain file. Change it to only call FindMakeProgram() early in the specific cases of Visual Studio and Xcode, and restore the old behavior for all other generators. Fixes: #21486
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 1197db6..fc40d63 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -584,7 +584,8 @@ void cmGlobalGenerator::EnableLanguage(
// Find the native build tool for this generator.
// This has to be done early so that MSBuild can be used to examine the
// cross-compilation environment.
- if (!this->FindMakeProgram(mf)) {
+ if (this->GetFindMakeProgramStage() == FindMakeProgramStage::Early &&
+ !this->FindMakeProgram(mf)) {
return;
}
}
@@ -660,6 +661,12 @@ void cmGlobalGenerator::EnableLanguage(
cmSystemTools::SetFatalErrorOccured();
return;
}
+
+ // Find the native build tool for this generator.
+ if (this->GetFindMakeProgramStage() == FindMakeProgramStage::Late &&
+ !this->FindMakeProgram(mf)) {
+ return;
+ }
}
// Check that the languages are supported by the generator and its