File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -211,6 +211,16 @@ if(NOT MSVC)
211211 list (APPEND _abacus_linalg_libs m)
212212endif ()
213213
214+ # The mtblas archives bundle their own OpenBLAS objects. They must come after
215+ # the standalone BLAS/LAPACK/ScaLAPACK above so that the linker resolves the
216+ # BLAS symbols from the standalone BLAS instead of the bundled copy.
217+ if (USE_DSP)
218+ list (APPEND _abacus_linalg_libs
219+ ${MTBLAS_FFT_DIR} /libmtblas/lib/libmtblas.a
220+ ${MTBLAS_FFT_DIR} /libmtblas/lib/libmtblasdev.a
221+ ${MTBLAS_FFT_DIR} /libmtblas/lib/libmtfft.a)
222+ endif ()
223+
214224target_link_libraries (abacus_linalg_libs INTERFACE ${_abacus_linalg_libs} )
215225target_include_directories (abacus_linalg_libs INTERFACE ${_abacus_linalg_include_dirs} )
216226
Original file line number Diff line number Diff line change @@ -88,10 +88,6 @@ add_library(
8888)
8989
9090target_link_libraries (base PUBLIC container )
91- if (USE_DSP)
92- target_link_libraries (base PUBLIC ${MTBLAS_FFT_DIR} /libmtblas/lib/libmtblas.a )
93- target_link_libraries (base PUBLIC ${MTBLAS_FFT_DIR} /libmtblas/lib/libmtblasdev.a )
94- endif ()
9591add_subdirectory (module_container )
9692
9793if (ENABLE_COVERAGE)
Original file line number Diff line number Diff line change @@ -44,10 +44,8 @@ add_library(
4444)
4545
4646if (USE_DSP)
47- target_link_libraries (planewave PRIVATE
48- ${MTBLAS_FFT_DIR} /libmtblas/lib/libmtfft.a )
49- target_compile_definitions ( planewave PUBLIC
50- FFT_DAT_DIR= "${MTBLAS_FFT_DIR} /datfile/mt_fft_blas.dat" )
47+ target_compile_definitions ( planewave PUBLIC
48+ FFT_DAT_DIR= "${MTBLAS_FFT_DIR} /datfile/mt_fft_blas.dat" )
5149endif ()
5250if (ENABLE_COVERAGE)
5351 add_coverage (planewave )
You can’t perform that action at this time.
0 commit comments