Update CMakeLists.txt

This commit is contained in:
Martin Kroeker 2024-02-20 23:38:29 +01:00 committed by GitHub
parent c0b1fdd83c
commit 03fc5623fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,10 @@ set(ZDMDEIGTST zchkdmd.f90)
macro(add_eig_executable name)
add_executable(${name} ${ARGN})
target_link_libraries(${name} openblas${SUFFIX64_UNDERSCORE})
if (USE_OPENMP AND (${CMAKE_Fortran_COMPILER_ID} STREQUAL GNU) AND (${CMAKE_C_COMPILER_ID} STREQUAL Clang))
string(REGEX REPLACE "-fopenmp" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
target_link_libraries(${name} omp pthread)
endif()
#${TMGLIB} ../${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
endmacro()