diff options
author | Peter Kümmel <syntheticpp@gmx.net> | 2012-07-20 10:53:34 +0200 |
---|---|---|
committer | Peter Kümmel <syntheticpp@gmx.net> | 2012-07-20 10:53:34 +0200 |
commit | 5d365b26ec6ce089f1a5e0bfed523cb5f916f1da (patch) | |
tree | e88a9c208a3df0afc137d6169276b7d3fa15cdb7 /Source | |
parent | d569f3ef15cd05f3a42788dba26abd1e0846c59e (diff) | |
download | cmake-5d365b26ec6ce089f1a5e0bfed523cb5f916f1da.tar.gz |
Ninja: enable ninja support everywhere
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 53 | ||||
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmake.cxx | 6 |
4 files changed, 20 insertions, 43 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index b3b38ead9e..e9c5a587e9 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -359,40 +359,25 @@ IF (WIN32) ENDIF(NOT UNIX) ENDIF (WIN32) -# Turn on Ninja by default, but disable it -# on platforms where it does not pass all tests. -# Enforce Ninja support by setting CMAKE_USE_NINJA -set(_CMAKE_DEFAULT_NINJA_VALUE TRUE) -if(APPLE) - SET(_CMAKE_DEFAULT_NINJA_VALUE TRUE) -endif() -SET(CMAKE_ENABLE_NINJA ${_CMAKE_DEFAULT_NINJA_VALUE} CACHE BOOL - "Enable the ninja generator for CMake. When enabled, some CMake tests still fail on OSX") -MARK_AS_ADVANCED(CMAKE_ENABLE_NINJA) -IF(CMAKE_ENABLE_NINJA) - MESSAGE(STATUS "Ninja generator enabled.") - SET(SRCS ${SRCS} - cmGlobalNinjaGenerator.cxx - cmGlobalNinjaGenerator.h - cmNinjaTypes.h - cmLocalNinjaGenerator.cxx - cmLocalNinjaGenerator.h - cmNinjaTargetGenerator.cxx - cmNinjaTargetGenerator.h - cmNinjaNormalTargetGenerator.cxx - cmNinjaNormalTargetGenerator.h - cmNinjaUtilityTargetGenerator.cxx - cmNinjaUtilityTargetGenerator.h - ) - ADD_DEFINITIONS(-DCMAKE_USE_NINJA) - IF(WIN32 AND NOT CYGWIN AND NOT BORLAND) - SET_SOURCE_FILES_PROPERTIES(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501) - ADD_EXECUTABLE(cmcldeps cmcldeps.cxx) - TARGET_LINK_LIBRARIES(cmcldeps CMakeLib) - INSTALL_TARGETS(/bin cmcldeps) - ENDIF() -ELSE() - MESSAGE(STATUS "Ninja generator disabled, enable it with -DCMAKE_ENABLE_NINJA=ON") +# Ninja support +SET(SRCS ${SRCS} + cmGlobalNinjaGenerator.cxx + cmGlobalNinjaGenerator.h + cmNinjaTypes.h + cmLocalNinjaGenerator.cxx + cmLocalNinjaGenerator.h + cmNinjaTargetGenerator.cxx + cmNinjaTargetGenerator.h + cmNinjaNormalTargetGenerator.cxx + cmNinjaNormalTargetGenerator.h + cmNinjaUtilityTargetGenerator.cxx + cmNinjaUtilityTargetGenerator.h + ) +IF(WIN32 AND NOT CYGWIN AND NOT BORLAND) + SET_SOURCE_FILES_PROPERTIES(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501) + ADD_EXECUTABLE(cmcldeps cmcldeps.cxx) + TARGET_LINK_LIBRARIES(cmcldeps CMakeLib) + INSTALL_TARGETS(/bin cmcldeps) ENDIF() # create a library used by the command line and the GUI diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 5df8627d0d..ad4ab76ee4 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -60,9 +60,7 @@ cmExtraCodeBlocksGenerator::cmExtraCodeBlocksGenerator() // disable until somebody actually tests it: // this->SupportedGlobalGenerators.push_back("MSYS Makefiles"); #endif -#ifdef CMAKE_USE_NINJA this->SupportedGlobalGenerators.push_back("Ninja"); -#endif this->SupportedGlobalGenerators.push_back("Unix Makefiles"); } diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index ab113075dd..78a87047af 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -34,9 +34,7 @@ cmExtraEclipseCDT4Generator this->SupportedGlobalGenerators.push_back("MinGW Makefiles"); // this->SupportedGlobalGenerators.push_back("MSYS Makefiles"); #endif -#ifdef CMAKE_USE_NINJA this->SupportedGlobalGenerators.push_back("Ninja"); -#endif this->SupportedGlobalGenerators.push_back("Unix Makefiles"); this->SupportsVirtualFolders = true; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 451aec8fa1..fdc42fa2b3 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -84,10 +84,8 @@ #else #endif #include "cmGlobalUnixMakefileGenerator3.h" +#include "cmGlobalNinjaGenerator.h" -#ifdef CMAKE_USE_NINJA -# include "cmGlobalNinjaGenerator.h" -#endif #if defined(CMAKE_HAVE_VS_GENERATORS) #include "cmCallVisualStudioMacro.h" @@ -2600,10 +2598,8 @@ void cmake::AddDefaultGenerators() #endif this->Generators[cmGlobalUnixMakefileGenerator3::GetActualName()] = &cmGlobalUnixMakefileGenerator3::New; -#ifdef CMAKE_USE_NINJA this->Generators[cmGlobalNinjaGenerator::GetActualName()] = &cmGlobalNinjaGenerator::New; -#endif #ifdef CMAKE_USE_XCODE this->Generators[cmGlobalXCodeGenerator::GetActualName()] = &cmGlobalXCodeGenerator::New; |