[PATCH] D100894: [CMake][llvm] Using -D in COMPILE_DEFINITIONS can create a lone -D w/generator-expressions
Jim Radford via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 20 15:15:18 PDT 2021
radford created this revision.
radford added reviewers: arphaman, sepavloff.
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/D100894
Files:
llvm/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -1117,14 +1117,7 @@
function(get_compile_definitions)
get_directory_property(top_dir_definitions DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
- foreach(definition ${top_dir_definitions})
- if(DEFINED result)
- string(APPEND result " -D${definition}")
- else()
- set(result "-D${definition}")
- endif()
- endforeach()
- set(LLVM_DEFINITIONS "${result}" PARENT_SCOPE)
+ set(LLVM_DEFINITIONS "${top_dir_definitions}" PARENT_SCOPE)
endfunction()
get_compile_definitions()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100894.339008.patch
Type: text/x-patch
Size: 722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210420/69897081/attachment.bin>
More information about the llvm-commits
mailing list