Skip to content

Commit

Permalink
fix:test::gtest helpers: Pass OpenMP when required
Browse files Browse the repository at this point in the history
  • Loading branch information
tcojean committed May 29, 2024
1 parent cf82703 commit db63a9a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/test/gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ function(add_gtest_main suffix definitions)
target_compile_definitions(ginkgo_gtest_main_mpi${suffix} PRIVATE ${definitions})
ginkgo_compile_features(ginkgo_gtest_main_mpi${suffix})
endif()
if (GINKGO_BUILD_OMP)
target_link_libraries(ginkgo_gtest_main${suffix} PUBLIC OpenMP::OpenMP_CXX)
if (GINKGO_BUILD_MPI)
target_link_libraries(ginkgo_gtest_main_mpi${suffix} PUBLIC OpenMP::OpenMP_CXX)
endif()
endif()
endfunction()

add_gtest_main("" "")
Expand Down

0 comments on commit db63a9a

Please sign in to comment.