diff options
author | Peter Kümmel <syntheticpp@gmx.net> | 2013-03-10 10:36:57 (GMT) |
---|---|---|
committer | Peter Kümmel <syntheticpp@gmx.net> | 2013-03-10 10:36:57 (GMT) |
commit | 2271ca34968b242d4777b5dcb4888b67a75a93a8 (patch) | |
tree | 70f16a61449c7cfe59aee75d009f64c347e4f65a /Source | |
parent | 751f712e1ac936afb42acc49f1f19c768d3229b5 (diff) | |
download | CMake-2271ca34968b242d4777b5dcb4888b67a75a93a8.zip CMake-2271ca34968b242d4777b5dcb4888b67a75a93a8.tar.gz CMake-2271ca34968b242d4777b5dcb4888b67a75a93a8.tar.bz2 |
Ninja: the Ninja generator does not support Fortran yet.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index a999847..01c685d 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -17,6 +17,8 @@ #include "cmGeneratorTarget.h" #include "cmVersion.h" +#include <algorithm> + const char* cmGlobalNinjaGenerator::NINJA_BUILD_FILE = "build.ninja"; const char* cmGlobalNinjaGenerator::NINJA_RULES_FILE = "rules.ninja"; const char* cmGlobalNinjaGenerator::INDENT = " "; @@ -491,16 +493,20 @@ void cmGlobalNinjaGenerator::Generate() // Used in: // Source/cmMakefile.cxx: void cmGlobalNinjaGenerator -::EnableLanguage(std::vector<std::string>const& languages, - cmMakefile *mf, +::EnableLanguage(std::vector<std::string>const& langs, + cmMakefile* makefile, bool optional) { - if(mf->IsOn("CMAKE_COMPILER_IS_MINGW")) + if (makefile->IsOn("CMAKE_COMPILER_IS_MINGW")) { UsingMinGW = true; - this->EnableMinGWLanguage(mf); + this->EnableMinGWLanguage(makefile); + } + if (std::find(langs.begin(), langs.end(), "Fortran") != langs.end()) + { + cmSystemTools::Error("The Ninja generator does not support Fortran yet."); } - this->cmGlobalGenerator::EnableLanguage(languages, mf, optional); + this->cmGlobalGenerator::EnableLanguage(langs, makefile, optional); } bool cmGlobalNinjaGenerator::UsingMinGW = false; |