Browse Source

Link OpenMP clang+gfortran build with -lomp

pull/4469/head
Martin Kroeker GitHub 2 years ago
parent
commit
a75dac6401
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      ctest/CMakeLists.txt

+ 9
- 0
ctest/CMakeLists.txt View File

@@ -43,6 +43,9 @@ endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
target_link_libraries(x${float_char}cblat1 m)
endif()
if (USE_OPENMP AND CMAKE_Fortran_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_ID STREQUAL CLANG)
target_link_libraries(${test_bin} omp)
endif()
add_test(NAME "x${float_char}cblat1"
COMMAND $<TARGET_FILE:x${float_char}cblat1>)

@@ -68,6 +71,9 @@ endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
target_link_libraries(x${float_char}cblat2 m)
endif()
if (USE_OPENMP AND CMAKE_Fortran_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_ID STREQUAL CLANG)
target_link_libraries(${test_bin} omp)
endif()
add_test(NAME "x${float_char}cblat2"
COMMAND ${test_helper} $<TARGET_FILE:x${float_char}cblat2> "${PROJECT_SOURCE_DIR}/ctest/${float_char}in2")

@@ -93,6 +99,9 @@ endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
target_link_libraries(x${float_char}cblat3 m)
endif()
if (USE_OPENMP AND CMAKE_Fortran_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_ID STREQUAL CLANG)
target_link_libraries(${test_bin} omp)
endif()
add_test(NAME "x${float_char}cblat3"
COMMAND ${test_helper} $<TARGET_FILE:x${float_char}cblat3> "${PROJECT_SOURCE_DIR}/ctest/${float_char}in3")



Loading…
Cancel
Save