From 8f5ff2156d7238e5f083c876e3aea8d775b655dd Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Thu, 7 Mar 2024 01:01:20 +0000 Subject: [PATCH] only use include_directories if OpenMP dirs non-empty --- CMakeLists.txt | 8 ++++++-- niftyreg_build_version.txt | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8556616..b2b72dbf 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,8 +172,12 @@ 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}") + if (OpenMP_CXX_INCLUDE_DIRS) + include_directories("${OpenMP_CXX_INCLUDE_DIRS}") + endif() + if (OpenMP_C_INCLUDE_DIRS) + include_directories("${OpenMP_C_INCLUDE_DIRS}") + endif() endif(NOT OPENMP_FOUND) endif(USE_OPENMP) #----------------------------------------------------------------------------- diff --git a/niftyreg_build_version.txt b/niftyreg_build_version.txt index dd475631..987e7ca9 100644 --- a/niftyreg_build_version.txt +++ b/niftyreg_build_version.txt @@ -1 +1 @@ -76 +77