[NFC][libclc] Add missing evaluation for variable ${tool}_target (#163540)

The variabls should be evaluated before checking for empty.
This commit is contained in:
Wenju He
2025-10-16 09:40:09 +08:00
committed by GitHub
parent 082efbaac1
commit 754ebc6ebb

View File

@@ -124,7 +124,7 @@ if( EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} )
endif()
foreach( tool IN ITEMS clang opt llvm-as llvm-link )
if( NOT EXISTS "${${tool}_exe}" AND "${tool}_target" STREQUAL "" )
if( NOT EXISTS "${${tool}_exe}" AND "${${tool}_target}" STREQUAL "" )
message( FATAL_ERROR "libclc toolchain incomplete - missing tool ${tool}!" )
endif()
endforeach()