summaryrefslogtreecommitdiffstats
path: root/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-03-13 11:31:10 +0000
committerAlexey Samsonov <samsonov@google.com>2014-03-13 11:31:10 +0000
commitfe7e28c41f28ee940fc4141172860fb5faa1b7e7 (patch)
treeda0cb727743e754cda0cd34f3180f2105741ecdb /compiler-rt/cmake/Modules/CompilerRTUtils.cmake
parent2f45b7c49257308b81fcfd1f833b11072e03834c (diff)
downloadbcm5719-llvm-fe7e28c41f28ee940fc4141172860fb5faa1b7e7.tar.gz
bcm5719-llvm-fe7e28c41f28ee940fc4141172860fb5faa1b7e7.zip
[CMake] Use /W3 instead of -Wall on Windows. Remove add_definitions abuse.
llvm-svn: 203786
Diffstat (limited to 'compiler-rt/cmake/Modules/CompilerRTUtils.cmake')
-rw-r--r--compiler-rt/cmake/Modules/CompilerRTUtils.cmake15
1 files changed, 9 insertions, 6 deletions
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index b8eef90bb41..e22e77535a4 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -46,13 +46,16 @@ macro(append_if condition value)
endif()
endmacro()
+# Appends value to all strings in ARGN, if the condition is true.
+macro(append_string_if condition value)
+ if(${condition})
+ foreach(str ${ARGN})
+ set(${str} "${${str}} ${value}")
+ endforeach()
+ endif()
+endmacro()
+
macro(append_no_rtti_flag list)
append_if(COMPILER_RT_HAS_FNO_RTTI_FLAG -fno-rtti ${list})
append_if(COMPILER_RT_HAS_GR_FLAG /GR- ${list})
endmacro()
-
-macro(add_definitions_if condition)
- if(${condition})
- add_definitions(${ARGN})
- endif()
-endmacro()
OpenPOWER on IntegriCloud