diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index b3b38ead9..e9c5a587e 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 5df8627d0..ad4ab76ee 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 ab113075d..78a87047a 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 451aec8fa..fdc42fa2b 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;