1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Add 'ENABLE_COLORIZED_COMPILER_OUTPUT' CMake option for Clang/GNU. This makes it so that compiler output is colorized for better readability. I am not sure if this has performance implications w.r.t console print speed --- hence default is set to 'off'.

This commit is contained in:
Joakim Thorén 2024-01-02 01:52:57 +01:00
parent 76388d6085
commit 4d2423ff81

View File

@ -74,6 +74,16 @@ option(ENABLE_MULTI_PROCESS_BUILDS "Enable /MP flag for MSVS solution" ON)
option(COPY_CONFIG_ON_BUILD "Copies config folder into output directory at building phase" ON)
option(ENABLE_STATIC_AI_LIBS "Add AI code into VCMI lib directly" ${staticAI})
option(ENABLE_COLORIZED_COMPILER_OUTPUT "Colorize compilation output (Clang/GNU)." OFF)
if(${ENABLE_COLORIZED_COMPILER_OUTPUT})
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options(-fcolor-diagnostics)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-fdiagnostics-color=always)
endif()
endif()
# Used for Snap packages and also useful for debugging
if(NOT APPLE_IOS AND NOT ANDROID)
option(ENABLE_MONOLITHIC_INSTALL "Install everything in single directory on Linux and Mac" OFF)