Skip to content

Commit 9c1d22f

Browse files
authored
Merge pull request #26 from CD3/devel
chore: make OpenMP optional for unit tests.
2 parents c098443 + c06cebe commit 9c1d22f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testing/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.16)
22

33
find_package(GSL)
4-
find_package(OpenMP REQUIRED)
4+
find_package(OpenMP)
55
find_package(Catch2 REQUIRED)
66
# Find all sources.
77
file(
@@ -20,7 +20,7 @@ add_executable(${testName} ${unitTest_SOURCES})
2020
target_compile_definitions(
2121
${testName} PRIVATE TESTING $<$<TARGET_EXISTS:GSL::gsl>:HAVE_GSL>)
2222
target_link_libraries(${testName} Interpolate
23-
$<$<TARGET_EXISTS:GSL::gsl>:GSL::gsl> OpenMP::OpenMP_CXX Catch2::Catch2WithMain)
23+
$<$<TARGET_EXISTS:GSL::gsl>:GSL::gsl> $<$<TARGET_EXISTS:OpenMP::OpenMP_CXX>:OpenMP::OpenMP_CXX> Catch2::Catch2WithMain)
2424
set_target_properties(${testName} PROPERTIES CXX_STANDARD 17)
2525
if(MSVC)
2626
target_compile_options(${testName} PRIVATE /W4 -wd4996)

0 commit comments

Comments
 (0)