mirror of
https://github.com/Z3Prover/z3
synced 2025-04-07 09:55:19 +00:00
Force color output with Ninja.
This commit is contained in:
parent
eb1122c5cb
commit
0b54a91513
|
@ -409,6 +409,20 @@ list(APPEND Z3_DEPENDENT_LIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||||
################################################################################
|
################################################################################
|
||||||
include(${CMAKE_SOURCE_DIR}/cmake/compiler_warnings.cmake)
|
include(${CMAKE_SOURCE_DIR}/cmake/compiler_warnings.cmake)
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# If using Ninja, force color output for Clang and gcc.
|
||||||
|
################################################################################
|
||||||
|
if (UNIX AND CMAKE_GENERATOR STREQUAL "Ninja")
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
|
||||||
|
endif()
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Option to control what type of library we build
|
# Option to control what type of library we build
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
Loading…
Reference in a new issue