summaryrefslogtreecommitdiff
path: root/cmake/modules/AddLLVM.cmake
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-06-21 18:44:24 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-06-21 18:44:24 +0000
commit343c32a39cb824f612f99b62fc1433ff20e38fb4 (patch)
treecca252fdd06d9f6defb1ee761996cb09a878ab61 /cmake/modules/AddLLVM.cmake
parentef22f04bad6f5037fd4cc4d144e0c418f6cb2edc (diff)
downloadllvm-343c32a39cb824f612f99b62fc1433ff20e38fb4.tar.gz
llvm-343c32a39cb824f612f99b62fc1433ff20e38fb4.tar.bz2
llvm-343c32a39cb824f612f99b62fc1433ff20e38fb4.tar.xz
Avoid using the recently added APPEND_STRING feature. This should
restore support for CMake versions before 2.8.6 -- sorry for the trouble! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules/AddLLVM.cmake')
-rwxr-xr-xcmake/modules/AddLLVM.cmake16
1 files changed, 9 insertions, 7 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 96246fafe4..0236746b28 100755
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -181,17 +181,19 @@ function(add_unittest test_suite test_name)
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
set_property(TARGET ${test_name} APPEND PROPERTY COMPILE_DEFINITIONS GTEST_HAS_RTTI=0)
- if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
- set_property(TARGET ${test_name} APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-rtti")
- elseif (MSVC)
- set_property(TARGET ${test_name} APPEND_STRING PROPERTY COMPILE_FLAGS " /GR-")
- endif ()
-
if (NOT LLVM_ENABLE_THREADS)
set_property(TARGET ${test_name} APPEND PROPERTY COMPILE_DEFINITIONS GTEST_HAS_PTHREAD=0)
endif ()
+ get_property(target_compile_flags TARGET ${test_name} PROPERTY COMPILE_FLAGS)
+ if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
+ set(target_compile_flags "${target_compile_flags} -fno-rtti")
+ elseif (MSVC)
+ set(target_compile_flags "${target_compile_flags} /GR-")
+ endif ()
+
if (SUPPORTS_NO_VARIADIC_MACROS_FLAG)
- set_property(TARGET ${test_name} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-variadic-macros")
+ set(target_compile_flags "${target_compile_flags} -Wno-variadic-macros")
endif ()
+ set_property(TARGET ${test_name} PROPERTY COMPILE_FLAGS "${target_compile_flags}")
endfunction()