Skip to content

Commit 6305267

Browse files
[ROCm] Custom OpenBLAS library name (#2750)
- 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.
1 parent 4b0d5f8 commit 6305267

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cmake/Modules/FindOpenBLAS.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,15 @@ SET(Open_BLAS_LIB_SEARCH_PATHS
2929
$ENV{OpenBLAS}/lib
3030
$ENV{OpenBLAS_HOME}
3131
$ENV{OpenBLAS_HOME}/lib
32-
)
32+
)
33+
34+
SET(Open_BLAS_LIB_NAME openblas)
35+
IF(DEFINED ENV{OpenBLAS_LIB_NAME})
36+
SET(Open_BLAS_LIB_NAME $ENV{OpenBLAS_LIB_NAME})
37+
ENDIF()
3338

3439
FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS})
35-
FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS})
40+
FIND_LIBRARY(OpenBLAS_LIB NAMES ${Open_BLAS_LIB_NAME} PATHS ${Open_BLAS_LIB_SEARCH_PATHS})
3641

3742
SET(OpenBLAS_FOUND ON)
3843

0 commit comments

Comments
 (0)