From ba4ea7bb07b7cc07b95577916018401a81946dcd Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Fri, 16 Feb 2024 15:41:46 +0100 Subject: [PATCH] Link OpenMP clang+gfortran builds with libomp --- test/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d68b12d87..33bc7771c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -25,6 +25,13 @@ endif() foreach(test_bin ${OpenBLAS_Tests}) add_executable(${test_bin} ${test_bin}.f) target_link_libraries(${test_bin} ${OpenBLAS_LIBNAME}) +if (USE_OPENMP) +if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU) +if (CMAKE_C_COMPILER_ID STREQUAL CLANG) +target_link_libraries(${test_bin} omp) +endif() +endif() +endif() endforeach() # $1 exec, $2 input, $3 output_result