summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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