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
4040
4141option (NO_WARMUP "Do not run a benchmark on each startup just to find the best location for the memory buffer" ON )
4242
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+
4348if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
4449 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 )
4550else ()
@@ -96,7 +101,7 @@ message(WARNING "CMake support is experimental. It does not yet support all buil
96101include ("${PROJECT_SOURCE_DIR} /cmake/utils.cmake" )
97102include ("${PROJECT_SOURCE_DIR} /cmake/system.cmake" )
98103
99- set (OpenBLAS_LIBNAME openblas${SUFFIX64_UNDERSCORE} )
104+ set (OpenBLAS_LIBNAME ${LIBNAMEPREFIX} openblas${LIBNAMESUFFIX} ${SUFFIX64_UNDERSCORE} )
100105
101106set (BLASDIRS interface driver/level2 driver/level3 driver/others)
102107
@@ -336,11 +341,12 @@ endif()
336341 add_subdirectory (cpp_thread_test)
337342 endif ()
338343
344+ if (NOT FIXED_LIBNAME)
339345set_target_properties (${OpenBLAS_LIBS} PROPERTIES
340346 VERSION ${OpenBLAS_MAJOR_VERSION} .${OpenBLAS_MINOR_VERSION}
341347 SOVERSION ${OpenBLAS_MAJOR_VERSION}
342348)
343-
349+ endif ()
344350if (BUILD_SHARED_LIBS AND BUILD_RELAPACK)
345351 if (NOT MSVC )
346352 target_link_libraries (${OpenBLAS_LIBNAME} _shared "-Wl,-allow-multiple-definition" )
You can’t perform that action at this time.
0 commit comments