[libclc] [libclc] use default paths with find_program when possible (PR #105969)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 23 00:53:25 PDT 2024


================
@@ -55,7 +55,7 @@ if( LIBCLC_STANDALONE_BUILD OR CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DI
   # Import required tools
   if( NOT EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} )
     foreach( tool IN ITEMS clang llvm-as llvm-link opt )
-      find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )
+    find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} )
----------------
arsenm wrote:

Why does this need to find any binary? Can't it just use the imported targets from the find_package(LLVM) above?

https://github.com/llvm/llvm-project/pull/105969


More information about the cfe-commits mailing list