[libclc] [libclc] use default paths with find_program when possible (PR #105969)
Tristan Ross via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 15 20:42:15 PDT 2024
https://github.com/RossComputerGuy updated https://github.com/llvm/llvm-project/pull/105969
>From 056e0f9b7c7b788ad0d85a1479000fd1af4f98ce Mon Sep 17 00:00:00 2001
From: Tristan Ross <tristan.ross at midstall.com>
Date: Sat, 24 Aug 2024 19:56:24 -0700
Subject: [PATCH] [libclc] use default paths with find_program when possible
---
libclc/CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 1bf7eb2ca7ed7e..2b3a4e6a6c1043 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -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} )
set( ${tool}_exe ${LLVM_TOOL_${tool}} )
set( ${tool}_target )
endforeach()
@@ -91,7 +91,7 @@ if( EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} )
# and custom tools.
foreach( tool IN ITEMS clang llvm-as llvm-link opt )
find_program( LLVM_CUSTOM_TOOL_${tool} ${tool}
- PATHS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )
+ PATHS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} )
set( ${tool}_exe ${LLVM_CUSTOM_TOOL_${tool}} )
set( ${tool}_target )
endforeach()
@@ -108,7 +108,7 @@ endforeach()
if( TARGET llvm-spirv )
get_host_tool_path( llvm-spirv LLVM_SPIRV llvm-spirv_exe llvm-spirv_target )
else()
- find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )
+ find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_TOOLS_BINARY_DIR} )
set( llvm-spirv_exe "${LLVM_SPIRV}" )
set( llvm-spirv_target )
endif()
More information about the cfe-commits
mailing list