From 6f7fcaaed81381aea260df5f5e6627e0047bba7f Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Tue, 9 Jul 2024 10:59:07 +0200 Subject: [PATCH] PERF: Remove OpenMP specific CMake code - Following pull request https://github.com/SuperElastix/elastix/pull/1188 "Remove OpenMP based code, ELASTIX_USE_OPENMP option and OpenMP compiler flags" --- CMakeLists.txt | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 137c1a5..21129d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,11 +28,6 @@ if(NOT DEFINED USE_KNNGraphAlphaMutualInformationMetric) set(USE_KNNGraphAlphaMutualInformationMetric OFF CACHE BOOL "Use KNN metric. Requires ANN library.") endif() -if(CMAKE_COMPILER_IS_GNUCXX AND - ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_EQUAL "4.8") OR - ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.8" AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "5.0") ) - set(ELASTIX_USE_OPENMP OFF CACHE BOOL "Use OpenMP in elastix") -endif() if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-aggressive-loop-optimizations") endif() @@ -61,7 +56,6 @@ if(SKBUILD) endif() if(WASI OR EMSCRIPTEN) - option(ELASTIX_USE_OPENMP "OpenMP not supported on WASI or Emscripten" OFF) option(ELASTIX_NO_INSTALL_EXECUTABLES "Do not install executables" ON) endif() @@ -91,17 +85,6 @@ find_package(Elastix REQUIRED) include_directories( ${ELASTIX_INCLUDE_DIRS} ) link_directories( ${ELASTIX_LIBRARY_DIRS} ) #include(${ELASTIX_USE_FILE}) -if(ELASTIX_USE_OPENMP) - find_package(OpenMP QUIET) - if(OPENMP_FOUND) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${OpenMP_SHARED_LINKER_FLAGS}") - set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${OpenMP_STATIC_LINKER_FLAGS}") - add_definitions(-DELASTIX_USE_OPENMP) - endif() -endif() if(ELASTIX_USE_OPENCL) add_definitions(-DELASTIX_USE_OPENCL) endif()