Forcing colored compiler output with Ninja.
This commit is contained in:
parent
76fb530492
commit
64dd8e9910
@ -37,6 +37,14 @@ set(CLINGO_BUILD_WITH_PYTHON OFF CACHE BOOL "enable python support")
|
|||||||
set(LIB_POTASSCO_BUILD_APP OFF CACHE BOOL "whether or not to build lpconvert tool")
|
set(LIB_POTASSCO_BUILD_APP OFF CACHE BOOL "whether or not to build lpconvert tool")
|
||||||
set(LIB_POTASSCO_BUILD_TESTS OFF CACHE BOOL "whether or not to build tests")
|
set(LIB_POTASSCO_BUILD_TESTS OFF CACHE BOOL "whether or not to build tests")
|
||||||
|
|
||||||
|
if(CMAKE_GENERATOR STREQUAL "Ninja" AND
|
||||||
|
((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) OR
|
||||||
|
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)))
|
||||||
|
# Force colored warnings in Ninja’s output if the compiler has -fdiagnostics-color support.
|
||||||
|
# Rationale in https://github.com/ninja-build/ninja/issues/814
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(lib/clingo)
|
add_subdirectory(lib/clingo)
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(app)
|
add_subdirectory(app)
|
||||||
|
Loading…
Reference in New Issue
Block a user