Ninja: no additional variable needed to enable ninja
This commit is contained in:
parent
b8c3e8c1f1
commit
2a081a2b3a
|
@ -357,18 +357,16 @@ ENDIF (WIN32)
|
||||||
|
|
||||||
# Turn on Ninja by default, but disable it
|
# Turn on Ninja by default, but disable it
|
||||||
# on platforms where it does not pass all tests.
|
# on platforms where it does not pass all tests.
|
||||||
# Enforce Ninja support with ENABLE_NINJA
|
# Enforce Ninja support by setting CMAKE_USE_NINJA
|
||||||
set(_CMAKE_DEFAULT_NINJA_VALUE TRUE)
|
set(_CMAKE_DEFAULT_NINJA_VALUE TRUE)
|
||||||
if(WIN32 OR APPLE)
|
if(WIN32 OR APPLE)
|
||||||
if(NOT ENABLE_NINJA)
|
|
||||||
SET(_CMAKE_DEFAULT_NINJA_VALUE FALSE)
|
SET(_CMAKE_DEFAULT_NINJA_VALUE FALSE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
SET(CMAKE_ENABLE_NINJA ${_CMAKE_DEFAULT_NINJA_VALUE} CACHE BOOL
|
SET(CMAKE_ENABLE_NINJA ${_CMAKE_DEFAULT_NINJA_VALUE} CACHE BOOL
|
||||||
"Enable the ninja generator for CMake. On Windows and OSX broken" FORCE)
|
"Enable the ninja generator for CMake. On Windows and OSX broken")
|
||||||
MARK_AS_ADVANCED(CMAKE_ENABLE_NINJA)
|
MARK_AS_ADVANCED(CMAKE_ENABLE_NINJA)
|
||||||
IF(CMAKE_ENABLE_NINJA)
|
IF(CMAKE_ENABLE_NINJA)
|
||||||
MESSAGE(STATUS "Enable ninja generator.")
|
MESSAGE(STATUS "Ninja generator enabled.")
|
||||||
SET(SRCS ${SRCS}
|
SET(SRCS ${SRCS}
|
||||||
cmGlobalNinjaGenerator.cxx
|
cmGlobalNinjaGenerator.cxx
|
||||||
cmGlobalNinjaGenerator.h
|
cmGlobalNinjaGenerator.h
|
||||||
|
@ -384,7 +382,7 @@ IF(CMAKE_ENABLE_NINJA)
|
||||||
)
|
)
|
||||||
ADD_DEFINITIONS(-DCMAKE_USE_NINJA)
|
ADD_DEFINITIONS(-DCMAKE_USE_NINJA)
|
||||||
ELSE()
|
ELSE()
|
||||||
MESSAGE(STATUS "Ninja generator disabled, enforce with -DENABLE_NINJA=ON")
|
MESSAGE(STATUS "Ninja generator disabled, enforce with -DCMAKE_USE_NINJA=ON")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# create a library used by the command line and the GUI
|
# create a library used by the command line and the GUI
|
||||||
|
|
Loading…
Reference in New Issue