summaryrefslogtreecommitdiff
path: root/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
commit561adf2d64fb56102ce45264f3693bf98e09bcea (patch)
tree4ce8ae02ef623340233f57317d1796984740190d /cmake/Modules/CompilerRTUtils.cmake
parent01e245e016702a57492be80cdbaff96c7ea955e1 (diff)
[CMake] Use /W3 instead of -Wall on Windows. Remove add_definitions abuse.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules/CompilerRTUtils.cmake')
-rw-r--r--cmake/Modules/CompilerRTUtils.cmake15
1 files changed, 9 insertions, 6 deletions
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
index b8eef90bb..e22e77535 100644
--- a/cmake/Modules/CompilerRTUtils.cmake
+++ b/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()