Skip to content

Commit

Permalink
Merge pull request #879 from KrisThielemans/OpemMP_fix2
Browse files Browse the repository at this point in the history
pass through OpenMP_iomp_LIBRARY
  • Loading branch information
KrisThielemans authored Mar 23, 2024
2 parents 89be7c4 + bf564dc commit 276813f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ChangeLog

## vx.x.x

- CMake:
- only pass through `OpenMP*LIBRARY` variables if set, and add OpenMP_iomp_LIBRARY to the list (for Intel compiler)

## v3.6.0
- build the STIR native Python interface by default (STIR_BUILD_SWIG_PYTHON=ON). You can still switch this off.
- docker image updates:
Expand Down
28 changes: 14 additions & 14 deletions SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Author: Edoardo Pasca
# Author: Casper da Costa-Luis
# Author: Kris Thielemans
# Copyright 2017-2021 University College London
# Copyright 2017-2020 Science Technology Facilities Council
# Copyright 2017-2024 University College London
# Copyright 2017-2023 Science Technology Facilities Council
#
# This file is part of the CCP SyneRBI Synergistic Image Reconstruction Framework (SIRF) SuperBuild.
#
Expand Down Expand Up @@ -224,19 +224,19 @@ if (NOT DISABLE_OpenMP)
message(STATUS "OpenMP found, support enabled. If you get compiler errors saying \"omp.h not found\", set the following CMake variables: OpenMP_CXX_INCLUDE_DIR, OpenMP_C_INCLUDE_DIR. For linking errors, check other \"OpenMP\*\" CMake variables as well.")

mark_as_superbuild(ALL_PROJECTS VARS
OpenMP_CXX_FLAGS:STRING OpenMP_CXX_LIB_NAMES:STRING OpenMP_C_FLAGS:STRING
OpenMP_C_LIB_NAMES:STRING OpenMP_CXX_FLAGS:STRING OpenMP_CXX_LIB_NAMES:STRING
OpenMP_libomp_LIBRARY:FILEPATH OpenMP_omp_LIBRARY:FILEPATH
OpenMP_gomp_LIBRARY:FILEPATH OpenMP_pthread_LIBRARY:FILEPATH
OpenMP_CXX_FLAGS:STRING OpenMP_C_FLAGS:STRING
OpenMP_C_LIB_NAMES:STRING OpenMP_CXX_LIB_NAMES:STRING
)
if (OpenMP_CXX_INCLUDE_DIR)
mark_as_superbuild(ALL_PROJECTS VARS
OpenMP_CXX_INCLUDE_DIR:PATH)
endif()
if (OpenMP_C_INCLUDE_DIR)
mark_as_superbuild(ALL_PROJECTS VARS
OpenMP_C_INCLUDE_DIR:PATH)
endif()
foreach (lib in OpenMP_libomp_LIBRARY OpenMP_omp_LIBRARY OpenMP_gomp_LIBRARY OpenMP_iomp_LIBRARY OpenMP_pthread_LIBRARY)
if (${lib})
mark_as_superbuild(ALL_PROJECTS VARS ${lib}:FILEPATH)
endif()
endforeach()
foreach (path in OpenMP_CXX_INCLUDE_DIR OpenMP_C_INCLUDE_DIR)
if (${path})
mark_as_superbuild(ALL_PROJECTS VARS ${path}:PATH)
endif()
endforeach()
else()
MESSAGE(STATUS "OpenMP not found, support disabled")
SET(DISABLE_OpenMP ON CACHE BOOL "Disable OpenMP support for dependencies" FORCE)
Expand Down

0 comments on commit 276813f

Please sign in to comment.