Skip to content

Commit 651ab01

Browse files
authored
Merge pull request #2044 from martin-frbg/issue2043
Fix module definition conflicts between LAPACK and ReLAPACK
2 parents d7b2c53 + e4864a8 commit 651ab01

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ endif ()
7575

7676
set(SUBDIRS ${BLASDIRS})
7777
if (NOT NO_LAPACK)
78-
list(APPEND SUBDIRS lapack)
7978
if(BUILD_RELAPACK)
8079
list(APPEND SUBDIRS relapack/src)
8180
endif()
81+
list(APPEND SUBDIRS lapack)
8282
endif ()
8383

8484
# set which float types we want to build for
@@ -224,6 +224,14 @@ set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES
224224
SOVERSION ${OpenBLAS_MAJOR_VERSION}
225225
)
226226

227+
if (BUILD_SHARED_LIBS AND BUILD_RELAPACK)
228+
if (NOT MSVC)
229+
target_link_libraries(${OpenBLAS_LIBNAME} "-Wl,-allow-multiple-definition")
230+
else()
231+
target_link_libraries(${OpenBLAS_LIBNAME} "/FORCE:MULTIPLE")
232+
endif()
233+
endif()
234+
227235
if (BUILD_SHARED_LIBS AND NOT ${SYMBOLPREFIX}${SYMBOLSUFIX} STREQUAL "")
228236
if (NOT DEFINED ARCH)
229237
set(ARCH_IN "x86_64")

0 commit comments

Comments
 (0)