Ninja: the Ninja generator does not support Fortran yet.

This commit is contained in:
Peter Kümmel 2013-03-10 11:36:57 +01:00
parent 751f712e1a
commit 2271ca3496
1 changed files with 11 additions and 5 deletions

View File

@ -17,6 +17,8 @@
#include "cmGeneratorTarget.h" #include "cmGeneratorTarget.h"
#include "cmVersion.h" #include "cmVersion.h"
#include <algorithm>
const char* cmGlobalNinjaGenerator::NINJA_BUILD_FILE = "build.ninja"; const char* cmGlobalNinjaGenerator::NINJA_BUILD_FILE = "build.ninja";
const char* cmGlobalNinjaGenerator::NINJA_RULES_FILE = "rules.ninja"; const char* cmGlobalNinjaGenerator::NINJA_RULES_FILE = "rules.ninja";
const char* cmGlobalNinjaGenerator::INDENT = " "; const char* cmGlobalNinjaGenerator::INDENT = " ";
@ -491,16 +493,20 @@ void cmGlobalNinjaGenerator::Generate()
// Used in: // Used in:
// Source/cmMakefile.cxx: // Source/cmMakefile.cxx:
void cmGlobalNinjaGenerator void cmGlobalNinjaGenerator
::EnableLanguage(std::vector<std::string>const& languages, ::EnableLanguage(std::vector<std::string>const& langs,
cmMakefile *mf, cmMakefile* makefile,
bool optional) bool optional)
{ {
if(mf->IsOn("CMAKE_COMPILER_IS_MINGW")) if (makefile->IsOn("CMAKE_COMPILER_IS_MINGW"))
{ {
UsingMinGW = true; UsingMinGW = true;
this->EnableMinGWLanguage(mf); this->EnableMinGWLanguage(makefile);
} }
this->cmGlobalGenerator::EnableLanguage(languages, mf, optional); if (std::find(langs.begin(), langs.end(), "Fortran") != langs.end())
{
cmSystemTools::Error("The Ninja generator does not support Fortran yet.");
}
this->cmGlobalGenerator::EnableLanguage(langs, makefile, optional);
} }
bool cmGlobalNinjaGenerator::UsingMinGW = false; bool cmGlobalNinjaGenerator::UsingMinGW = false;