[PATCH] D58745: [CMake][libunwind] Define add_target_flags which is missing

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 28 13:38:18 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL355142: [CMake][libunwind] Define add_target_flags which is missing (authored by phosek, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D58745?vs=188643&id=188784#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58745/new/

https://reviews.llvm.org/D58745

Files:
  libunwind/trunk/CMakeLists.txt


Index: libunwind/trunk/CMakeLists.txt
===================================================================
--- libunwind/trunk/CMakeLists.txt
+++ libunwind/trunk/CMakeLists.txt
@@ -214,12 +214,18 @@
   endif()
 endmacro()
 
-macro(add_target_flags_if condition var)
+macro(add_target_flags)
+  foreach(value ${ARGN})
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${value}")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${value}")
+    list(APPEND LIBUNWIND_COMPILE_FLAGS ${value})
+    list(APPEND LIBUNWIND_LINK_FLAGS ${value})
+  endforeach()
+endmacro()
+
+macro(add_target_flags_if condition)
   if (${condition})
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${var}")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${var}")
-    list(APPEND LIBUNWIND_COMPILE_FLAGS ${var})
-    list(APPEND LIBUNWIND_LINK_FLAGS ${var})
+    add_target_flags(${ARGN})
   endif()
 endmacro()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58745.188784.patch
Type: text/x-patch
Size: 867 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190228/2b274eab/attachment.bin>


More information about the llvm-commits mailing list