From 582e8a5d4231080827ac07cb4e65d8df74e3a4ed Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 21 Jun 2012 18:44:24 +0000 Subject: [PATCH] Avoid using the recently added APPEND_STRING feature. This should restore support for CMake versions before 2.8.6 -- sorry for the trouble! llvm-svn: 158930 --- llvm/cmake/modules/AddLLVM.cmake | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake index 96246fafe4a1..0236746b28a4 100755 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/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 () - if (SUPPORTS_NO_VARIADIC_MACROS_FLAG) - set_property(TARGET ${test_name} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-variadic-macros") + 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(target_compile_flags "${target_compile_flags} -Wno-variadic-macros") + endif () + set_property(TARGET ${test_name} PROPERTY COMPILE_FLAGS "${target_compile_flags}") endfunction()