Enable colorized compiler output when running gcc via cmake

This commit is contained in:
cameel
2020-01-30 03:11:28 +01:00
parent 25a2fb2606
commit af7139c19f
+3
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")