CMake: Add GCC/Clang -fdiagnostics=color compiler option.
This commit is contained in:
committed by
Yorik van Havre
parent
4f9bf0e72e
commit
ed27ab85de
@@ -48,6 +48,8 @@ macro(CompilerChecksAndSetups)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-fdiagnostics-color ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
# For now only set pedantic option for clang
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Wno-write-strings ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
Reference in New Issue
Block a user