Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake V2 + Cpp20 + (Almost) Header only #1757

Merged
merged 67 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
fc6fba2
Update CMake version
BDoignies Jan 10, 2025
535f7b0
C++20 + start to remove cpp files
BDoignies Jan 10, 2025
aa8d6fc
Remove .cpp files in base
BDoignies Jan 13, 2025
a8e8f99
Fix compilation (C++20 allocator + forgot inline)
BDoignies Jan 13, 2025
a066a0a
WIP new CMake
BDoignies Jan 14, 2025
7531e01
Move dependancies to deps/ folder
BDoignies Jan 14, 2025
16f0a0a
C++20 enum deprecation
BDoignies Jan 14, 2025
9f3069a
Added example, removes unnecessary global functions
BDoignies Jan 14, 2025
c3aa17c
Added back .in files
BDoignies Jan 14, 2025
04f7926
New CMake managment
BDoignies Jan 15, 2025
24be192
Remove legacy CMakeLists
BDoignies Jan 15, 2025
e355433
Reinstate doxygen
BDoignies Jan 15, 2025
058b4c9
Fixs
BDoignies Jan 16, 2025
238cb3e
Activate github actions for main2.0
dcoeurjo Jan 17, 2025
3be5942
Color does not include Common.h anymore
dcoeurjo Jan 17, 2025
139612c
Merging dgtal variable names (tbc)
dcoeurjo Jan 1, 2025
6d45063
Merge branch 'renamingCmakeVars' into CMakev2
BDoignies Jan 17, 2025
ae48a70
Fixe compil errors
BDoignies Jan 17, 2025
56a3ea0
Update ITK to run on gh
BDoignies Jan 17, 2025
d8c03d2
Debug message to see standard set by windows
BDoignies Jan 17, 2025
dd50ae6
Set conan standard (hopefully)
BDoignies Jan 20, 2025
7029072
Move add_subdirectory for target to be available everywhere
BDoignies Jan 20, 2025
18dc885
Fix compil bugs
BDoignies Jan 20, 2025
5900502
All tests for debug purposes
BDoignies Jan 20, 2025
cd9d8f7
Resotre conan and set standard in profile
BDoignies Jan 20, 2025
f55c94c
Fix compile warnings
BDoignies Jan 20, 2025
f666133
Conan file 3rd try
BDoignies Jan 20, 2025
8340041
Fix warning + conanfile
BDoignies Jan 21, 2025
dfee5da
Build shared / static lib depending on option
BDoignies Jan 22, 2025
ff7eec9
Test fixing ubuntu compil warnings
BDoignies Jan 22, 2025
5d71d23
Fix windows
BDoignies Jan 22, 2025
b48c9b2
Remove warning (known issue of GCC)
BDoignies Jan 22, 2025
734f4c4
Add ref to for-range loop
BDoignies Jan 22, 2025
bbc7acd
How can it be wrong?
BDoignies Jan 22, 2025
4b140f0
Fix unitialized variable
BDoignies Jan 22, 2025
1a60e18
Trying with auto
BDoignies Jan 22, 2025
e2aac2d
Fix declaration order
BDoignies Jan 23, 2025
9ed9fd4
Replace std w/ boost reverse_it
BDoignies Jan 23, 2025
e4afa0f
Boost reverse_iterator fix
BDoignies Jan 23, 2025
3bd1b9b
Fix documentation
BDoignies Jan 23, 2025
90eb3f3
Provide path for find_package
BDoignies Jan 23, 2025
26af8c1
Fix DGtalTools (/ \ tests & examples disabled)
BDoignies Jan 24, 2025
eedcd4b
Add fPIC to BoostAddons for Python wraping to link properly
BDoignies Feb 7, 2025
cda4615
Updated ChangeLog to notify ITK upgrade
BDoignies Feb 7, 2025
63d18a4
Remove unused parameters instead of ((void))
BDoignies Feb 7, 2025
bf581b8
Remove commented code
BDoignies Feb 7, 2025
743698e
Remove bad indent
BDoignies Feb 7, 2025
c3163ee
Remove comment for unused variable
BDoignies Feb 7, 2025
62169e2
Conflicts
dcoeurjo Feb 11, 2025
482fab9
Updated documentation and changelog
BDoignies Feb 11, 2025
77b8f27
Fix missing typename
BDoignies Feb 12, 2025
1475de5
Fix DGTalConfig.cmake exported variables
BDoignies Feb 12, 2025
d994142
ReAdd compile definition removed in #1754 (necessary for DGtalTools)
BDoignies Feb 12, 2025
b83a465
New workflow file for PR on main2.0
BDoignies Feb 12, 2025
9a10cdc
Fix indents of new workflow style
BDoignies Feb 12, 2025
64d1bbb
Fix order of new workflow
BDoignies Feb 12, 2025
6b5a9d2
Debug File to see why CMake does not find modules
BDoignies Feb 12, 2025
219308c
Make DGTalTargets.cmake available to DGTalConfig.cmake in build direc…
BDoignies Feb 12, 2025
34ec924
Add namespace to export
BDoignies Feb 13, 2025
e07c0c2
Filter ITK include paths
BDoignies Feb 13, 2025
41a026b
Cleaning workflow file
BDoignies Feb 13, 2025
8ca7fa8
Move python tests to base action file (not same requirements)
BDoignies Feb 13, 2025
7b3419c
Activate tests and other system build
BDoignies Feb 13, 2025
8ffe538
Forgot to run tests
BDoignies Feb 13, 2025
01e77aa
Remove python config
BDoignies Feb 13, 2025
efb5efe
Fix codacity report
BDoignies Feb 13, 2025
4a5dc60
Update .github/workflows/build-PR2.0.yml
dcoeurjo Feb 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
conan install $GITHUB_WORKSPACE --build=missing
conan install $GITHUB_WORKSPACE --build=missing -s:a compiler.cppstd=20
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"

- name: Build
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/buildAndDocumentation-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
TESTBLACKLIST: "(testLinearStructure|testIntegerConverter|testArithmeticalDSSComputerOnSurfels)"
CONFIG_GLOBAL: -DDGTAL_BUILD_EXAMPLES=true -DDGTAL_BUILD_TESTS=true -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=10
CONFIG_GLOBAL: -DDGTAL_BUILD_EXAMPLES=false -DDGTAL_BUILD_TESTS=false -DDGTAL_RANDOMIZED_TESTING_THRESHOLD=10
CONFIG_LINUX: -DUSE_CCACHE=NO -DDGTAL_WITH_OPENMP=true -DDGTAL_WITH_GMP=true -DDGTAL_WITH_CGAL=true -DDGTAL_WITH_LIBIGL=true -DDGTAL_WITH_FFTW3=true -DWARNING_AS_ERROR=ON -DDGTAL_WITH_HDF5=true -DWITH_QGLVIEWER=true -DDGTAL_WITH_CAIRO=true -DDGTAL_WITH_ITK=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true -DDGTAL_BUILD_POLYSCOPE_EXAMPLES=true
CONFIG_MAC: -DUSE_CCACHE=NO -DDGTAL_WITH_GMP=true -DDGTAL_BUILD_POLYSCOPE_EXAMPLES=true -DDGTAL_WITH_CGAL=true -DDGTAL_WITH_LIBIGL=true
CONFIG_WINDOWS: -DDGTAL_WITH_OPENMP=true #-DDGTAL_WITH_GMP=true -DDGTAL_WITH_FFTW3=true -DDGTAL_WITH_CAIRO=true -DDGTAL_WITH_ITK=true
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
conan install $GITHUB_WORKSPACE --build=missing
conan install $GITHUB_WORKSPACE --build=missing -s:a compiler.cppstd=20
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_GLOBAL $CONFIG_WINDOWS -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"

- name: Build
Expand Down Expand Up @@ -118,8 +118,9 @@ jobs:
cd DGtalTools
mkdir buildDGtalTools
cd buildDGtalTools
echo cmake .. -DDGTAL_DIR=${{runner.workspace}}/build -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -G Ninja
cmake .. -DDGtal_DIR=${{runner.workspace}}/build -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -G Ninja
ls
echo cmake .. -DCMAKE_PREFIX_PATH=${{runner.workspace}}/DGtal/cmake/deps -DDGTAL_DIR=${{runner.workspace}}/build -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -G Ninja
cmake .. -DCMAKE_PREFIX_PATH=${{runner.workspace}}/DGtal/cmake/deps -DDGtal_DIR=${{runner.workspace}}/build -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -G Ninja
ninja

# Documentatin (build, check and deploy)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deployDoc-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Nightly-build documentation and deploy

on:
push:
branches: [ master ]
branches: [ master, main2.0 ]

jobs:
# This workflow contains a single job called "build"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pythonBindings-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev libcgal-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit5-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev libcgal-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libfftw3-dev libinsighttoolkit5-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev

- name: Installing dependencies (macOS)
if: matrix.os == 'macOS-latest'
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
conan install $GITHUB_WORKSPACE --build=missing
conan install $GITHUB_WORKSPACE --build=missing -s:a compiler.cppstd=20
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_PYTHON $CONFIG_GLOBAL $CONFIG_WINDOWS


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonBindings-Pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
conan install $GITHUB_WORKSPACE --build=missing
conan install $GITHUB_WORKSPACE --build=missing -s:a compiler.cppstd=20
cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} $CONFIG_PYTHON $CONFIG_GLOBAL $CONFIG_WINDOWS

- name: Setting build informations (Windows)
Expand Down
84 changes: 20 additions & 64 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# -----------------------------------------------------------------------------
# Project definition
# -----------------------------------------------------------------------------
cmake_minimum_required (VERSION 3.11)
cmake_policy(SET CMP0057 NEW) # the new interpretation of IN_LIST is by default not set (at least until 3.21.1).
project (DGtal)
cmake_minimum_required (VERSION 3.20)
project (DGtal VERSION 2.0.0)

# -----------------------------------------------------------------------------
# By default, do not warn when built on machines using only VS Express:
Expand All @@ -12,27 +11,30 @@ if(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
endif()

# -----------------------------------------------------------------------------
# Define variables and cmake parameters, and display some information
# -----------------------------------------------------------------------------
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/deps)

# @TODO : See if those variable are still usefull,
# Note that they are set in source code !
set(DGtal_VERSION_MAJOR ${CMAKE_PROJECT_VERSION_MAJOR})
set(DGtal_VERSION_MINOR ${CMAKE_PROJECT_VERSION_MINOR})
set(DGtal_VERSION_PATCH ${CMAKE_PROJECT_VERSION_PATCH})
set(DGTAL_VERSION ${CMAKE_PROJECT_VERSION})
set(PROJECT_VERSION ${CMAKE_PROJECT_VERSION})
set(VERSION ${CMAKE_PROJECT_VERSION})


set(DGtal_VERSION_MAJOR 2)
set(DGtal_VERSION_MINOR 0)
set(DGtal_VERSION_PATCH beta)
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})
# -----------------------------------------------------------------------------
# Common build options/settings
# -----------------------------------------------------------------------------
include(Common)

#------------------------------------------------------------------------------
# Add DGtal library
#------------------------------------------------------------------------------
add_subdirectory(src)

# -----------------------------------------------------------------------------
# Development and debug options
# -----------------------------------------------------------------------------
Expand All @@ -45,58 +47,12 @@ message(STATUS "Downloading external projects")
include(FetchExternalDeps)
message(STATUS "Done.")

#------------------------------------------------------------------------------
# Add DGtal library
#------------------------------------------------------------------------------
# Include CPP files to add to the library target
#
# each subdir can contain a ModuleSRC.txt file
# with a set command on the variable ${DGTAL_SRC}
#
include(src/DGtal/base/ModuleSRC.cmake)
include(src/DGtal/io/ModuleSRC.cmake)
include(src/DGtal/helpers/ModuleSRC.cmake)
## Board dependency
include(src/Board/ModuleSRC.cmake)
## Boost Add-ons
include(src/BoostAddons/ModuleSRC.cmake)

list(TRANSFORM DGTAL_SRC PREPEND "src/")
list(TRANSFORM BOARD_SRC PREPEND "src/")
list(TRANSFORM DGTALIO_SRC PREPEND "src/")

# DGtal Target. Library is added on the top directory to use target_link_libraries for CMake < 3.13
add_library (DGtal ${DGTAL_SRC} ${DGTALIO_SRC} ${BOARD_SRC} )
target_include_directories(DGtal PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/src>
# INSTALL_INTERFACE must not contain absolute paths
$<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR_RELATIVE}>
)

# -----------------------------------------------------------------------------
# Check mandatory and optional dependencies
# -----------------------------------------------------------------------------
include(CheckDGtalDependencies)
include(CheckDGtalOptionalDependencies)

# -----------------------------------------------------------------------------
# Install
# -----------------------------------------------------------------------------
install(TARGETS DGtal
# IMPORTANT: Add the DGtal library to the "export-set"
EXPORT DGtalLibraryDepends
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT bin
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT shlib
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
#PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}/DGtal"
COMPONENT dev)

# -----------------------------------------------------------------------------
# Common build options/settings
# -----------------------------------------------------------------------------
include(OSDependentSettings)

# -----------------------------------------------------------------------------
# Randomized build 1/2.
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -138,11 +94,6 @@ include(GeneratorSpecific)
# -----------------------------------------------------------------------------
include(OSDependentSettings)

# -----------------------------------------------------------------------------
# Install settings
# -----------------------------------------------------------------------------
include(Install)

#------------------------------------------------------------------------------
# Python wrappings
#------------------------------------------------------------------------------
Expand All @@ -152,3 +103,8 @@ include(PythonWrappings)
# Unzip and install topology Look up Tables.
# -----------------------------------------------------------------------------
include(NeighborhoodTablesConfig)

# -----------------------------------------------------------------------------
# Unzip and install topology Look up Tables.
# -----------------------------------------------------------------------------
include(Install)
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# DGtal 2.0

- *General*
- Upgrade of ITK to version 5 and above [#1757](https://github.com/DGtal-team/DGtal/pull/1757)

- *CMake*
- Updated to version 3.20 minimum (contemporary version of C++20's new minimal standard) [#1757](https://github.com/DGtal-team/DGtal/pull/1757)

- *Build*
- Prefixing main cmake variables with `DGTAL_` (David Coeurjolly, [#1753](https://github.com/DGtal-team/DGtal/pull/1753))
- Add a cmake option to use the ITK EIGEN configuration to solve the issue [#347](https://github.com/DGtal-team/DGtalTools/issues/437) of DGTalTools. (Bertrand Kerautret, [#1759](https://github.com/DGtal-team/DGtal/pull/1759)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RUN apt -y install doxygen

RUN apt -y install libcgal-dev

#RUN apt-get -y install libinsighttoolkit4-dev
#RUN apt-get -y install libinsighttoolkit5-dev

#RUN apt -y install libqglviewer-dev-qt5

Expand Down
8 changes: 7 additions & 1 deletion cmake/CheckDGtalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,21 @@ set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
set(Boost_FOUND FALSE)
find_package(Boost 1.50.0 REQUIRED)
target_compile_definitions(DGtal PUBLIC ${BOOST_DEFINITIONS} -DBOOST_ALL_NO_LIB)
target_compile_definitions(DGtal PUBLIC ${BOOST_DEFINITIONS} -DBOOST_ALL_NO_LIB -DBOOST_ALLOW_DEPRECATED_HEADERS)
# SYSTEM to avoid warnings from boost.
target_include_directories(DGtal SYSTEM PUBLIC ${Boost_INCLUDE_DIRS} )


target_compile_definitions(DGTAL_BoostAddons PUBLIC ${BOOST_DEFINITIONS} -DBOOST_ALL_NO_LIB)
target_include_directories(DGTAL_BoostAddons SYSTEM PUBLIC ${Boost_INCLUDE_DIRS} )

# -----------------------------------------------------------------------------
# Looking for zlib
# -----------------------------------------------------------------------------
find_package(ZLIB REQUIRED)
target_link_libraries(DGtal PUBLIC ZLIB::ZLIB)
target_link_libraries(DGTAL_BoostAddons PUBLIC ZLIB::ZLIB)

set(DGtalLibDependencies ${DGtalLibDependencies} ${ZLIB_LIBRARIES})

# -----------------------------------------------------------------------------
Expand Down
8 changes: 8 additions & 0 deletions cmake/CheckDGtalOptionalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Check Optional Dependencies
# -----------------------------------------------------------------------------


# -----------------------------------------------------------------------------
# Global options
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -196,7 +197,14 @@ if(DGTAL_WITH_CAIRO)
target_include_directories(DGtal PUBLIC ${CAIRO_INCLUDE_DIRS} ${cairo_INCLUDE_DIRS})
target_link_libraries(DGtal PUBLIC ${CAIRO_LIBRARIES} ${cairo_LIBRARIES})
set(DGtalLibDependencies ${DGtalLibDependencies} ${CAIRO_LIBRARIES} ${cairo_LIBRARIES})

target_compile_definitions(DGTAL_LibBoard PUBLIC -DDGTAL_WITH_CAIRO)
target_include_directories(DGTAL_LibBoard PUBLIC ${CAIRO_INCLUDE_DIRS} ${cairo_INCLUDE_DIRS})
target_link_libraries(DGTAL_LibBoard PUBLIC ${CAIRO_LIBRARIES} ${cairo_LIBRARIES})

message(STATUS "cairo found")


set(CAIRO_FOUND_DGTAL 1)
else()
message(FATAL_ERROR "cairo not found. Check the cmake variables associated to this package or disable it." )
Expand Down
6 changes: 4 additions & 2 deletions cmake/Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ endforeach()


# -----------------------------------------------------------------------------
# CPP17
# CPP20
# -----------------------------------------------------------------------------
set(DGTAL_CMAKE_CXX_STANDARD_MIN_REQUIRED 17)
set(DGTAL_CMAKE_CXX_STANDARD_MIN_REQUIRED 20)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD ${DGTAL_CMAKE_CXX_STANDARD_MIN_REQUIRED})
else()
Expand All @@ -44,6 +44,8 @@ if(NOT CMAKE_CXX_STANDARD_REQUIRED)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()

message(STATUS "C++ standard set to ${CMAKE_CXX_STANDARD}")

# -----------------------------------------------------------------------------
# Visual Studio : to distinguish between debug and release lib and /bigobj flag
# -----------------------------------------------------------------------------
Expand Down
20 changes: 5 additions & 15 deletions cmake/DGtalConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
# DGTAL_LIBRARIES - libraries to link against
# DGTAL_VERSION - version of the DGtal library
@PACKAGE_INIT@

set(DGTAL_VERSION "@DGTAL_VERSION@")

include(CMakeFindDependencyMacro)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})

get_filename_component(DGTAL_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${DGTAL_CMAKE_DIR}/Modules")

include(CPM)

set(DGTAL_VERSION "@DGTAL_VERSION@")

#### Required dependencies ####
find_dependency(Boost REQUIRED
Expand All @@ -34,6 +28,8 @@ if (@LIBIGL_FOUND_DGTAL@)
set(DGtalLibDependencies ${DGtalLibDependencies} igl::core)
endif()

#### Optionnal dependencies ####

if(@GMP_FOUND_DGTAL@) #if GMP_FOUND_DGTAL
find_package(GMP REQUIRED
@GMP_HINTS@
Expand Down Expand Up @@ -99,10 +95,4 @@ if(@FFTW3_FOUND_DGTAL@) #if FFTW3_FOUND_DGTAL
set(DGTAL_WITH_FFTW3 1)
endif()

if(NOT TARGET DGtal)
# Our imported targets, including dependencies
include ("${DGTAL_CMAKE_DIR}/DGtalLibraryDepends.cmake")
endif()

set(DGTAL_LIBRARIES DGtal ${DGtalLibDependencies})
get_target_property(DGTAL_INCLUDE_DIRS DGtal INTERFACE_INCLUDE_DIRECTORIES)
include("${CMAKE_CURRENT_LIST_DIR}/DGtalTargets.cmake")
Loading
Loading