Skip to content

Commit

Permalink
STYLE: Remove unused ELASTIX_USE_OPENMP option and OpenMP compiler flags
Browse files Browse the repository at this point in the history
The use of OpenMP was merely experimental and was switched off already in C++ code.
  • Loading branch information
N-Dekker committed Jul 8, 2024
1 parent 87e17b0 commit 5a24bb9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
17 changes: 0 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,6 @@ if(ELASTIX_USE_EIGEN)
add_definitions(-DELASTIX_USE_EIGEN)
endif()

#---------------------------------------------------------------------
# Find OpenMP
mark_as_advanced(ELASTIX_USE_OPENMP)
option(ELASTIX_USE_OPENMP "Use OpenMP to speed up certain computations." ON)

if(ELASTIX_USE_OPENMP)
find_package(OpenMP QUIET)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}
# ${OpenMP_EXE_LINKER_FLAGS}")
include_directories(${OpenMP_CXX_INCLUDE_DIRS})
link_libraries(${OpenMP_CXX_LIBRARIES})
add_definitions(-DELASTIX_USE_OPENMP)
endif()
endif()

#---------------------------------------------------------------------
# Set single (build-tree) output directories for all executables and libraries.
# This makes it easier to create an elxUseFile.cmake, that users can
Expand Down
6 changes: 0 additions & 6 deletions dox/externalproject/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ cmake_minimum_required(VERSION 3.16.3)

find_package(Elastix REQUIRED)

# Elastix might use OpenMP.
find_package(OpenMP QUIET)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()

# Use the version of ITK from Elastix.
if ( DEFINED ELASTIX_ITK_DIR)
set(ITK_DIR "${ELASTIX_ITK_DIR}" CACHE PATH "ITK_DIR from Elastix" FORCE)
Expand Down

0 comments on commit 5a24bb9

Please sign in to comment.