[llvm-commits] [llvm] r158930 - /llvm/trunk/cmake/modules/AddLLVM.cmake

Chandler Carruth chandlerc at gmail.com
Thu Jun 21 11:44:24 PDT 2012


Author: chandlerc
Date: Thu Jun 21 13:44:24 2012
New Revision: 158930

URL: http://llvm.org/viewvc/llvm-project?rev=158930&view=rev
Log:
Avoid using the recently added APPEND_STRING feature. This should
restore support for CMake versions before 2.8.6 -- sorry for the
trouble!

Modified:
    llvm/trunk/cmake/modules/AddLLVM.cmake

Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=158930&r1=158929&r2=158930&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Thu Jun 21 13:44:24 2012
@@ -181,17 +181,19 @@
 
   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()





More information about the llvm-commits mailing list