Fix use of add_llvm_tool in projects that build no targets
authorKevin Petit <kevin.petit@arm.com>
Wed, 13 Nov 2019 09:29:10 +0000 (09:29 +0000)
committerKevin Petit <kevin.petit@arm.com>
Thu, 14 Nov 2019 10:53:46 +0000 (10:53 +0000)
commite73177ea5fd611026abcbaecc6232eee8d8d2ed8
treebed9c6f74ecbe8bc74a6aa52fb47f197401ad28b
parent4c9d0da8382f176a2fb7b97298932a53d22e8627
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>
llvm/cmake/modules/LLVM-Config.cmake