summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud A. de Grandmaison <arnaud.adegm@gmail.com>2013-06-14 19:26:57 +0000
committerArnaud A. de Grandmaison <arnaud.adegm@gmail.com>2013-06-14 19:26:57 +0000
commitba0d5424e1d84b8db65b0fa553774ee00ccdc8a1 (patch)
tree0528544f3223a9b44190e07ea5af4b8a34184e32
parent16eae89f2dbc01944994303c44d670be7ec1365f (diff)
downloadbcm5719-llvm-ba0d5424e1d84b8db65b0fa553774ee00ccdc8a1.tar.gz
bcm5719-llvm-ba0d5424e1d84b8db65b0fa553774ee00ccdc8a1.zip
Cmake: add compiler option in a more idiomatic way
llvm-svn: 183995
-rw-r--r--llvm/cmake/modules/HandleLLVMOptions.cmake6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 2939fa2afa2..b33632466c6 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -268,8 +268,6 @@ add_llvm_definitions( -D__STDC_FORMAT_MACROS )
add_llvm_definitions( -D__STDC_LIMIT_MACROS )
# clang doesn't print colored diagnostics when invoked from Ninja
-if (UNIX AND
- CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
- CMAKE_GENERATOR STREQUAL "Ninja")
- append("-fcolor-diagnostics" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+if (UNIX AND CMAKE_GENERATOR STREQUAL "Ninja")
+ add_flag_if_supported("-fcolor-diagnostics")
endif()
OpenPOWER on IntegriCloud