[PATCH] D100895: [CMake][llvm] LLVM_DEFINITIONS are a list, not space separated

Jim Radford via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 15:19:28 PDT 2021


radford created this revision.
radford added a reviewer: arphaman.
Herald added a subscriber: mgorny.
radford requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100895

Files:
  llvm/cmake/modules/AddLLVMDefinitions.cmake


Index: llvm/cmake/modules/AddLLVMDefinitions.cmake
===================================================================
--- llvm/cmake/modules/AddLLVMDefinitions.cmake
+++ llvm/cmake/modules/AddLLVMDefinitions.cmake
@@ -6,12 +6,6 @@
 
 macro(add_llvm_definitions)
   # We don't want no semicolons on LLVM_DEFINITIONS:
-  foreach(arg ${ARGN})
-    if(DEFINED LLVM_DEFINITIONS)
-      set(LLVM_DEFINITIONS "${LLVM_DEFINITIONS} ${arg}")
-    else()
-      set(LLVM_DEFINITIONS ${arg})
-    endif()
-  endforeach(arg)
-  add_definitions( ${ARGN} )
+  list(APPEND LLVM_DEFINITIONS ${ARGN})
+  add_definitions(${ARGN})
 endmacro(add_llvm_definitions)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100895.339010.patch
Type: text/x-patch
Size: 644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210420/2abe6d56/attachment.bin>


More information about the llvm-commits mailing list