From adf8ef5a88e6458d42d5ba8280d4a76b1e4fd313 Mon Sep 17 00:00:00 2001 From: Joseph Macaranas Date: Mon, 27 Oct 2025 15:34:08 -0400 Subject: [PATCH] [ROCm] Custom OpenBLAS library name - TheRock build system for ROCm builds OpenBLAS from source and uses a custom name for the library. - Following existing conventions in `FindOpenBLAS.cmake` to support finding a custom named version of OpenBLAS. --- cmake/Modules/FindOpenBLAS.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/FindOpenBLAS.cmake b/cmake/Modules/FindOpenBLAS.cmake index 69d8227aea53f..c20b003a95fc5 100644 --- a/cmake/Modules/FindOpenBLAS.cmake +++ b/cmake/Modules/FindOpenBLAS.cmake @@ -29,10 +29,15 @@ SET(Open_BLAS_LIB_SEARCH_PATHS $ENV{OpenBLAS}/lib $ENV{OpenBLAS_HOME} $ENV{OpenBLAS_HOME}/lib - ) +) + +SET(Open_BLAS_LIB_NAME openblas) +IF(DEFINED ENV{OpenBLAS_LIB_NAME}) + SET(Open_BLAS_LIB_NAME $ENV{OpenBLAS_LIB_NAME}) +ENDIF() FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS}) -FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS}) +FIND_LIBRARY(OpenBLAS_LIB NAMES ${Open_BLAS_LIB_NAME} PATHS ${Open_BLAS_LIB_SEARCH_PATHS}) SET(OpenBLAS_FOUND ON)