From dbe4380b09769a1d66676e2bb4ddb330987f4bd6 Mon Sep 17 00:00:00 2001 From: sjunges Date: Wed, 2 Sep 2015 10:50:01 +0200 Subject: [PATCH] Option to force color output for clang/ninja. Former-commit-id: c0fb2ac6a7b645f87f30d40e1cf89d6a005ced72 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 446981f49..4ed4fc438 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ option(STORM_USE_COTIRE "Sets whether Cotire should be used (for building precom option(LINK_LIBCXXABI "Sets whether libc++abi should be linked." OFF) option(USE_LIBCXX "Sets whether the standard library is libc++." OFF) option(USE_CARL "Sets whether carl should be included." ON) +option(FORCE_COLOR "Force color output" ON) set(GUROBI_ROOT "" CACHE STRING "A hint to the root directory of Gurobi (optional).") set(Z3_ROOT "" CACHE STRING "A hint to the root directory of Z3 (optional).") set(CUDA_ROOT "" CACHE STRING "The root directory of CUDA.") @@ -171,6 +172,10 @@ else(CLANG) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -stdlib=${CLANG_STDLIB} -Wall -pedantic -Wno-newline-eof -Wno-mismatched-tags -ftemplate-depth=1024") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic") + if(FORCE_COLOR) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics") + endif() + # Turn on popcnt instruction if desired (yes by default) if (STORM_USE_POPCNT) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt")