gentoo-ebuilds/sci-libs/hipSOLVER/files/hipSOLVER-6.4.1-find-cholmod.patch
Sv. Lockal 0be66c62f8
sci-libs/hipSOLVER: add 6.4.1
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42554
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-14 23:37:06 +01:00

32 lines
1.1 KiB
Diff

Gentoo install cholmod.h into /usr/include directly and uses PkgConfig
--- a/library/src/CMakeLists.txt
+++ b/library/src/CMakeLists.txt
@@ -153,14 +153,10 @@ if(NOT USE_CUDA)
list(APPEND static_depends PACKAGE rocsparse)
endif()
- find_package(CHOLMOD QUIET)
- if(NOT TARGET SuiteSparse::CHOLMOD)
- # try again with the custom find modules for older versions of suitesparse
- list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/suitesparse)
- find_package(CHOLMOD REQUIRED)
- endif()
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(CHOLMOD REQUIRED IMPORTED_TARGET cholmod)
- target_link_libraries( hipsolver PRIVATE roc::rocsparse SuiteSparse::CHOLMOD)
+ target_link_libraries( hipsolver PRIVATE roc::rocsparse PkgConfig::CHOLMOD)
set_source_files_properties(${hipsolver_source}
PROPERTIES
COMPILE_DEFINITIONS HAVE_ROCSPARSE
--- a/library/src/amd_detail/dlopen/cholmod.hpp
+++ b/library/src/amd_detail/dlopen/cholmod.hpp
@@ -24,7 +24,7 @@
#include "lib_macros.hpp"
#ifdef HAVE_ROCSPARSE
-#include <suitesparse/cholmod.h>
+#include <cholmod.h>
#else
// constants