summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorPeter Kümmel <syntheticpp@gmx.net>2013-03-10 10:36:57 (GMT)
committerPeter Kümmel <syntheticpp@gmx.net>2013-03-10 10:36:57 (GMT)
commit2271ca34968b242d4777b5dcb4888b67a75a93a8 (patch)
tree70f16a61449c7cfe59aee75d009f64c347e4f65a /Source/cmGlobalNinjaGenerator.cxx
parent751f712e1ac936afb42acc49f1f19c768d3229b5 (diff)
downloadCMake-2271ca34968b242d4777b5dcb4888b67a75a93a8.zip
CMake-2271ca34968b242d4777b5dcb4888b67a75a93a8.tar.gz
CMake-2271ca34968b242d4777b5dcb4888b67a75a93a8.tar.bz2
Ninja: the Ninja generator does not support Fortran yet.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx16
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;