Merge pull request from imapp-pl/colorized-gcc-output-in-cmake

Colorized GCC output in CMake
This commit is contained in:
chriseth 2020-01-30 14:08:58 +01:00 committed by GitHub
commit ad98bf0f6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,9 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 5.0 or greater.")
endif ()
# Use fancy colors in the compiler diagnostics
add_compile_options(-fdiagnostics-color)
# Additional Clang-specific compiler settings.
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")