diff --git a/CHANGES.md b/CHANGES.md index 9bcc5469..47e74393 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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: diff --git a/SuperBuild.cmake b/SuperBuild.cmake index 31531b68..cee9de0d 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -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. # @@ -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)