diff options
author | Brad King <brad.king@kitware.com> | 2016-09-21 17:52:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-22 17:51:58 (GMT) |
commit | f0a23aa3dbbe2751bbb4969e1371380561b566ee (patch) | |
tree | 78b8a93723e83d5376661091ab9957eb6ee0e815 /Source/cmGlobalGenerator.cxx | |
parent | f4475eb92beade22fca16f21b40df19b48c6559b (diff) | |
download | CMake-f0a23aa3dbbe2751bbb4969e1371380561b566ee.zip CMake-f0a23aa3dbbe2751bbb4969e1371380561b566ee.tar.gz CMake-f0a23aa3dbbe2751bbb4969e1371380561b566ee.tar.bz2 |
Ninja: Refactor Fortran rejection logic
Delay rejection of Fortran until after we've determined the version of
the `ninja` tool to be used. This will later allow us to enable Fortran
support based on the version of ninja.
While at it, make the rejection an immediate fatal error. Also provide
a stack trace so readers know what code tried to enable Fortran.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 4772474..95747f2 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -319,6 +319,12 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) } } +bool cmGlobalGenerator::CheckLanguages( + std::vector<std::string> const& /* languages */, cmMakefile* /* mf */) const +{ + return true; +} + // enable the given language // // The following files are loaded in this order: @@ -428,6 +434,10 @@ void cmGlobalGenerator::EnableLanguage( // find and make sure CMAKE_MAKE_PROGRAM is defined this->FindMakeProgram(mf); + 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"); |