Skip to content

Commit

Permalink
only use include_directories if OpenMP dirs non-empty
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Mar 7, 2024
1 parent 36ab47d commit 8f5ff21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
#-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion niftyreg_build_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
76
77

0 comments on commit 8f5ff21

Please sign in to comment.