Commit d5b5c192 authored by Kyle Edwards's avatar Kyle Edwards

cmGlobalGenerator: FindMakeProgram() before CMakeDetermineSystem

Prior to 147d36ce, 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 da402a08.) However, a bug was found in
64-bit MSBuild, which resulted in da402a08 being reverted in
f3cedf38 (but 147d36ce was not reverted.) Move FindMakeProgram() even
earlier than it was before 147d36ce, 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.
parent 01fdd421
...@@ -596,6 +596,16 @@ void cmGlobalGenerator::EnableLanguage( ...@@ -596,6 +596,16 @@ void cmGlobalGenerator::EnableLanguage(
mf->ReadListFile(fpath); 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 // Load the CMakeDetermineSystem.cmake file and find out
// what platform we are running on // what platform we are running on
if (!mf->GetDefinition("CMAKE_SYSTEM")) { if (!mf->GetDefinition("CMAKE_SYSTEM")) {
...@@ -667,11 +677,6 @@ void cmGlobalGenerator::EnableLanguage( ...@@ -667,11 +677,6 @@ void cmGlobalGenerator::EnableLanguage(
cmSystemTools::SetFatalErrorOccured(); cmSystemTools::SetFatalErrorOccured();
return; 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 // Check that the languages are supported by the generator and its
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment