From f93e81858b5e1243714ed7f26aadfc791a7b0ff0 Mon Sep 17 00:00:00 2001 From: Peter Kuemmel Date: Fri, 6 Apr 2012 23:25:09 +0200 Subject: Ninja: add option to enable ninja where it is not enabled by default --- Source/CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index f9d1c03..a27ec75 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -355,15 +355,17 @@ IF (WIN32) ENDIF(NOT UNIX) ENDIF (WIN32) -# turn on Ninja by default +# Turn on Ninja by default, but disable it +# on platforms where it does not pass all tests. +# Enforce Ninja support with ENABLE_NINJA set(_CMAKE_DEFAULT_NINJA_VALUE TRUE) -# turn it off for platforms where it does not pass all the -# tests if(WIN32 OR APPLE) - SET(_CMAKE_DEFAULT_NINJA_VALUE FALSE) + if(NOT ENABLE_NINJA) + SET(_CMAKE_DEFAULT_NINJA_VALUE FALSE) + endif() endif() SET(CMAKE_ENABLE_NINJA ${_CMAKE_DEFAULT_NINJA_VALUE} CACHE BOOL - "Enable the ninja generator for CMake. currently not fully working for Windows or OSX") + "Enable the ninja generator for CMake. On Windows and OSX broken" FORCE) MARK_AS_ADVANCED(CMAKE_ENABLE_NINJA) IF(CMAKE_ENABLE_NINJA) MESSAGE(STATUS "Enable ninja generator.") @@ -382,7 +384,7 @@ IF(CMAKE_ENABLE_NINJA) ) ADD_DEFINITIONS(-DCMAKE_USE_NINJA) ELSE() - MESSAGE(STATUS "Disable ninja generator.") + MESSAGE(STATUS "Ninja generator disabled, enforce with -DENABLE_NINJA=ON") ENDIF() # create a library used by the command line and the GUI -- cgit v0.12