summaryrefslogtreecommitdiff
path: root/Tests/FindOpenMP
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2019-10-14 23:56:00 +1100
committerCraig Scott <craig.scott@crascit.com>2019-10-17 18:50:05 +1100
commit409891baf77b909d414add64268d1e5530ff6086 (patch)
tree587aa08383c05e1153a1f603da471650089d09af /Tests/FindOpenMP
parent9150c818b7d2afb868575fcb2e0c9ba62b9d7f85 (diff)
downloadcmake-409891baf77b909d414add64268d1e5530ff6086.tar.gz
FindOpenMP: Allow try_compile() to find omp.h for AppleClang
Fixes: #18098 #18470 #18520
Diffstat (limited to 'Tests/FindOpenMP')
-rw-r--r--Tests/FindOpenMP/Test/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/FindOpenMP/Test/CMakeLists.txt b/Tests/FindOpenMP/Test/CMakeLists.txt
index 2692947ad0..ebdb6b8f94 100644
--- a/Tests/FindOpenMP/Test/CMakeLists.txt
+++ b/Tests/FindOpenMP/Test/CMakeLists.txt
@@ -42,6 +42,7 @@ foreach(c C CXX Fortran)
separate_arguments(_OpenMP_${c}_OPTIONS NATIVE_COMMAND "${OpenMP_${c}_FLAGS}")
target_compile_options(test_var_${c} PRIVATE "${_OpenMP_${c}_OPTIONS}")
target_link_libraries(test_var_${c} PRIVATE "${OpenMP_${c}_FLAGS}")
+ target_include_directories(test_var_${c} PRIVATE ${OpenMP_${c}_INCLUDE_DIRS})
set_property(TARGET test_var_${c} PROPERTY LINKER_LANGUAGE ${c})
add_test(NAME test_var_${c} COMMAND test_var_${c})