Index: openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake =================================================================== --- openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake +++ openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake @@ -128,7 +128,12 @@ # Looking for AMD GPUs... ################################################################################ -find_program(LIBOMPTARGET_AMDGPU_ARCH NAMES amdgpu-arch PATHS ${LLVM_BINARY_DIR}/bin) +if(TARGET amdgpu-arch) + set(LIBOMPTARGET_AMDGPU_ARCH $) +else() + find_program(LIBOMPTARGET_AMDGPU_ARCH NAMES amdgpu-arch PATHS ${LLVM_BINARY_DIR}/bin) +endif() + if(LIBOMPTARGET_AMDGPU_ARCH) execute_process(COMMAND ${LIBOMPTARGET_AMDGPU_ARCH} OUTPUT_VARIABLE LIBOMPTARGET_AMDGPU_ARCH_OUTPUT