Avoid linking both libgomp and libomp in mixed clang/gfortran builds
This commit is contained in:
parent
4adfe4d531
commit
ca121eb5ed
|
@ -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…
Reference in New Issue