File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ option(USE_PERL "Use the older PERL scripts for build preparation instead of uni
40
40
41
41
option (NO_WARMUP "Do not run a benchmark on each startup just to find the best location for the memory buffer" ON )
42
42
43
+ option (FIXED_LIBNAME "Use a non-versioned name for the library and no symbolic linking to variant names" OFF )
44
+
45
+ set (LIBNAMEPREFIX "" CACHE STRING "Add a prefix to the openblas part of the library name" )
46
+ set (LIBNAMESUFFIX "" CACHE STRING "Add a suffix after the openblas part of the library name" )
47
+
43
48
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
44
49
option (NO_AFFINITY "Disable support for CPU affinity masks to avoid binding processes from e.g. R or numpy/scipy to a single core" ON )
45
50
else ()
@@ -96,7 +101,7 @@ message(WARNING "CMake support is experimental. It does not yet support all buil
96
101
include ("${PROJECT_SOURCE_DIR} /cmake/utils.cmake" )
97
102
include ("${PROJECT_SOURCE_DIR} /cmake/system.cmake" )
98
103
99
- set (OpenBLAS_LIBNAME openblas${SUFFIX64_UNDERSCORE} )
104
+ set (OpenBLAS_LIBNAME ${LIBNAMEPREFIX} openblas${LIBNAMESUFFIX} ${SUFFIX64_UNDERSCORE} )
100
105
101
106
set (BLASDIRS interface driver/level2 driver/level3 driver/others )
102
107
@@ -336,11 +341,12 @@ endif()
336
341
add_subdirectory (cpp_thread_test )
337
342
endif ()
338
343
344
+ if (NOT FIXED_LIBNAME )
339
345
set_target_properties (${OpenBLAS_LIBS} PROPERTIES
340
346
VERSION ${OpenBLAS_MAJOR_VERSION} .${OpenBLAS_MINOR_VERSION}
341
347
SOVERSION ${OpenBLAS_MAJOR_VERSION}
342
348
)
343
-
349
+ endif ()
344
350
if (BUILD_SHARED_LIBS AND BUILD_RELAPACK )
345
351
if (NOT MSVC )
346
352
target_link_libraries (${OpenBLAS_LIBNAME} _shared "-Wl,-allow-multiple-definition" )
You can’t perform that action at this time.
0 commit comments