diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-08-10 18:40:17 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-08-10 18:40:17 (GMT) |
commit | 491dddfbdeb7b958805e931b37783cca448eb8d8 (patch) | |
tree | 85f352d954423ebed6680f46f3f6e6d3b9118f0d /Source/cmake.cxx | |
parent | d8f7a05b372f36c62e770dac37f5641c7ce0780b (diff) | |
download | CMake-491dddfbdeb7b958805e931b37783cca448eb8d8.zip CMake-491dddfbdeb7b958805e931b37783cca448eb8d8.tar.gz CMake-491dddfbdeb7b958805e931b37783cca448eb8d8.tar.bz2 |
Bootstrap: Add support for Ninja
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index dcb96f8..f630a7e 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -93,9 +93,13 @@ #if defined(CMAKE_USE_WMAKE) # include "cmGlobalWatcomWMakeGenerator.h" #endif -#include "cmGlobalUnixMakefileGenerator3.h" #if !defined(CMAKE_BOOTSTRAP) # include "cmGlobalNinjaGenerator.h" +# include "cmGlobalUnixMakefileGenerator3.h" +#elif defined(CMAKE_BOOTSTRAP_MAKEFILES) +# include "cmGlobalUnixMakefileGenerator3.h" +#elif defined(CMAKE_BOOTSTRAP_NINJA) +# include "cmGlobalNinjaGenerator.h" #endif #if !defined(CMAKE_BOOTSTRAP) @@ -1750,6 +1754,9 @@ std::unique_ptr<cmGlobalGenerator> cmake::EvaluateDefaultGlobalGenerator() gen = cm::make_unique<cmGlobalNMakeMakefileGenerator>(this); } return std::unique_ptr<cmGlobalGenerator>(std::move(gen)); +#elif defined(CMAKE_BOOTSTRAP_NINJA) + return std::unique_ptr<cmGlobalGenerator>( + cm::make_unique<cmGlobalNinjaGenerator>(this)); #else return std::unique_ptr<cmGlobalGenerator>( cm::make_unique<cmGlobalUnixMakefileGenerator3>(this)); @@ -2026,13 +2033,17 @@ void cmake::AddDefaultGenerators() this->Generators.push_back(cmGlobalMSYSMakefileGenerator::NewFactory()); this->Generators.push_back(cmGlobalMinGWMakefileGenerator::NewFactory()); #endif - this->Generators.push_back(cmGlobalUnixMakefileGenerator3::NewFactory()); #if !defined(CMAKE_BOOTSTRAP) # if defined(__linux__) || defined(_WIN32) this->Generators.push_back(cmGlobalGhsMultiGenerator::NewFactory()); # endif + this->Generators.push_back(cmGlobalUnixMakefileGenerator3::NewFactory()); this->Generators.push_back(cmGlobalNinjaGenerator::NewFactory()); this->Generators.push_back(cmGlobalNinjaMultiGenerator::NewFactory()); +#elif defined(CMAKE_BOOTSTRAP_NINJA) + this->Generators.push_back(cmGlobalNinjaGenerator::NewFactory()); +#elif defined(CMAKE_BOOTSTRAP_MAKEFILES) + this->Generators.push_back(cmGlobalUnixMakefileGenerator3::NewFactory()); #endif #if defined(CMAKE_USE_WMAKE) this->Generators.push_back(cmGlobalWatcomWMakeGenerator::NewFactory()); |