[Feature] Make it possible to compile without colors.
[Cause] Compilation can be on a terminal (or non-terminal) that
does not understand them.
[Solution] Add a cmake option to force compiler colors, by default
they are "auto"
[Verification] cmake -DVASUM_BUILD_FORCE_COMPILER_COLORS=true/false
Change-Id: I60376daa9801e01901af2f9f8d9d3dd5d6c18494
IF (( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9))
OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ))
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
+ IF (VASUM_BUILD_FORCE_COMPILER_COLORS)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
+ ENDIF()
ENDIF()
## Compiler flags, depending on the build type #################################