aboutsummaryrefslogtreecommitdiff
path: root/libclc
diff options
context:
space:
mode:
authorFraser Cormack <fraser@codeplay.com>2024-04-16 16:53:18 +0100
committerFraser Cormack <fraser@codeplay.com>2024-04-18 07:01:13 +0100
commitdc74c69f016fa65949bf0cf691061e12bef93d29 (patch)
tree5b63ed76e2e6ecda551e50c700532ed3ffbdd294 /libclc
parent0aeeff3059e79b86f55ed92a4488bdee8fa66e12 (diff)
downloadllvm-dc74c69f016fa65949bf0cf691061e12bef93d29.zip
llvm-dc74c69f016fa65949bf0cf691061e12bef93d29.tar.gz
llvm-dc74c69f016fa65949bf0cf691061e12bef93d29.tar.bz2
[libclc] Provide a more helpful error when tools are missing
Diffstat (limited to 'libclc')
-rw-r--r--libclc/CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index b0c29ed..5ce1795 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -94,10 +94,11 @@ if( EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} )
endforeach()
endif()
-if( NOT TARGET libclc::clang OR NOT TARGET libclc::opt
- OR NOT TARGET libclc::llvm-as OR NOT TARGET libclc::llvm-link )
- message( FATAL_ERROR "libclc toolchain incomplete!" )
-endif()
+foreach( tool IN ITEMS clang opt llvm-as llvm-link )
+ if( NOT TARGET libclc::${tool} )
+ message( FATAL_ERROR "libclc toolchain incomplete - missing tool ${tool}!" )
+ endif()
+endforeach()
# llvm-spirv is an optional dependency, used to build spirv-* targets.
find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )