diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2012-06-21 18:44:24 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2012-06-21 18:44:24 +0000 |
| commit | 582e8a5d4231080827ac07cb4e65d8df74e3a4ed (patch) | |
| tree | 0f3a41d3b712eaa8dd082ec08ee9ed7be781cca6 /llvm/cmake/modules | |
| parent | 45337f53df6552693f6a2f94fa5b1f30e30747b3 (diff) | |
| download | bcm5719-llvm-582e8a5d4231080827ac07cb4e65d8df74e3a4ed.tar.gz bcm5719-llvm-582e8a5d4231080827ac07cb4e65d8df74e3a4ed.zip | |
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
Diffstat (limited to 'llvm/cmake/modules')
| -rwxr-xr-x | llvm/cmake/modules/AddLLVM.cmake | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake index 96246fafe4a..0236746b28a 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 () + 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() |

