summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-06-15 20:50:58 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-06-18 19:35:26 (GMT)
commitd5b5c192780dbbf80ff7e049997c0eaeeebdeb95 (patch)
tree27769c082ce83c37b95b5544420af0d31e23895b /Source/cmGlobalGenerator.cxx
parent01fdd421bbd7c3c1d37fd61bfaf0cfe5a756af71 (diff)
downloadCMake-d5b5c192780dbbf80ff7e049997c0eaeeebdeb95.zip
CMake-d5b5c192780dbbf80ff7e049997c0eaeeebdeb95.tar.gz
CMake-d5b5c192780dbbf80ff7e049997c0eaeeebdeb95.tar.bz2
cmGlobalGenerator: FindMakeProgram() before CMakeDetermineSystem
Prior to 147d36c, the build tool was found before the toolset was selected, but was changed to be found after in order to support a 64-bit MSBuild (introduced in da402a0.) However, a bug was found in 64-bit MSBuild, which resulted in da402a0 being reverted in f3cedf3 (but 147d36c was not reverted.) Move FindMakeProgram() even earlier than it was before 147d36c, before CMakeDetermineSystem is called, so that the Visual Studio Android support can report its sysroot, giving Android-Determine the information it needs to inspect the NDK. When the bug in 64-bit MSBuild is fixed, we will have a chicken-and- egg problem, but we don't need to worry about it for now.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 4b4ffda..6001999 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -596,6 +596,16 @@ void cmGlobalGenerator::EnableLanguage(
mf->ReadListFile(fpath);
}
}
+
+ if (readCMakeSystem) {
+ // 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)) {
+ return;
+ }
+ }
+
// Load the CMakeDetermineSystem.cmake file and find out
// what platform we are running on
if (!mf->GetDefinition("CMAKE_SYSTEM")) {
@@ -667,11 +677,6 @@ void cmGlobalGenerator::EnableLanguage(
cmSystemTools::SetFatalErrorOccured();
return;
}
-
- // Find the native build tool for this generator.
- if (!this->FindMakeProgram(mf)) {
- return;
- }
}
// Check that the languages are supported by the generator and its