Skip to content

Commit

Permalink
Merge branch 'master' into removeGMP
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoeurjo authored Dec 28, 2024
2 parents b6f97e9 + cdccf7a commit e33daad
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 81 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/deps)


set(DGtal_VERSION_MAJOR 1)
set(DGtal_VERSION_MINOR 5)
set(DGtal_VERSION_PATCH beta)
set(DGtal_VERSION_MINOR 4)
set(DGtal_VERSION_PATCH 2)
set(DGTAL_VERSION "${DGtal_VERSION_MAJOR}.${DGtal_VERSION_MINOR}.${DGtal_VERSION_PATCH}")
set(PROJECT_VERSION "${DGtal_VERSION_MAJOR}.${DGtal_VERSION_MINOR}.${DGtal_VERSION_PATCH}")
set(VERSION ${DGtal_VERSION_MAJOR}.${DGtal_VERSION_MINOR}.${DGtal_VERSION_PATCH})
Expand Down
9 changes: 4 additions & 5 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DGtal 1.5beta
# DGtal 1.4.2

## New features

Expand All @@ -9,13 +9,12 @@

- *General*
- Upgrade of polyscope version in examples from 1.2.0 to 2.3.0 (David Coeurjolly, [#1743](https://github.com/DGtal-team/DGtal/pull/1743))
- Fixing cmake CGAL 6.0 breaking change. (David Coeurjolly, [#1745](https://github.com/DGtal-team/DGtal/pull/1745))
- Adding a new `DGTAL_REMOVE_UNINSTALL` cmake option to disable the `uninstall` target. (David Coeurjolly, [#1746](https://github.com/DGtal-team/DGtal/pull/1746)
- Using the `dcoeurjo/GeometryProcessing-cmake-recipes` openmp recipe to detect openmp (David Coeurjolly, [#1750](https://github.com/DGtal-team/DGtal/pull/1750))

## Bug fixes

- *General*
- Fix cmake CGAL 6.0 Breaking change. (David Coeurjolly, [#1745](https://github.com/DGtal-team/DGtal/pull/1745))
- Adding a new `DGTAL_REMOVE_UNINSTALL` cmake option to disable the `uninstall` target. (David Coeurjolly, [#1746](https://github.com/DGtal-team/DGtal/pull/1746)

- *Geometry*
- Bug fix in ArithmeticalDSSComputerOnSurfels (Tristan Roussillon, [#1742](https://github.com/DGtal-team/DGtal/pull/1742))

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Main website: [https://dgtal.org](https://dgtal.org)

[![CI (linux/macOS), master](https://github.com/DGtal-team/DGtal/actions/workflows/build-master.yml/badge.svg)](https://github.com/DGtal-team/DGtal/actions/workflows/build-master.yml)
[![CI (linux/macOS), master](https://github.com/DGtal-team/DGtal/actions/workflows/build-master.yml/badge.svg)](https://github.com/DGtal-team/DGtal/actions/workflows/build-master.yml) [![Nightly-build documentation and deploy](https://github.com/DGtal-team/DGtal/actions/workflows/deployDoc-master.yml/badge.svg)](https://github.com/DGtal-team/DGtal/actions/workflows/deployDoc-master.yml)

Description
===========
Expand Down
44 changes: 4 additions & 40 deletions cmake/CheckDGtalOptionalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -288,46 +288,10 @@ endif()
# -----------------------------------------------------------------------------
set(OPENMP_FOUND_DGTAL 0)
if(WITH_OPENMP)
if(APPLE)
message("-- Setting OpenMP flags on MacOs. Assuming `brew install libomp`")
if(CMAKE_C_COMPILER_ID MATCHES "Clang\$")
IF(EXISTS "/opt/homebrew/")
message(STATUS "Using M1/Homebrew C paths")
set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I/opt/homebrew/include" CACHE INTERNAL "OpenMP flags for #Xcode toolchain.")
set(OpenMP_C_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/opt/homebrew/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
else()
set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" CACHE INTERNAL "OpenMP flags for Xcode toolchain.")
set(OpenMP_C_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/usr/local/opt/libomp/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
endif()
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang\$")
IF(EXISTS "/opt/homebrew/")
message(STATUS "Using M1/Homebrew C++ paths")
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/opt/homebrew/include" CACHE INTERNAL "OpenMP flags for Xcode toolchain.")
set(OpenMP_CXX_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/opt/homebrew/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
else()
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" CACHE INTERNAL "OpenMP flags for Xcode toolchain.")
set(OpenMP_CXX_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/usr/local/opt/libomp/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
endif()
endif()
endif()

find_package(OpenMP REQUIRED)
if(OPENMP_FOUND)
set(OPENMP_FOUND_DGTAL 1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
target_link_libraries(DGtal PUBLIC ${OpenMP_CXX_LIBRARIES})
set(DGtalLibDependencies ${DGtalLibDependencies} ${OpenMP_CXX_LIBRARIES})
target_compile_definitions(DGtal PUBLIC -DWITH_OPENMP)
message(STATUS "OpenMP found. Libs: ${OpenMP_CXX_LIBRARIES}")
else()
message(FATAL_ERROR "OpenMP support not available.")
endif()
include(openmp)
set(DGtalLibDependencies ${DGtalLibDependencies} OpenMP::OpenMP_CXX)
set(OPENMP_FOUND_DGTAL 1)
set(WITH_OPENMP 1)
endif()

# -----------------------------------------------------------------------------
Expand Down
32 changes: 2 additions & 30 deletions cmake/DGtalConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,36 +80,8 @@ if (@QT5_FOUND_DGTAL@) #if QT5_FOUND_DGTAL
endif (@QT5_FOUND_DGTAL@)

if(@OPENMP_FOUND_DGTAL@) #if OPENMP_FOUND_DGTAL
if(APPLE)
message("-- Setting OpenMP flags on MacOs. Assuming `brew install libomp`")
if(CMAKE_C_COMPILER_ID MATCHES "Clang\$")
IF(EXISTS "/opt/homebrew/")
message(STATUS "Using M1/Homebrew C paths")
set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I/opt/homebrew/include" CACHE INTERNAL "OpenMP flags for #Xcode toolchain.")
set(OpenMP_C_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/opt/homebrew/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
else()
set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" CACHE INTERNAL "OpenMP flags for Xcode toolchain.")
set(OpenMP_C_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/usr/local/opt/libomp/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
endif()
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang\$")
IF(EXISTS "/opt/homebrew/")
message(STATUS "Using M1/Homebrew C++ paths")
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/opt/homebrew/include" CACHE INTERNAL "OpenMP flags for Xcode toolchain.")
set(OpenMP_CXX_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/opt/homebrew/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
else()
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" CACHE INTERNAL "OpenMP flags for Xcode toolchain.")
set(OpenMP_CXX_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/usr/local/opt/libomp/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
endif()
endif()
endif()
find_dependency(OpenMP REQUIRED
@OpenMP_HINTS@
)
include(openmp)
set(DGtalLibDependencies ${DGtalLibDependencies} OpenMP::OpenMP_CXX)
set(WITH_OPENMP 1)
endif()

Expand Down
3 changes: 2 additions & 1 deletion cmake/DGtalConfigGenerator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export(TARGETS DGtal FILE ${dgtal_export_file})
# is ON. Disable it when deploying.
set(_dependencies_list
Boost ZLIB
GMP ITK Cairo HDF5 QGLVIEWER Qt5 OpenMP Eigen3::Eigen CGAL FFTW3
GMP ITK Cairo HDF5 QGLVIEWER Qt5 OpenMP Eigen3::Eigen CGAL FFTW3 OpenMP::OpenMPCXX
)
foreach(dep ${_dependencies_list})
if(DGTAL_CONFIG_HINTS)
Expand Down Expand Up @@ -60,6 +60,7 @@ set(_find_cmake_files
"${PROJECT_SOURCE_DIR}/cmake/FindGMP.cmake"
"${PROJECT_SOURCE_DIR}/cmake/deps/eigen.cmake"
"${PROJECT_SOURCE_DIR}/cmake/deps/libigl.cmake"
"${PROJECT_SOURCE_DIR}/cmake/deps/openmp.cmake"
"${PROJECT_SOURCE_DIR}/cmake/CPM.cmake"
)
file(COPY ${_find_cmake_files}
Expand Down
30 changes: 30 additions & 0 deletions cmake/deps/openmp.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

if(APPLE)
message("-- Setting OpenMP flags on MacOs. Assuming `brew install libomp`")
if(CMAKE_C_COMPILER_ID MATCHES "Clang\$")
IF(EXISTS "/opt/homebrew/")
message(STATUS "[openmp] Using M1-M2/Homebrew C paths (-I/opt/homebrew/opt/libomp/include)")
set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include" CACHE INTERNAL "OpenMP flags for #Xcode toolchain.")
set(OpenMP_C_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/opt/homebrew/opt/libomp/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
else()
set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" CACHE INTERNAL "OpenMP flags for Xcode toolchain.")
set(OpenMP_C_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/usr/local/opt/libomp/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
endif()
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang\$")
IF(EXISTS "/opt/homebrew/")
message(STATUS "[openmp] Using M1-M2/Homebrew C++ paths ( -I/opt/homebrew/opt/libomp/include)")
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include" CACHE INTERNAL "OpenMP flags for Xcode toolchain.")
set(OpenMP_CXX_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/opt/homebrew/opt/libomp/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
else()
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" CACHE INTERNAL "OpenMP flags for Xcode toolchain.")
set(OpenMP_CXX_LIB_NAMES "omp" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
set(OpenMP_omp_LIBRARY "/usr/local/opt/libomp/lib/libomp.dylib" CACHE INTERNAL "OpenMP lib name for Xcode toolchain.")
endif()
endif()
endif()

find_package(OpenMP REQUIRED)
Binary file modified src/DGtal/geometry/doc/images/full-convexity-measure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/DGtal/geometry/doc/images/timings-Z2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/DGtal/geometry/doc/images/timings-Z3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/DGtal/geometry/doc/images/timings-Z4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/DGtal/geometry/doc/images/timings-ncvx-Z2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/DGtal/geometry/doc/images/timings-ncvx-Z3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/DGtal/geometry/doc/images/timings-ncvx-Z4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/DGtal/topology/HalfEdgeDataStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace DGtal
/// because there was link error with gcc 4.8.4 for all variants
/// within HalfEdgeDataStructure (e.g. BOOST_STATIC_CONSTANT, c++
/// constexpr, c++ constexpr with const reference).
static std::size_t const HALF_EDGE_INVALID_INDEX = boost::integer_traits<std::size_t>::const_max;
static std::size_t const HALF_EDGE_INVALID_INDEX = std::numeric_limits<std::size_t>::max();

/////////////////////////////////////////////////////////////////////////////
// class HalfEdgeDataStructure
Expand Down
1 change: 0 additions & 1 deletion src/DGtal/topology/VoxelComplex.ih
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <boost/property_map/property_map.hpp>
#include <iostream>
#ifdef WITH_OPENMP
// #include <experimental/algorithm>
#include <omp.h>
#endif
//////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit e33daad

Please sign in to comment.