summaryrefslogtreecommitdiffstats
path: root/Source/CMakeLists.txt
diff options
context:
space:
mode:
authorPeter Kümmel <syntheticpp@gmx.net>2012-07-20 08:53:34 (GMT)
committerPeter Kümmel <syntheticpp@gmx.net>2012-07-20 08:53:34 (GMT)
commit5d365b26ec6ce089f1a5e0bfed523cb5f916f1da (patch)
treee88a9c208a3df0afc137d6169276b7d3fa15cdb7 /Source/CMakeLists.txt
parentd569f3ef15cd05f3a42788dba26abd1e0846c59e (diff)
downloadCMake-5d365b26ec6ce089f1a5e0bfed523cb5f916f1da.zip
CMake-5d365b26ec6ce089f1a5e0bfed523cb5f916f1da.tar.gz
CMake-5d365b26ec6ce089f1a5e0bfed523cb5f916f1da.tar.bz2
Ninja: enable ninja support everywhere
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r--Source/CMakeLists.txt53
1 files changed, 19 insertions, 34 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index b3b38ea..e9c5a58 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