Made CMake configuration consistent.

This commit is contained in:
Patrick Lühne 2017-06-18 18:10:03 +02:00
parent 268fa84c9e
commit dd7fb31309
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
5 changed files with 5 additions and 5 deletions

View File

@ -21,7 +21,7 @@ if (CMAKE_GENERATOR STREQUAL "Ninja" AND
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5))) (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)))
# Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support. # Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support.
# Rationale in https://github.com/ninja-build/ninja/issues/814 # Rationale in https://github.com/ninja-build/ninja/issues/814
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") set(CMAKE_CXX_FLAGS "-fdiagnostics-color=always ${CMAKE_CXX_FLAGS}")
endif() endif()
add_subdirectory(lib/tokenize) add_subdirectory(lib/tokenize)

View File

@ -19,7 +19,7 @@ if (CMAKE_GENERATOR STREQUAL "Ninja" AND
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5))) (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)))
# Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support. # Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support.
# Rationale in https://github.com/ninja-build/ninja/issues/814 # Rationale in https://github.com/ninja-build/ninja/issues/814
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") set(CMAKE_CXX_FLAGS "-fdiagnostics-color=always ${CMAKE_CXX_FLAGS}")
endif() endif()
add_subdirectory(src) add_subdirectory(src)

View File

@ -19,7 +19,7 @@ if (CMAKE_GENERATOR STREQUAL "Ninja" AND
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5))) (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)))
# Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support. # Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support.
# Rationale in https://github.com/ninja-build/ninja/issues/814 # Rationale in https://github.com/ninja-build/ninja/issues/814
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") set(CMAKE_CXX_FLAGS "-fdiagnostics-color=always ${CMAKE_CXX_FLAGS}")
endif() endif()
add_subdirectory(src) add_subdirectory(src)

View File

@ -16,6 +16,6 @@ target_include_directories(${target} PRIVATE ${includes})
target_link_libraries(${target} ${libraries}) target_link_libraries(${target} ${libraries})
add_custom_target(run-tokenize-tests add_custom_target(run-tokenize-tests
COMMAND ${CMAKE_BINARY_DIR}/bin/tokenize-tests COMMAND ${CMAKE_BINARY_DIR}/bin/tokenize-tests --use-colour=yes
DEPENDS ${target} DEPENDS ${target}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests)

View File

@ -19,6 +19,6 @@ target_include_directories(${target} PRIVATE ${includes})
target_link_libraries(${target} ${libraries}) target_link_libraries(${target} ${libraries})
add_custom_target(run-tests add_custom_target(run-tests
COMMAND ${CMAKE_BINARY_DIR}/bin/tests COMMAND ${CMAKE_BINARY_DIR}/bin/tests --use-colour=yes
DEPENDS ${target} DEPENDS ${target}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests)