summaryrefslogtreecommitdiff
path: root/src/Bottleneck_distance
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bottleneck_distance')
-rw-r--r--src/Bottleneck_distance/example/CMakeLists.txt26
-rw-r--r--src/Bottleneck_distance/example/bottleneck_example.cpp2
-rw-r--r--src/Bottleneck_distance/include/gudhi/Planar_neighbors_finder.h4
-rw-r--r--src/Bottleneck_distance/test/CMakeLists.txt65
4 files changed, 20 insertions, 77 deletions
diff --git a/src/Bottleneck_distance/example/CMakeLists.txt b/src/Bottleneck_distance/example/CMakeLists.txt
index cc1b9091..adf298aa 100644
--- a/src/Bottleneck_distance/example/CMakeLists.txt
+++ b/src/Bottleneck_distance/example/CMakeLists.txt
@@ -1,36 +1,12 @@
cmake_minimum_required(VERSION 2.6)
-project(GUDHIBottleneckExample)
+project(Bottleneck_distance_examples)
# need CGAL 4.6
# cmake -DCGAL_DIR=~/workspace/CGAL-4.6-beta1 ../../..
if(CGAL_FOUND)
if (NOT CGAL_VERSION VERSION_LESS 4.6.0)
- message(STATUS "CGAL version: ${CGAL_VERSION}.")
-
- include( ${CGAL_USE_FILE} )
-
- if(NOT MSVC)
- include(CheckCXXCompilerFlag)
- CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11)
- if(COMPILER_SUPPORTS_CXX11)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- endif()
- endif()
- # - End of workaround
-
- find_package(Eigen3 3.1.0)
if (EIGEN3_FOUND)
- message(STATUS "Eigen3 version: ${EIGEN3_VERSION}.")
- include( ${EIGEN3_USE_FILE} )
- include_directories (BEFORE "../../include")
-
add_executable (bottleneck_example bottleneck_example.cpp)
- #add_test(dtoffrw_tore3D ${CMAKE_CURRENT_BINARY_DIR}/dtoffrw ${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off 3)
-
- else()
- message(WARNING "Eigen3 not found. Version 3.1.0 is required.")
endif()
- else()
- message(WARNING "CGAL version: ${CGAL_VERSION} is too old to compile Alpha shapes feature. Version 4.6.0 is required.")
endif ()
endif()
diff --git a/src/Bottleneck_distance/example/bottleneck_example.cpp b/src/Bottleneck_distance/example/bottleneck_example.cpp
index b581a3be..472c5c84 100644
--- a/src/Bottleneck_distance/example/bottleneck_example.cpp
+++ b/src/Bottleneck_distance/example/bottleneck_example.cpp
@@ -20,6 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#define CGAL_HAS_THREADS
+
#include <gudhi/Graph_matching.h>
#include <iostream>
#include <fstream>
diff --git a/src/Bottleneck_distance/include/gudhi/Planar_neighbors_finder.h b/src/Bottleneck_distance/include/gudhi/Planar_neighbors_finder.h
index 37c6a122..9356e879 100644
--- a/src/Bottleneck_distance/include/gudhi/Planar_neighbors_finder.h
+++ b/src/Bottleneck_distance/include/gudhi/Planar_neighbors_finder.h
@@ -25,8 +25,8 @@
#include <list>
#include <map>
-#include "../CGAL/Kd_tree.h"
-#include <CGAL/Miscellaneous.h>
+#include "../CGAL/Kd_tree.h"
+#include "../CGAL/Miscellaneous.h"
#include <gudhi/Persistence_diagrams_graph.h>
diff --git a/src/Bottleneck_distance/test/CMakeLists.txt b/src/Bottleneck_distance/test/CMakeLists.txt
index 54a2fe95..ba0f5fee 100644
--- a/src/Bottleneck_distance/test/CMakeLists.txt
+++ b/src/Bottleneck_distance/test/CMakeLists.txt
@@ -1,64 +1,29 @@
cmake_minimum_required(VERSION 2.6)
-project(GUDHIBottleneckUT)
+project(Bottleneck_distance_tests)
-
-
-if(CGAL_FOUND)
- if (NOT CGAL_VERSION VERSION_LESS 4.6.0)
- message(STATUS "CGAL version: ${CGAL_VERSION}.")
-
- include( ${CGAL_USE_FILE} )
-
- if(NOT MSVC)
- include(CheckCXXCompilerFlag)
- CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11)
- if(COMPILER_SUPPORTS_CXX11)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- endif()
- endif()
- # - End of workaround
-
- find_package(Eigen3 3.1.0)
- if (EIGEN3_FOUND)
- message(STATUS "Eigen3 version: ${EIGEN3_VERSION}.")
- include( ${EIGEN3_USE_FILE} )
- include_directories (BEFORE "../../include")
-
- if (GCOVR_PATH)
+if (GCOVR_PATH)
# for gcovr to make coverage reports - Corbera Jenkins plugin
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage")
endif()
if (GPROF_PATH)
# for gprof to make coverage reports - Jenkins
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pg")
endif()
- message("CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}")
- message("CMAKE_CXX_FLAGS_DEBUG = ${CMAKE_CXX_FLAGS_DEBUG}")
- message("CMAKE_CXX_FLAGS_RELEASE = ${CMAKE_CXX_FLAGS_RELEASE}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -std=c++11 -Wall -Wpedantic -Wsign-compare")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb -O0")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
-
-add_executable ( bottleneckUT bottleneck_unit_test.cpp )
-add_executable ( bottleneck_chrono bottleneck_chrono.cpp )
-target_link_libraries(bottleneckUT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
-
-# Unitary tests
-add_test(NAME bottleneckUT
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bottleneckUT
- # XML format for Jenkins xUnit plugin
- --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/bottleneckUT.xml --log_level=test_suite --report_level=no)
-
- else()
- message(WARNING "Eigen3 not found. Version 3.1.0 is required for Alpha shapes feature.")
+# need CGAL 4.7
+# cmake -DCGAL_DIR=~/workspace/CGAL-4.7-Ic-41 ../../..
+if(CGAL_FOUND)
+ if (NOT CGAL_VERSION VERSION_LESS 4.7.0)
+ if (EIGEN3_FOUND)
+ add_executable ( bottleneckUT bottleneck_unit_test.cpp )
+ add_executable ( bottleneck_chrono bottleneck_chrono.cpp )
+ target_link_libraries(bottleneckUT ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+
+ # Unitary tests
+ add_test(NAME bottleneckUT COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bottleneckUT
+ # XML format for Jenkins xUnit plugin
+ --log_format=XML --log_sink=${CMAKE_SOURCE_DIR}/bottleneckUT.xml --log_level=test_suite --report_level=no)
endif()
- else()
- message(WARNING "CGAL version: ${CGAL_VERSION} is too old to compile bipartite graphs matching feature. Version 4.6.0 is required.")
endif ()
endif()