mirror of
https://github.com/Z3Prover/z3
synced 2025-06-19 04:13:38 +00:00
Force color output with Ninja.
This commit is contained in:
parent
eb1122c5cb
commit
0b54a91513
1 changed files with 14 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue