summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
diff options
context:
space:
mode:
authorKevin Petit <kevin.petit@arm.com>2019-11-13 09:29:10 +0000
committerKevin Petit <kevin.petit@arm.com>2019-11-14 10:53:46 +0000
commite73177ea5fd611026abcbaecc6232eee8d8d2ed8 (patch)
treebed9c6f74ecbe8bc74a6aa52fb47f197401ad28b /llvm/cmake/modules
parent4c9d0da8382f176a2fb7b97298932a53d22e8627 (diff)
downloadbcm5719-llvm-e73177ea5fd611026abcbaecc6232eee8d8d2ed8.tar.gz
bcm5719-llvm-e73177ea5fd611026abcbaecc6232eee8d8d2ed8.zip
Fix use of add_llvm_tool in projects that build no targets
Projects that set LLVM_TARGETS_TO_BUILD to an empty list can't use add_llvm_tool (and probably other macros). Here's the error that this change fixes: list sub-command REMOVE_ITEM requires two or more arguments. https://reviews.llvm.org/D70167 Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Diffstat (limited to 'llvm/cmake/modules')
-rw-r--r--llvm/cmake/modules/LLVM-Config.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/cmake/modules/LLVM-Config.cmake b/llvm/cmake/modules/LLVM-Config.cmake
index 49dbac6b466..fd50ca6aae1 100644
--- a/llvm/cmake/modules/LLVM-Config.cmake
+++ b/llvm/cmake/modules/LLVM-Config.cmake
@@ -28,7 +28,7 @@ function(is_llvm_target_library library return_var)
string(TOUPPER "${LLVM_TARGETS_TO_BUILD}" targets)
elseif(ARG_OMITTED_TARGETS)
set(omitted_targets ${LLVM_ALL_TARGETS})
- list(REMOVE_ITEM omitted_targets ${LLVM_TARGETS_TO_BUILD})
+ list(REMOVE_ITEM omitted_targets "${LLVM_TARGETS_TO_BUILD}")
string(TOUPPER "${omitted_targets}" targets)
else()
string(TOUPPER "${LLVM_ALL_TARGETS}" targets)
OpenPOWER on IntegriCloud