summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-29 12:57:36 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-29 12:57:39 (GMT)
commite182ba735e17bd5625ddfe7f796a123a383ff02f (patch)
tree92bef0e2381e1e575f774d2a88133437169d0322 /Source
parent7b7c9f7c206254a27063c65067529730cb149d80 (diff)
parentf8cb9944a1118a7dfd33c058314a083e65e1de81 (diff)
downloadCMake-e182ba735e17bd5625ddfe7f796a123a383ff02f.zip
CMake-e182ba735e17bd5625ddfe7f796a123a383ff02f.tar.gz
CMake-e182ba735e17bd5625ddfe7f796a123a383ff02f.tar.bz2
Merge topic 'defer-native-tool'
f8cb9944 Find native build tool after determining the target system Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1317
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 958aa05..05efff3 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -447,15 +447,6 @@ void cmGlobalGenerator::EnableLanguage(
"Platform information initialized", cmStateEnums::INTERNAL);
}
- // find and make sure CMAKE_MAKE_PROGRAM is defined
- if (!this->FindMakeProgram(mf)) {
- return;
- }
-
- if (!this->CheckLanguages(languages, mf)) {
- return;
- }
-
// try and load the CMakeSystem.cmake if it is there
std::string fpath = rootBin;
bool const readCMakeSystem = !mf->GetDefinition("CMAKE_SYSTEM_LOADED");
@@ -500,6 +491,11 @@ void cmGlobalGenerator::EnableLanguage(
}
if (readCMakeSystem) {
+ // Find the native build tool for this generator.
+ if (!this->FindMakeProgram(mf)) {
+ return;
+ }
+
// Tell the generator about the target system.
std::string system = mf->GetSafeDefinition("CMAKE_SYSTEM_NAME");
if (!this->SetSystemName(system, mf)) {
@@ -522,6 +518,12 @@ void cmGlobalGenerator::EnableLanguage(
}
}
+ // Check that the languages are supported by the generator and its
+ // native build tool found above.
+ if (!this->CheckLanguages(languages, mf)) {
+ return;
+ }
+
// **** Load the system specific initialization if not yet loaded
if (!mf->GetDefinition("CMAKE_SYSTEM_SPECIFIC_INITIALIZE_LOADED")) {
fpath = mf->GetModulesFile("CMakeSystemSpecificInitialize.cmake");