Merge pull request #5248 from ligfx/ninjadiagnosticscolor2
CMake: turn on -fdiagnostics-color for Ninja builds
This commit is contained in:
commit
c074945dc7
|
@ -208,6 +208,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_L
|
|||
message(FATAL_ERROR "Dolphin requires at least GCC 5.0 (found ${CMAKE_CXX_COMPILER_VERSION})")
|
||||
endif()
|
||||
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
check_and_add_flag(DIAGNOSTICS_COLOR -fdiagnostics-color)
|
||||
elseif(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
# Only MSBuild needs this, other generators will compile one file at a time
|
||||
add_compile_options("/MP")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
check_and_add_flag(EXCEPTIONS /EHsc)
|
||||
dolphin_compile_definitions(_DEBUG DEBUG_ONLY)
|
||||
|
@ -216,11 +223,6 @@ if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
|||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /BASE:0x00400000")
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /DYNAMICBASE:NO")
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /FIXED")
|
||||
|
||||
# Only MSBuild needs this, other generators will compile one file at a time
|
||||
if(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
add_compile_options("/MP")
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-D_DEFAULT_SOURCE)
|
||||
check_and_add_flag(HAVE_WALL -Wall)
|
||||
|
|
Loading…
Reference in New Issue