Browse Source

Avoid linking both libgomp and libomp in mixed clang/gfortran builds

tags/v0.3.27
Martin Kroeker GitHub 1 year ago
parent
commit
ca121eb5ed
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      lapack-netlib/TESTING/EIG/CMakeLists.txt

+ 4
- 0
lapack-netlib/TESTING/EIG/CMakeLists.txt 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()



Loading…
Cancel
Save