summaryrefslogtreecommitdiff
path: root/src/cmake
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-06-14 14:45:22 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-06-14 14:45:22 +0200
commit64e6c96afa4d1a95b8d6ee74ea910c1cb80ebbd9 (patch)
treeac3bf9907b3a2b34fb92a5ef96f0eff6c933e0b3 /src/cmake
parenta1088d88479e6c18c5ade73ffc34bba2bf37bc1d (diff)
Remove gudhi_patches for CGAL and CGAL 4.11.0 is now the minimal CGAL version required. Modification of documentation accordingly
Diffstat (limited to 'src/cmake')
-rw-r--r--src/cmake/modules/GUDHI_third_party_libraries.cmake32
-rw-r--r--src/cmake/modules/GUDHI_user_version_target.cmake9
2 files changed, 5 insertions, 36 deletions
diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake
index 57ea7d14..477900ae 100644
--- a/src/cmake/modules/GUDHI_third_party_libraries.cmake
+++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake
@@ -23,42 +23,14 @@ endif()
# but it implies to use cmake version 3.1 at least.
find_package(CGAL QUIET)
-# Only CGAL versions > 4.4 supports what Gudhi uses from CGAL
-if (CGAL_VERSION VERSION_LESS 4.4.0)
+# Only CGAL versions > 4.11 supports what Gudhi uses from CGAL
+if (CGAL_FOUND AND CGAL_VERSION VERSION_LESS 4.11.0)
message("++ CGAL version ${CGAL_VERSION} is considered too old to be used by Gudhi.")
unset(CGAL_FOUND)
endif()
if(CGAL_FOUND)
message(STATUS "CGAL version: ${CGAL_VERSION}.")
include( ${CGAL_USE_FILE} )
-
- if (NOT CGAL_VERSION VERSION_LESS 4.8.0)
- # HACK to detect CGAL version 4.8.0
- # CGAL version 4.8, 4.8.1 and 4.8.2 are identified as version 4.8.1000)
- # cf. https://github.com/CGAL/cgal/issues/1559
- # Limit the HACK between CGAL versions 4.8 and 4.9 because of file read
- if (NOT CGAL_VERSION VERSION_GREATER 4.9.0)
- foreach(CGAL_INCLUDE_DIR ${CGAL_INCLUDE_DIRS})
- if (EXISTS "${CGAL_INCLUDE_DIR}/CGAL/version.h")
- FILE(READ "${CGAL_INCLUDE_DIR}/CGAL/version.h" contents)
- STRING(REGEX REPLACE "\n" ";" contents "${contents}")
- foreach(Line ${contents})
- if("${Line}" STREQUAL "#define CGAL_VERSION 4.8")
- set(CGAL_VERSION 4.8.0)
- message (">>>>> HACK CGAL version to ${CGAL_VERSION}")
- endif("${Line}" STREQUAL "#define CGAL_VERSION 4.8")
- endforeach(Line ${contents})
- endif (EXISTS "${CGAL_INCLUDE_DIR}/CGAL/version.h")
- endforeach(CGAL_INCLUDE_DIR ${CGAL_INCLUDE_DIRS})
- endif(NOT CGAL_VERSION VERSION_GREATER 4.9.0)
-
- if (CGAL_VERSION VERSION_LESS 4.11.0)
- # For dev version
- include_directories(BEFORE "src/common/include/gudhi_patches")
- # For user version
- include_directories(BEFORE "include/gudhi_patches")
- endif ()
- endif()
endif()
option(WITH_GUDHI_USE_TBB "Build with Intel TBB parallelization" ON)
diff --git a/src/cmake/modules/GUDHI_user_version_target.cmake b/src/cmake/modules/GUDHI_user_version_target.cmake
index 2ed48c48..91eee6b5 100644
--- a/src/cmake/modules/GUDHI_user_version_target.cmake
+++ b/src/cmake/modules/GUDHI_user_version_target.cmake
@@ -29,7 +29,7 @@ add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E
add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E
copy ${CMAKE_SOURCE_DIR}/README.md ${GUDHI_USER_VERSION_DIR}/README.md)
add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E
- copy ${CMAKE_SOURCE_DIR}/COPYING ${GUDHI_USER_VERSION_DIR}/COPYING)
+ copy ${CMAKE_SOURCE_DIR}/LICENSE ${GUDHI_USER_VERSION_DIR}/LICENSE)
add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E
copy ${CMAKE_SOURCE_DIR}/src/CMakeLists.txt ${GUDHI_USER_VERSION_DIR}/CMakeLists.txt)
add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E
@@ -51,11 +51,8 @@ add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E
copy_directory ${CMAKE_SOURCE_DIR}/src/GudhUI ${GUDHI_USER_VERSION_DIR}/GudhUI)
set(GUDHI_DIRECTORIES "doc;example;concept;utilities")
-if (CGAL_VERSION VERSION_LESS 4.11.0)
- set(GUDHI_INCLUDE_DIRECTORIES "include/gudhi;include/gudhi_patches")
-else ()
- set(GUDHI_INCLUDE_DIRECTORIES "include/gudhi")
-endif ()
+
+set(GUDHI_INCLUDE_DIRECTORIES "include/gudhi")
foreach(GUDHI_MODULE ${GUDHI_MODULES_FULL_LIST})
foreach(GUDHI_DIRECTORY ${GUDHI_DIRECTORIES})