Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
23 lines
1.1 KiB
Diff
23 lines
1.1 KiB
Diff
In FHS distros rocm-core expects to be installed colocated with a full set of ROCM packages.
|
|
In nixpkgs contexts, we don't want rocm-core to be a ROCM_PATH root.
|
|
diff --git a/cmake_modules/rocm-core-config.cmake.in b/cmake_modules/rocm-core-config.cmake.in
|
|
index f5fe07c..9d72c9c 100644
|
|
--- a/cmake_modules/rocm-core-config.cmake.in
|
|
+++ b/cmake_modules/rocm-core-config.cmake.in
|
|
@@ -11,7 +11,14 @@ set_and_check(rocm_core_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
|
set_and_check(ROCM_CORE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
|
set_and_check(rocm_core_LIB_DIR "@PACKAGE_LIB_INSTALL_DIR@")
|
|
set_and_check(ROCM_CORE_LIB_DIR "@PACKAGE_LIB_INSTALL_DIR@")
|
|
-set_and_check(ROCM_PATH "${PACKAGE_PREFIX_DIR}")
|
|
+# Set ROCM_PATH with priority: existing value > environment variable > package prefix
|
|
+if(NOT DEFINED ROCM_PATH)
|
|
+ if(DEFINED ENV{ROCM_PATH})
|
|
+ set(ROCM_PATH "$ENV{ROCM_PATH}")
|
|
+ else()
|
|
+ set_and_check(ROCM_PATH "${PACKAGE_PREFIX_DIR}")
|
|
+ endif()
|
|
+endif()
|
|
|
|
get_filename_component(ROCM_CORE_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
include("${ROCM_CORE_CMAKE_DIR}/rocmCoreTargets.cmake")
|