From d0a18e0eb9c19637bff1afbf924967e98e54cc88 Mon Sep 17 00:00:00 2001 From: "systems-assistant[bot]" <221163467+systems-assistant[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 09:13:45 -0400 Subject: [PATCH] [cmake] - Update search for LibElf (#256) There is an issue with TheRock build currently. They have a local source build of elfutils they want to use instead of a system package. Currently, rocr uses it's own FindLibElf.cmake module and this is inhibiting the build from finding the libelf config built by TheRock. Now we will first search in config mode and fallback to module mode if nothing is found. Authored-by: Ethan Stewart Co-authored-by: systems-assistant[bot] --- projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt b/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt index 4c45bd6bec..40f75ee35d 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt +++ b/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt @@ -85,6 +85,11 @@ endif() # if (ROCM_CCACHE_BUILD) find_package(PkgConfig) find_package(LibElf REQUIRED) +find_package(LibElf CONFIG) +if(NOT LibElf_FOUND) + find_package(LibElf REQUIRED) +endif() + pkg_check_modules(drm REQUIRED IMPORTED_TARGET libdrm) ## Create the rocr target.