Explorar o código

Merge pull request #3692 from nextcloud/feature/color-compile-output-ninja

Color compile ouput when using Ninja build file generator
Felix Weilbach %!s(int64=4) %!d(string=hai) anos
pai
achega
f522cd66a0
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      CMakeLists.txt

+ 6 - 0
CMakeLists.txt

@@ -44,6 +44,12 @@ endif()
 
 include(Warnings)
 
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+  add_compile_options(-fdiagnostics-color=always)
+elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+  add_compile_options(-fcolor-diagnostics)
+endif()
+
 include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
 # For config.h
 include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})