mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 21:21:37 +00:00
build(cmake): use CMAKE_COLOR_DIAGNOSTICS for colored output
- Set CMAKE_COLOR_DIAGNOSTICS instead of adding -fdiagnostics-color to CMAKE_CXX_FLAGS and setting CMAKE_COLOR_MAKEFILE - CMake adds the correct flag for each compiler - Keep a CMAKE_COLOR_DIAGNOSTICS value given by the user, except with DISABLE_COLOR=ON - The color flag is no longer part of FairMQ_CXX_FLAGS in the package Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -120,12 +120,12 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g ${_warnings} -DNDEBUG ${_sanitizers}"
|
||||
unset(_warnings)
|
||||
unset(_sanitizers)
|
||||
|
||||
# Colored compiler diagnostics and build output. CMake adds the right compiler
|
||||
# flag for each compiler. A value given by the user wins over the default.
|
||||
if(DISABLE_COLOR)
|
||||
set(CMAKE_COLOR_MAKEFILE OFF)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=never")
|
||||
else()
|
||||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
|
||||
set(CMAKE_COLOR_DIAGNOSTICS OFF)
|
||||
elseif(NOT DEFINED CMAKE_COLOR_DIAGNOSTICS)
|
||||
set(CMAKE_COLOR_DIAGNOSTICS ON)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED PROJECT_VERSION_TWEAK)
|
||||
|
||||
Reference in New Issue
Block a user