1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Merge pull request #3422 from Kuxe/enable_colorized_compiler_output

Add 'ENABLE_COLORIZED_COMPILER_OUTPUT' CMake option for Clang/GNU
This commit is contained in:
Ivan Savenko 2024-01-03 12:29:49 +02:00 committed by GitHub
commit 2fc6797466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)." ON)
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)