projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
llvm-ar: Clean up memory management with OwningPtr.
[oota-llvm.git]
/
cmake
/
modules
/
HandleLLVMOptions.cmake
diff --git
a/cmake/modules/HandleLLVMOptions.cmake
b/cmake/modules/HandleLLVMOptions.cmake
index b33632466c6cac1fad8e2b2bf79f890616a0a1a7..2939fa2afa2d26afb32730717faf54e196aad0f4 100644
(file)
--- a/
cmake/modules/HandleLLVMOptions.cmake
+++ b/
cmake/modules/HandleLLVMOptions.cmake
@@
-268,6
+268,8
@@
add_llvm_definitions( -D__STDC_FORMAT_MACROS )
add_llvm_definitions( -D__STDC_LIMIT_MACROS )
# clang doesn't print colored diagnostics when invoked from Ninja
add_llvm_definitions( -D__STDC_LIMIT_MACROS )
# clang doesn't print colored diagnostics when invoked from Ninja
-if (UNIX AND CMAKE_GENERATOR STREQUAL "Ninja")
- add_flag_if_supported("-fcolor-diagnostics")
+if (UNIX AND
+ CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
+ CMAKE_GENERATOR STREQUAL "Ninja")
+ append("-fcolor-diagnostics" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()
endif()