From 36ab47d0207b693a0d482f807833158f23fc4462 Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Mon, 4 Mar 2024 18:18:26 +0000 Subject: [PATCH] Add include_directories for OpenMP This is needed on systems (such as clang on MacOS) that use non-standard locations of `omp.h`. Fixes https://github.com/KCL-BMEIS/niftyreg/issues/109 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a510dbe3..c8556616 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,6 +172,8 @@ if(USE_OPENMP) message(STATUS "Found OpenMP") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + include_directories("${OpenMP_CXX_INCLUDE_DIRS}") + include_directories("${OpenMP_C_INCLUDE_DIRS}") endif(NOT OPENMP_FOUND) endif(USE_OPENMP) #----------------------------------------------------------------------------- @@ -226,4 +228,4 @@ if(DOXYGEN_FOUND) ) message(STATUS "Found doxygen") endif(DOXYGEN_FOUND) -#----------------------------------------------------------------------------- \ No newline at end of file +#-----------------------------------------------------------------------------