Skip to content

Commit dc74c69

Browse files
committed
[libclc] Provide a more helpful error when tools are missing
1 parent 0aeeff3 commit dc74c69

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

libclc/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ if( EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} )
9494
endforeach()
9595
endif()
9696

97-
if( NOT TARGET libclc::clang OR NOT TARGET libclc::opt
98-
OR NOT TARGET libclc::llvm-as OR NOT TARGET libclc::llvm-link )
99-
message( FATAL_ERROR "libclc toolchain incomplete!" )
100-
endif()
97+
foreach( tool IN ITEMS clang opt llvm-as llvm-link )
98+
if( NOT TARGET libclc::${tool} )
99+
message( FATAL_ERROR "libclc toolchain incomplete - missing tool ${tool}!" )
100+
endif()
101+
endforeach()
101102

102103
# llvm-spirv is an optional dependency, used to build spirv-* targets.
103104
find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )

0 commit comments

Comments
 (0)