From c09268a046c43b4311f0f29ac4bfb14dcb2da30d Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 2 Jun 2017 14:10:20 +0000 Subject: Try to remove boost system git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2504 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fd12c45af5ebeb72c4b49142abab91b46ce1a9da --- src/Alpha_complex/example/CMakeLists.txt | 4 ++-- src/Rips_complex/example/CMakeLists.txt | 8 ++++---- src/cmake/modules/GUDHI_third_party_libraries.cmake | 2 ++ src/cython/CMakeLists.txt | 10 +--------- 4 files changed, 9 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/Alpha_complex/example/CMakeLists.txt b/src/Alpha_complex/example/CMakeLists.txt index 4badcb91..5bf553e9 100644 --- a/src/Alpha_complex/example/CMakeLists.txt +++ b/src/Alpha_complex/example/CMakeLists.txt @@ -5,9 +5,9 @@ project(Alpha_complex_examples) # cmake -DCGAL_DIR=~/workspace/CGAL-4.7 .. if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) add_executable ( Alpha_complex_example_from_points Alpha_complex_from_points.cpp ) - target_link_libraries(Alpha_complex_example_from_points ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${CGAL_LIBRARY}) + target_link_libraries(Alpha_complex_example_from_points ${CGAL_LIBRARY}) add_executable ( Alpha_complex_example_from_off Alpha_complex_from_off.cpp ) - target_link_libraries(Alpha_complex_example_from_off ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${CGAL_LIBRARY}) + target_link_libraries(Alpha_complex_example_from_off ${CGAL_LIBRARY}) if (TBB_FOUND) target_link_libraries(Alpha_complex_example_from_points ${TBB_LIBRARIES}) target_link_libraries(Alpha_complex_example_from_off ${TBB_LIBRARIES}) diff --git a/src/Rips_complex/example/CMakeLists.txt b/src/Rips_complex/example/CMakeLists.txt index 712db16e..d2d3e052 100644 --- a/src/Rips_complex/example/CMakeLists.txt +++ b/src/Rips_complex/example/CMakeLists.txt @@ -3,17 +3,17 @@ project(Rips_complex_examples) # Point cloud add_executable ( Rips_complex_example_from_off example_rips_complex_from_off_file.cpp ) -target_link_libraries(Rips_complex_example_from_off ${Boost_SYSTEM_LIBRARY}) +#target_link_libraries(Rips_complex_example_from_off ${Boost_SYSTEM_LIBRARY}) add_executable ( Rips_complex_example_one_skeleton_from_points example_one_skeleton_rips_from_points.cpp ) -target_link_libraries(Rips_complex_example_one_skeleton_from_points ${Boost_SYSTEM_LIBRARY}) +#target_link_libraries(Rips_complex_example_one_skeleton_from_points ${Boost_SYSTEM_LIBRARY}) # Distance matrix add_executable ( Rips_complex_example_one_skeleton_from_distance_matrix example_one_skeleton_rips_from_distance_matrix.cpp ) -target_link_libraries(Rips_complex_example_one_skeleton_from_distance_matrix ${Boost_SYSTEM_LIBRARY}) +#target_link_libraries(Rips_complex_example_one_skeleton_from_distance_matrix ${Boost_SYSTEM_LIBRARY}) add_executable ( Rips_complex_example_from_csv_distance_matrix example_rips_complex_from_csv_distance_matrix_file.cpp ) -target_link_libraries(Rips_complex_example_from_csv_distance_matrix ${Boost_SYSTEM_LIBRARY}) +#target_link_libraries(Rips_complex_example_from_csv_distance_matrix ${Boost_SYSTEM_LIBRARY}) if (TBB_FOUND) target_link_libraries(Rips_complex_example_from_off ${TBB_LIBRARIES}) diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index 8cb01d3c..7b0cda3b 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -99,6 +99,8 @@ add_definitions(-DBOOST_RESULT_OF_USE_DECLTYPE) add_definitions(-DBOOST_ALL_NO_LIB) # problem with Visual Studio link on Boost program_options add_definitions( -DBOOST_ALL_DYN_LINK ) +# problem on Mac with boost_system and boost_thread +#add_definitions( -DBOOST_SYSTEM_NO_DEPRECATED ) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt index d9f356f9..4b56122d 100644 --- a/src/cython/CMakeLists.txt +++ b/src/cython/CMakeLists.txt @@ -6,15 +6,7 @@ if(CYTHON_FOUND) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_RESULT_OF_USE_DECLTYPE', ") set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_ALL_NO_LIB', ") - set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${Boost_LIBRARY_DIRS}', ") - if(WIN32) - set( returnValue "" ) - find_the_lib (${returnValue} ${Boost_SYSTEM_LIBRARY}) - set(BOOST_SYSTEM_LIB_NAME ${returnValue}) - else() - set(BOOST_SYSTEM_LIB_NAME "boost_system") - endif() - set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'${BOOST_SYSTEM_LIB_NAME}', ") + set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_SYSTEM_NO_DEPRECATED', ") # Gudhi and CGAL compilation option if(MSVC) -- cgit v1.2.3 From 7cd2fc5259aaa1b362652a026de1c2006ab3a78c Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 2 Jun 2017 16:55:18 +0000 Subject: Get rid of Boost_system library link git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2509 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 52deba0f2212767b99b801810d356e55417225db --- src/Alpha_complex/test/CMakeLists.txt | 2 +- src/Bitmap_cubical_complex/example/CMakeLists.txt | 3 --- src/Bitmap_cubical_complex/test/CMakeLists.txt | 2 +- src/Bottleneck_distance/example/CMakeLists.txt | 2 +- src/Bottleneck_distance/test/CMakeLists.txt | 2 +- src/Contraction/example/CMakeLists.txt | 4 ++-- src/Persistent_cohomology/benchmark/CMakeLists.txt | 2 +- src/Persistent_cohomology/example/CMakeLists.txt | 26 ++++++++++------------ src/Persistent_cohomology/test/CMakeLists.txt | 7 +++--- src/Rips_complex/example/CMakeLists.txt | 4 ---- src/Rips_complex/test/CMakeLists.txt | 2 +- src/Simplex_tree/example/CMakeLists.txt | 2 +- src/Simplex_tree/test/CMakeLists.txt | 2 +- src/Skeleton_blocker/example/CMakeLists.txt | 2 +- src/Skeleton_blocker/test/CMakeLists.txt | 6 ++--- src/Spatial_searching/test/CMakeLists.txt | 2 +- src/Tangential_complex/benchmark/CMakeLists.txt | 2 +- src/Tangential_complex/test/CMakeLists.txt | 2 +- src/Witness_complex/example/CMakeLists.txt | 8 ++----- src/Witness_complex/test/CMakeLists.txt | 4 ++-- src/common/example/CMakeLists.txt | 6 ++--- src/common/test/CMakeLists.txt | 4 ++-- src/common/utilities/CMakeLists.txt | 1 - 23 files changed, 42 insertions(+), 55 deletions(-) (limited to 'src') diff --git a/src/Alpha_complex/test/CMakeLists.txt b/src/Alpha_complex/test/CMakeLists.txt index d7f49b53..9e0b3b3c 100644 --- a/src/Alpha_complex/test/CMakeLists.txt +++ b/src/Alpha_complex/test/CMakeLists.txt @@ -5,7 +5,7 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) include(GUDHI_test_coverage) add_executable ( Alpha_complex_test_unit Alpha_complex_unit_test.cpp ) - target_link_libraries(Alpha_complex_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) + target_link_libraries(Alpha_complex_test_unit ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) if (TBB_FOUND) target_link_libraries(Alpha_complex_test_unit ${TBB_LIBRARIES}) endif() diff --git a/src/Bitmap_cubical_complex/example/CMakeLists.txt b/src/Bitmap_cubical_complex/example/CMakeLists.txt index 47f5e0c6..a0401619 100644 --- a/src/Bitmap_cubical_complex/example/CMakeLists.txt +++ b/src/Bitmap_cubical_complex/example/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.6) project(Bitmap_cubical_complex_examples) add_executable ( Bitmap_cubical_complex Bitmap_cubical_complex.cpp ) -target_link_libraries(Bitmap_cubical_complex ${Boost_SYSTEM_LIBRARY}) if (TBB_FOUND) target_link_libraries(Bitmap_cubical_complex ${TBB_LIBRARIES}) endif() @@ -14,7 +13,6 @@ add_test(NAME Bitmap_cubical_complex_example_persistence_two_sphere COMMAND $ diff --git a/src/Persistent_cohomology/benchmark/CMakeLists.txt b/src/Persistent_cohomology/benchmark/CMakeLists.txt index ea792c89..8b135ba1 100644 --- a/src/Persistent_cohomology/benchmark/CMakeLists.txt +++ b/src/Persistent_cohomology/benchmark/CMakeLists.txt @@ -5,7 +5,7 @@ project(Persistent_cohomology_benchmark) if(GMP_FOUND) if(GMPXX_FOUND) add_executable ( performance_rips_persistence EXCLUDE_FROM_ALL performance_rips_persistence.cpp ) - target_link_libraries(performance_rips_persistence ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES}) + target_link_libraries(performance_rips_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES}) if (TBB_FOUND) target_link_libraries(performance_rips_persistence ${TBB_LIBRARIES}) endif(TBB_FOUND) diff --git a/src/Persistent_cohomology/example/CMakeLists.txt b/src/Persistent_cohomology/example/CMakeLists.txt index a9884c49..f47de4c3 100644 --- a/src/Persistent_cohomology/example/CMakeLists.txt +++ b/src/Persistent_cohomology/example/CMakeLists.txt @@ -2,25 +2,23 @@ cmake_minimum_required(VERSION 2.6) project(Persistent_cohomology_examples) add_executable(plain_homology plain_homology.cpp) -target_link_libraries(plain_homology ${Boost_SYSTEM_LIBRARY}) add_executable(persistence_from_simple_simplex_tree persistence_from_simple_simplex_tree.cpp) -target_link_libraries(persistence_from_simple_simplex_tree ${Boost_SYSTEM_LIBRARY}) add_executable(rips_distance_matrix_persistence rips_distance_matrix_persistence.cpp) -target_link_libraries(rips_distance_matrix_persistence ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}) +target_link_libraries(rips_distance_matrix_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) add_executable(rips_persistence rips_persistence.cpp) -target_link_libraries(rips_persistence ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}) +target_link_libraries(rips_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) add_executable(rips_persistence_step_by_step rips_persistence_step_by_step.cpp) -target_link_libraries(rips_persistence_step_by_step ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}) +target_link_libraries(rips_persistence_step_by_step ${Boost_PROGRAM_OPTIONS_LIBRARY}) add_executable(rips_persistence_via_boundary_matrix rips_persistence_via_boundary_matrix.cpp) -target_link_libraries(rips_persistence_via_boundary_matrix ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}) +target_link_libraries(rips_persistence_via_boundary_matrix ${Boost_PROGRAM_OPTIONS_LIBRARY}) add_executable(persistence_from_file persistence_from_file.cpp) -target_link_libraries(persistence_from_file ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}) +target_link_libraries(persistence_from_file ${Boost_PROGRAM_OPTIONS_LIBRARY}) if (TBB_FOUND) target_link_libraries(plain_homology ${TBB_LIBRARIES}) @@ -60,7 +58,7 @@ if(GMP_FOUND) if(GMPXX_FOUND) add_executable(rips_multifield_persistence rips_multifield_persistence.cpp ) target_link_libraries(rips_multifield_persistence - ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES}) + ${Boost_PROGRAM_OPTIONS_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES}) if (TBB_FOUND) target_link_libraries(rips_multifield_persistence ${TBB_LIBRARIES}) endif(TBB_FOUND) @@ -72,11 +70,11 @@ endif(GMP_FOUND) if(CGAL_FOUND) add_executable(alpha_complex_3d_persistence alpha_complex_3d_persistence.cpp) - target_link_libraries(alpha_complex_3d_persistence ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY}) + target_link_libraries(alpha_complex_3d_persistence ${CGAL_LIBRARY}) add_executable(exact_alpha_complex_3d_persistence exact_alpha_complex_3d_persistence.cpp) - target_link_libraries(exact_alpha_complex_3d_persistence ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY}) + target_link_libraries(exact_alpha_complex_3d_persistence ${CGAL_LIBRARY}) add_executable(weighted_alpha_complex_3d_persistence weighted_alpha_complex_3d_persistence.cpp) - target_link_libraries(weighted_alpha_complex_3d_persistence ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY}) + target_link_libraries(weighted_alpha_complex_3d_persistence ${CGAL_LIBRARY}) if (TBB_FOUND) target_link_libraries(alpha_complex_3d_persistence ${TBB_LIBRARIES}) @@ -97,13 +95,13 @@ if(CGAL_FOUND) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) add_executable (alpha_complex_persistence alpha_complex_persistence.cpp) target_link_libraries(alpha_complex_persistence - ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}) + ${CGAL_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}) add_executable(periodic_alpha_complex_3d_persistence periodic_alpha_complex_3d_persistence.cpp) - target_link_libraries(periodic_alpha_complex_3d_persistence ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY}) + target_link_libraries(periodic_alpha_complex_3d_persistence ${CGAL_LIBRARY}) add_executable(custom_persistence_sort custom_persistence_sort.cpp) - target_link_libraries(custom_persistence_sort ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY}) + target_link_libraries(custom_persistence_sort ${CGAL_LIBRARY}) if (TBB_FOUND) target_link_libraries(alpha_complex_persistence ${TBB_LIBRARIES}) diff --git a/src/Persistent_cohomology/test/CMakeLists.txt b/src/Persistent_cohomology/test/CMakeLists.txt index 11e9a951..45f53eb9 100644 --- a/src/Persistent_cohomology/test/CMakeLists.txt +++ b/src/Persistent_cohomology/test/CMakeLists.txt @@ -4,9 +4,9 @@ project(Persistent_cohomology_tests) include(GUDHI_test_coverage) add_executable ( Persistent_cohomology_test_unit persistent_cohomology_unit_test.cpp ) -target_link_libraries(Persistent_cohomology_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Persistent_cohomology_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) add_executable ( Persistent_cohomology_test_betti_numbers betti_numbers_unit_test.cpp ) -target_link_libraries(Persistent_cohomology_test_betti_numbers ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Persistent_cohomology_test_betti_numbers ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) if (TBB_FOUND) target_link_libraries(Persistent_cohomology_test_unit ${TBB_LIBRARIES}) target_link_libraries(Persistent_cohomology_test_betti_numbers ${TBB_LIBRARIES}) @@ -22,7 +22,8 @@ gudhi_add_coverage_test(Persistent_cohomology_test_betti_numbers) if(GMPXX_FOUND AND GMP_FOUND) add_executable ( Persistent_cohomology_test_unit_multi_field persistent_cohomology_unit_test_multi_field.cpp ) - target_link_libraries(Persistent_cohomology_test_unit_multi_field ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES}) + target_link_libraries(Persistent_cohomology_test_unit_multi_field + ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES}) if (TBB_FOUND) target_link_libraries(Persistent_cohomology_test_unit_multi_field ${TBB_LIBRARIES}) endif(TBB_FOUND) diff --git a/src/Rips_complex/example/CMakeLists.txt b/src/Rips_complex/example/CMakeLists.txt index d2d3e052..2940f164 100644 --- a/src/Rips_complex/example/CMakeLists.txt +++ b/src/Rips_complex/example/CMakeLists.txt @@ -3,17 +3,13 @@ project(Rips_complex_examples) # Point cloud add_executable ( Rips_complex_example_from_off example_rips_complex_from_off_file.cpp ) -#target_link_libraries(Rips_complex_example_from_off ${Boost_SYSTEM_LIBRARY}) add_executable ( Rips_complex_example_one_skeleton_from_points example_one_skeleton_rips_from_points.cpp ) -#target_link_libraries(Rips_complex_example_one_skeleton_from_points ${Boost_SYSTEM_LIBRARY}) # Distance matrix add_executable ( Rips_complex_example_one_skeleton_from_distance_matrix example_one_skeleton_rips_from_distance_matrix.cpp ) -#target_link_libraries(Rips_complex_example_one_skeleton_from_distance_matrix ${Boost_SYSTEM_LIBRARY}) add_executable ( Rips_complex_example_from_csv_distance_matrix example_rips_complex_from_csv_distance_matrix_file.cpp ) -#target_link_libraries(Rips_complex_example_from_csv_distance_matrix ${Boost_SYSTEM_LIBRARY}) if (TBB_FOUND) target_link_libraries(Rips_complex_example_from_off ${TBB_LIBRARIES}) diff --git a/src/Rips_complex/test/CMakeLists.txt b/src/Rips_complex/test/CMakeLists.txt index 57f780f1..3da9c90d 100644 --- a/src/Rips_complex/test/CMakeLists.txt +++ b/src/Rips_complex/test/CMakeLists.txt @@ -4,7 +4,7 @@ project(Rips_complex_tests) include(GUDHI_test_coverage) add_executable ( Rips_complex_test_unit test_rips_complex.cpp ) -target_link_libraries(Rips_complex_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Rips_complex_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) if (TBB_FOUND) target_link_libraries(Rips_complex_test_unit ${TBB_LIBRARIES}) endif() diff --git a/src/Simplex_tree/example/CMakeLists.txt b/src/Simplex_tree/example/CMakeLists.txt index d05bb187..e22cc92c 100644 --- a/src/Simplex_tree/example/CMakeLists.txt +++ b/src/Simplex_tree/example/CMakeLists.txt @@ -26,7 +26,7 @@ install(TARGETS Simplex_tree_example_mini_simplex_tree DESTINATION bin) # An example with Simplex-tree using CGAL alpha_shapes_3 if(GMP_FOUND AND CGAL_FOUND) add_executable ( Simplex_tree_example_alpha_shapes_3_from_off example_alpha_shapes_3_simplex_tree_from_off_file.cpp ) - target_link_libraries(Simplex_tree_example_alpha_shapes_3_from_off ${GMP_LIBRARIES} ${CGAL_LIBRARY} ${Boost_SYSTEM_LIBRARY}) + target_link_libraries(Simplex_tree_example_alpha_shapes_3_from_off ${GMP_LIBRARIES} ${CGAL_LIBRARY}) if (TBB_FOUND) target_link_libraries(Simplex_tree_example_alpha_shapes_3_from_off ${TBB_LIBRARIES}) endif() diff --git a/src/Simplex_tree/test/CMakeLists.txt b/src/Simplex_tree/test/CMakeLists.txt index 17b0f2c2..81999de6 100644 --- a/src/Simplex_tree/test/CMakeLists.txt +++ b/src/Simplex_tree/test/CMakeLists.txt @@ -4,7 +4,7 @@ project(Simplex_tree_tests) include(GUDHI_test_coverage) add_executable ( Simplex_tree_test_unit simplex_tree_unit_test.cpp ) -target_link_libraries(Simplex_tree_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Simplex_tree_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) if (TBB_FOUND) target_link_libraries(Simplex_tree_test_unit ${TBB_LIBRARIES}) endif() diff --git a/src/Skeleton_blocker/example/CMakeLists.txt b/src/Skeleton_blocker/example/CMakeLists.txt index ce51ac39..6d685717 100644 --- a/src/Skeleton_blocker/example/CMakeLists.txt +++ b/src/Skeleton_blocker/example/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(Skeleton_blocker_example_from_simplices Skeleton_blocker_from_sim add_executable(Skeleton_blocker_example_iteration Skeleton_blocker_iteration.cpp) add_executable(Skeleton_blocker_example_link Skeleton_blocker_link.cpp) -target_link_libraries(Skeleton_blocker_example_iteration ${Boost_TIMER_LIBRARY} ${Boost_SYSTEM_LIBRARY}) +target_link_libraries(Skeleton_blocker_example_iteration ${Boost_TIMER_LIBRARY}) add_test(NAME Skeleton_blocker_example_from_simplices COMMAND $) add_test(NAME Skeleton_blocker_example_iteration COMMAND $) diff --git a/src/Skeleton_blocker/test/CMakeLists.txt b/src/Skeleton_blocker/test/CMakeLists.txt index 0887fcff..4a363294 100644 --- a/src/Skeleton_blocker/test/CMakeLists.txt +++ b/src/Skeleton_blocker/test/CMakeLists.txt @@ -4,11 +4,11 @@ project(Skeleton_blocker_tests) include(GUDHI_test_coverage) add_executable ( Skeleton_blocker_test_unit test_skeleton_blocker_complex.cpp ) -target_link_libraries(Skeleton_blocker_test_unit ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Skeleton_blocker_test_unit ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) add_executable ( Skeleton_blocker_test_geometric_complex test_skeleton_blocker_geometric_complex.cpp ) -target_link_libraries(Skeleton_blocker_test_geometric_complex ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Skeleton_blocker_test_geometric_complex ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) add_executable ( Skeleton_blocker_test_simplifiable test_skeleton_blocker_simplifiable.cpp ) -target_link_libraries(Skeleton_blocker_test_simplifiable ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Skeleton_blocker_test_simplifiable ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) # Do not forget to copy test files in current binary dir file(COPY "test2.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) diff --git a/src/Spatial_searching/test/CMakeLists.txt b/src/Spatial_searching/test/CMakeLists.txt index 2502ea5e..b9da7b4e 100644 --- a/src/Spatial_searching/test/CMakeLists.txt +++ b/src/Spatial_searching/test/CMakeLists.txt @@ -6,7 +6,7 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) add_executable( Spatial_searching_test_Kd_tree_search test_Kd_tree_search.cpp ) target_link_libraries(Spatial_searching_test_Kd_tree_search - ${CGAL_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) + ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) gudhi_add_coverage_test(Spatial_searching_test_Kd_tree_search) endif () diff --git a/src/Tangential_complex/benchmark/CMakeLists.txt b/src/Tangential_complex/benchmark/CMakeLists.txt index ef772be8..8cb16e8c 100644 --- a/src/Tangential_complex/benchmark/CMakeLists.txt +++ b/src/Tangential_complex/benchmark/CMakeLists.txt @@ -4,7 +4,7 @@ project(Tangential_complex_benchmark) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) add_executable(Tangential_complex_benchmark benchmark_tc.cpp) target_link_libraries(Tangential_complex_benchmark - ${Boost_DATE_TIME_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY}) + ${Boost_DATE_TIME_LIBRARY} ${CGAL_LIBRARY}) if (TBB_FOUND) target_link_libraries(Tangential_complex_benchmark ${TBB_LIBRARIES}) endif(TBB_FOUND) diff --git a/src/Tangential_complex/test/CMakeLists.txt b/src/Tangential_complex/test/CMakeLists.txt index fc710676..1948c8f6 100644 --- a/src/Tangential_complex/test/CMakeLists.txt +++ b/src/Tangential_complex/test/CMakeLists.txt @@ -5,7 +5,7 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) include(GUDHI_test_coverage) add_executable( Tangential_complex_test_TC test_tangential_complex.cpp ) - target_link_libraries(Tangential_complex_test_TC ${CGAL_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) + target_link_libraries(Tangential_complex_test_TC ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) if (TBB_FOUND) target_link_libraries(Tangential_complex_test_TC ${TBB_LIBRARIES}) endif() diff --git a/src/Witness_complex/example/CMakeLists.txt b/src/Witness_complex/example/CMakeLists.txt index 1e18d024..cbc53902 100644 --- a/src/Witness_complex/example/CMakeLists.txt +++ b/src/Witness_complex/example/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.6) project(Witness_complex_examples) add_executable ( Witness_complex_example_nearest_landmark_table example_nearest_landmark_table.cpp ) -target_link_libraries(Witness_complex_example_nearest_landmark_table ${Boost_SYSTEM_LIBRARY}) if (TBB_FOUND) target_link_libraries(Witness_complex_example_nearest_landmark_table ${TBB_LIBRARIES}) endif() @@ -14,17 +13,14 @@ install(TARGETS Witness_complex_example_nearest_landmark_table DESTINATION bin) # CGAL and Eigen3 are required for Euclidean version of Witness if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) add_executable( Witness_complex_example_off example_witness_complex_off.cpp ) - target_link_libraries(Witness_complex_example_off ${Boost_SYSTEM_LIBRARY}) add_executable( Witness_complex_example_strong_off example_strong_witness_complex_off.cpp ) - target_link_libraries(Witness_complex_example_strong_off ${Boost_SYSTEM_LIBRARY}) add_executable ( Witness_complex_example_sphere example_witness_complex_sphere.cpp ) - target_link_libraries(Witness_complex_example_sphere ${Boost_SYSTEM_LIBRARY}) add_executable ( Witness_complex_example_witness_persistence example_witness_complex_persistence.cpp ) - target_link_libraries(Witness_complex_example_witness_persistence ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}) + target_link_libraries(Witness_complex_example_witness_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) add_executable ( Witness_complex_example_strong_witness_persistence example_strong_witness_persistence.cpp ) - target_link_libraries(Witness_complex_example_strong_witness_persistence ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}) + target_link_libraries(Witness_complex_example_strong_witness_persistence ${Boost_PROGRAM_OPTIONS_LIBRARY}) if (TBB_FOUND) target_link_libraries(Witness_complex_example_witness_persistence ${TBB_LIBRARIES}) diff --git a/src/Witness_complex/test/CMakeLists.txt b/src/Witness_complex/test/CMakeLists.txt index 152e2f2c..0b523eaf 100644 --- a/src/Witness_complex/test/CMakeLists.txt +++ b/src/Witness_complex/test/CMakeLists.txt @@ -4,7 +4,7 @@ project(Witness_complex_tests) include(GUDHI_test_coverage) add_executable ( Witness_complex_test_simple_witness_complex test_simple_witness_complex.cpp ) -target_link_libraries(Witness_complex_test_simple_witness_complex ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Witness_complex_test_simple_witness_complex ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) if (TBB_FOUND) target_link_libraries(Witness_complex_test_simple_witness_complex ${TBB_LIBRARIES}) endif(TBB_FOUND) @@ -14,7 +14,7 @@ gudhi_add_coverage_test(Witness_complex_test_simple_witness_complex) # CGAL and Eigen3 are required for Euclidean version of Witness if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) add_executable ( Witness_complex_test_euclidean_simple_witness_complex test_euclidean_simple_witness_complex.cpp ) - target_link_libraries(Witness_complex_test_euclidean_simple_witness_complex ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) + target_link_libraries(Witness_complex_test_euclidean_simple_witness_complex ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) if (TBB_FOUND) target_link_libraries(Witness_complex_test_euclidean_simple_witness_complex ${TBB_LIBRARIES}) endif(TBB_FOUND) diff --git a/src/common/example/CMakeLists.txt b/src/common/example/CMakeLists.txt index af3c2c9d..d0a3aa80 100644 --- a/src/common/example/CMakeLists.txt +++ b/src/common/example/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6) project(Common_examples) add_executable ( vector_double_off_reader example_vector_double_points_off_reader.cpp ) -target_link_libraries(vector_double_off_reader ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY}) +target_link_libraries(vector_double_off_reader ${CGAL_LIBRARY}) add_test(NAME Common_example_vector_double_off_reader COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/SO3_10000.off") @@ -10,14 +10,14 @@ install(TARGETS vector_double_off_reader DESTINATION bin) if(CGAL_FOUND) add_executable ( cgal_3D_off_reader example_CGAL_3D_points_off_reader.cpp ) - target_link_libraries(cgal_3D_off_reader ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY}) + target_link_libraries(cgal_3D_off_reader ${CGAL_LIBRARY}) add_test(NAME Common_example_vector_cgal_3D_off_reader COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off") # need CGAL 4.7and Eigen3 if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) add_executable ( cgal_off_reader example_CGAL_points_off_reader.cpp ) - target_link_libraries(cgal_off_reader ${Boost_SYSTEM_LIBRARY} ${CGAL_LIBRARY}) + target_link_libraries(cgal_off_reader ${CGAL_LIBRARY}) add_test(NAME Common_example_vector_cgal_off_reader COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off") endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) diff --git a/src/common/test/CMakeLists.txt b/src/common/test/CMakeLists.txt index c695fbf4..5aa426d7 100644 --- a/src/common/test/CMakeLists.txt +++ b/src/common/test/CMakeLists.txt @@ -4,10 +4,10 @@ project(Common_tests) include(GUDHI_test_coverage) add_executable ( Common_test_points_off_reader test_points_off_reader.cpp ) -target_link_libraries(Common_test_points_off_reader ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Common_test_points_off_reader ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) add_executable ( Common_test_distance_matrix_reader test_distance_matrix_reader.cpp ) -target_link_libraries(Common_test_distance_matrix_reader ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) +target_link_libraries(Common_test_distance_matrix_reader ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) # Do not forget to copy test files in current binary dir file(COPY "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) diff --git a/src/common/utilities/CMakeLists.txt b/src/common/utilities/CMakeLists.txt index c2e07e7e..b3e4b436 100644 --- a/src/common/utilities/CMakeLists.txt +++ b/src/common/utilities/CMakeLists.txt @@ -3,7 +3,6 @@ project(off_file_from_shape_generator) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.6.0) add_executable ( off_file_from_shape_generator off_file_from_shape_generator.cpp ) - target_link_libraries(off_file_from_shape_generator ${Boost_SYSTEM_LIBRARY}) add_test(NAME off_file_from_shape_generator_on_sphere_1000_3_15.2 COMMAND $ "on" "sphere" "onSphere.off" "1000" "3" "15.2") add_test(NAME off_file_from_shape_generator_in_sphere_100_2 COMMAND $ -- cgit v1.2.3 From 65bd15c84df2bf660918fcbf35a87b22510640cb Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 2 Jun 2017 16:59:15 +0000 Subject: Fix install issue git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2510 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: c081183c9876761dace595a09ec04fe220846ed6 --- src/common/example/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/common/example/CMakeLists.txt b/src/common/example/CMakeLists.txt index d0a3aa80..afe865d4 100644 --- a/src/common/example/CMakeLists.txt +++ b/src/common/example/CMakeLists.txt @@ -14,14 +14,15 @@ if(CGAL_FOUND) add_test(NAME Common_example_vector_cgal_3D_off_reader COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off") - # need CGAL 4.7and Eigen3 + install(TARGETS cgal_3D_off_reader DESTINATION bin) + + # need CGAL 4.7 and Eigen3 if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) add_executable ( cgal_off_reader example_CGAL_points_off_reader.cpp ) target_link_libraries(cgal_off_reader ${CGAL_LIBRARY}) add_test(NAME Common_example_vector_cgal_off_reader COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/alphacomplexdoc.off") + install(TARGETS cgal_off_reader DESTINATION bin) endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.7.0) - install(TARGETS cgal_3D_off_reader DESTINATION bin) - install(TARGETS cgal_off_reader DESTINATION bin) endif() -- cgit v1.2.3 From 41991433af57269f1328c7c67e26eb111b060fa2 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 9 Jun 2017 06:19:25 +0000 Subject: Add BOOST_SYSTEM_NO_DEPRECATED definition git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2524 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4718264666a9289a46f282cfcf3200481966c0db --- src/cmake/modules/GUDHI_third_party_libraries.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index 7b0cda3b..5bee774a 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -100,7 +100,7 @@ add_definitions(-DBOOST_ALL_NO_LIB) # problem with Visual Studio link on Boost program_options add_definitions( -DBOOST_ALL_DYN_LINK ) # problem on Mac with boost_system and boost_thread -#add_definitions( -DBOOST_SYSTEM_NO_DEPRECATED ) +add_definitions( -DBOOST_SYSTEM_NO_DEPRECATED ) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) -- cgit v1.2.3 From 25b640d65879b719094e8d0e923812c2658c85c3 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 9 Jun 2017 07:01:18 +0000 Subject: Tangential complex test must link with boost date time library git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2525 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 2f62d58f2915eead697ba5fbb02e69719f6e471a --- src/Tangential_complex/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Tangential_complex/test/CMakeLists.txt b/src/Tangential_complex/test/CMakeLists.txt index 1948c8f6..63e51c3e 100644 --- a/src/Tangential_complex/test/CMakeLists.txt +++ b/src/Tangential_complex/test/CMakeLists.txt @@ -5,7 +5,7 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) include(GUDHI_test_coverage) add_executable( Tangential_complex_test_TC test_tangential_complex.cpp ) - target_link_libraries(Tangential_complex_test_TC ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) + target_link_libraries(Tangential_complex_test_TC ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_DATE_TIME_LIBRARY}) if (TBB_FOUND) target_link_libraries(Tangential_complex_test_TC ${TBB_LIBRARIES}) endif() -- cgit v1.2.3 From 4adbd857ff2ac187b5dfcfa25c37f32b887ae69b Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 9 Jun 2017 07:48:54 +0000 Subject: No more need of find_the_lib cmake macro to find Windows boost lib name Fix cmake warning on if with quotes git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2527 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a352820ab0a596961b9851d4a30c40196a70ff98 --- src/cmake/modules/GUDHI_third_party_libraries.cmake | 13 ------------- src/cython/CMakeLists.txt | 4 ++-- 2 files changed, 2 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index 5bee774a..b4f3eb52 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -108,19 +108,6 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) message(STATUS "boost include dirs:" ${Boost_INCLUDE_DIRS}) message(STATUS "boost library dirs:" ${Boost_LIBRARY_DIRS}) -macro( find_the_lib placeholder THE_LIBS ) - set (THE_LIB_WE_FOUND "NO") - foreach(THE_LIB ${THE_LIBS}) - if(EXISTS ${THE_LIB}) - get_filename_component(THE_LIB_WE ${THE_LIB} NAME_WE) - if (NOT THE_LIB_WE_FOUND) - set (THE_LIB_WE_FOUND "YES") - set(returnValue "${THE_LIB_WE}") - endif(NOT THE_LIB_WE_FOUND) - endif(EXISTS ${THE_LIB}) - endforeach(THE_LIB ${THE_LIBS}) -endmacro( find_the_lib ) - # Find the correct Python interpreter. # Can be set with -DPYTHON_EXECUTABLE=/usr/bin/python3 or -DPython_ADDITIONAL_VERSIONS=3 for instance. find_package(Cython) diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt index 4b56122d..adcc64e4 100644 --- a/src/cython/CMakeLists.txt +++ b/src/cython/CMakeLists.txt @@ -17,9 +17,9 @@ if(CYTHON_FOUND) if(CMAKE_COMPILER_IS_GNUCXX) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-frounding-math', ") endif(CMAKE_COMPILER_IS_GNUCXX) - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") + if (CMAKE_CXX_COMPILER_ID MATCHES Intel) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-fp-model strict', ") - endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") + endif(CMAKE_CXX_COMPILER_ID MATCHES Intel) if (DEBUG_TRACES) # For programs to be more verbose set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DDEBUG_TRACES', ") -- cgit v1.2.3 From 26ccabbd6892ddc5313a7f75c98a92c268f15747 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 9 Jun 2017 08:39:16 +0000 Subject: Remove boost timer and chrono dependencies git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2528 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 5bfb8bd5a6e49dbea9fbfbdc1d748423fc930913 --- src/Contraction/example/CMakeLists.txt | 4 ---- src/Contraction/example/Garland_heckbert.cpp | 3 --- src/Contraction/example/Rips_contraction.cpp | 6 ------ src/Skeleton_blocker/example/CMakeLists.txt | 2 -- src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp | 4 ---- src/cmake/modules/GUDHI_third_party_libraries.cmake | 2 +- 6 files changed, 1 insertion(+), 20 deletions(-) (limited to 'src') diff --git a/src/Contraction/example/CMakeLists.txt b/src/Contraction/example/CMakeLists.txt index 6443323d..83594c0e 100644 --- a/src/Contraction/example/CMakeLists.txt +++ b/src/Contraction/example/CMakeLists.txt @@ -5,10 +5,6 @@ project(Contraction_examples) add_executable(RipsContraction Rips_contraction.cpp) add_executable(GarlandHeckbert Garland_heckbert.cpp) -target_link_libraries(RipsContraction ${Boost_TIMER_LIBRARY}) -target_link_libraries(GarlandHeckbert ${Boost_TIMER_LIBRARY}) - - add_test(NAME Contraction_example_tore3D_0.2 COMMAND $ "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" "0.2") # TODO(DS) : These tests are too long under Windows diff --git a/src/Contraction/example/Garland_heckbert.cpp b/src/Contraction/example/Garland_heckbert.cpp index 8b5a6a6c..2b0dc973 100644 --- a/src/Contraction/example/Garland_heckbert.cpp +++ b/src/Contraction/example/Garland_heckbert.cpp @@ -30,7 +30,6 @@ #include #include -#include #include #include "Garland_heckbert/Error_quadric.h" @@ -165,8 +164,6 @@ int main(int argc, char *argv[]) { int num_contractions = atoi(argv[3]); - boost::timer::auto_cpu_timer t; - // constructs the contractor object with Garland Heckbert policies. Complex_contractor contractor(complex, new GH_cost(complex), diff --git a/src/Contraction/example/Rips_contraction.cpp b/src/Contraction/example/Rips_contraction.cpp index 8289b1d3..1b97f877 100644 --- a/src/Contraction/example/Rips_contraction.cpp +++ b/src/Contraction/example/Rips_contraction.cpp @@ -24,7 +24,6 @@ #include #include -#include #include struct Geometry_trait { @@ -68,8 +67,6 @@ int main(int argc, char *argv[]) { build_rips(complex, atof(argv[2])); - boost::timer::auto_cpu_timer t; - std::cout << "Initial complex has " << complex.num_vertices() << " vertices and " << complex.num_edges() << " edges" << std::endl; @@ -90,9 +87,6 @@ int main(int argc, char *argv[]) { complex.num_blockers() << " blockers and " << num_simplices << " simplices" << std::endl; - - std::cout << "Time to simplify and enumerate simplices:\n"; - return EXIT_SUCCESS; } diff --git a/src/Skeleton_blocker/example/CMakeLists.txt b/src/Skeleton_blocker/example/CMakeLists.txt index 6d685717..de70f089 100644 --- a/src/Skeleton_blocker/example/CMakeLists.txt +++ b/src/Skeleton_blocker/example/CMakeLists.txt @@ -5,8 +5,6 @@ add_executable(Skeleton_blocker_example_from_simplices Skeleton_blocker_from_sim add_executable(Skeleton_blocker_example_iteration Skeleton_blocker_iteration.cpp) add_executable(Skeleton_blocker_example_link Skeleton_blocker_link.cpp) -target_link_libraries(Skeleton_blocker_example_iteration ${Boost_TIMER_LIBRARY}) - add_test(NAME Skeleton_blocker_example_from_simplices COMMAND $) add_test(NAME Skeleton_blocker_example_iteration COMMAND $) add_test(NAME Skeleton_blocker_example_link COMMAND $) diff --git a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp index 6a1bc480..4a0044e1 100644 --- a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp +++ b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp @@ -22,8 +22,6 @@ #include -#include - #include #include #include @@ -47,8 +45,6 @@ Complex build_complete_complex(int n) { } int main(int argc, char *argv[]) { - boost::timer::auto_cpu_timer t; - const int n = 15; // build a full complex with n vertices and 2^n-1 simplices diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index b4f3eb52..2be79ee4 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -1,6 +1,6 @@ # This files manage third party libraries required by GUDHI -find_package(Boost REQUIRED COMPONENTS system filesystem unit_test_framework chrono timer date_time program_options thread) +find_package(Boost REQUIRED COMPONENTS system filesystem unit_test_framework date_time program_options thread) if(NOT Boost_FOUND) message(FATAL_ERROR "NOTICE: This program requires Boost and will not be compiled.") -- cgit v1.2.3 From 05de4e9f4ed8f74e53a11455bc50470beba908eb Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 9 Jun 2017 09:40:52 +0000 Subject: Remove boost date_time dependencies git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2529 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: daa13fc0046ffdd72577bb1b399fcbdc8ef5033c --- src/Tangential_complex/benchmark/CMakeLists.txt | 3 +-- src/Tangential_complex/example/CMakeLists.txt | 4 ++-- src/Tangential_complex/test/CMakeLists.txt | 2 +- src/cmake/modules/GUDHI_third_party_libraries.cmake | 2 +- src/common/include/gudhi/Clock.h | 18 +++++++++--------- 5 files changed, 14 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/Tangential_complex/benchmark/CMakeLists.txt b/src/Tangential_complex/benchmark/CMakeLists.txt index 8cb16e8c..8729e394 100644 --- a/src/Tangential_complex/benchmark/CMakeLists.txt +++ b/src/Tangential_complex/benchmark/CMakeLists.txt @@ -3,8 +3,7 @@ project(Tangential_complex_benchmark) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) add_executable(Tangential_complex_benchmark benchmark_tc.cpp) - target_link_libraries(Tangential_complex_benchmark - ${Boost_DATE_TIME_LIBRARY} ${CGAL_LIBRARY}) + target_link_libraries(Tangential_complex_benchmark ${CGAL_LIBRARY}) if (TBB_FOUND) target_link_libraries(Tangential_complex_benchmark ${TBB_LIBRARIES}) endif(TBB_FOUND) diff --git a/src/Tangential_complex/example/CMakeLists.txt b/src/Tangential_complex/example/CMakeLists.txt index 45c7642b..16d1339d 100644 --- a/src/Tangential_complex/example/CMakeLists.txt +++ b/src/Tangential_complex/example/CMakeLists.txt @@ -3,9 +3,9 @@ project(Tangential_complex_examples) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) add_executable( Tangential_complex_example_basic example_basic.cpp ) - target_link_libraries(Tangential_complex_example_basic ${CGAL_LIBRARY} ${Boost_DATE_TIME_LIBRARY}) + target_link_libraries(Tangential_complex_example_basic ${CGAL_LIBRARY}) add_executable( Tangential_complex_example_with_perturb example_with_perturb.cpp ) - target_link_libraries(Tangential_complex_example_with_perturb ${CGAL_LIBRARY} ${Boost_DATE_TIME_LIBRARY}) + target_link_libraries(Tangential_complex_example_with_perturb ${CGAL_LIBRARY}) if (TBB_FOUND) target_link_libraries(Tangential_complex_example_basic ${TBB_LIBRARIES}) target_link_libraries(Tangential_complex_example_with_perturb ${TBB_LIBRARIES}) diff --git a/src/Tangential_complex/test/CMakeLists.txt b/src/Tangential_complex/test/CMakeLists.txt index 63e51c3e..1948c8f6 100644 --- a/src/Tangential_complex/test/CMakeLists.txt +++ b/src/Tangential_complex/test/CMakeLists.txt @@ -5,7 +5,7 @@ if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1) include(GUDHI_test_coverage) add_executable( Tangential_complex_test_TC test_tangential_complex.cpp ) - target_link_libraries(Tangential_complex_test_TC ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_DATE_TIME_LIBRARY}) + target_link_libraries(Tangential_complex_test_TC ${CGAL_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}) if (TBB_FOUND) target_link_libraries(Tangential_complex_test_TC ${TBB_LIBRARIES}) endif() diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index 2be79ee4..8f486118 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -1,6 +1,6 @@ # This files manage third party libraries required by GUDHI -find_package(Boost REQUIRED COMPONENTS system filesystem unit_test_framework date_time program_options thread) +find_package(Boost REQUIRED COMPONENTS system filesystem unit_test_framework program_options thread) if(NOT Boost_FOUND) message(FATAL_ERROR "NOTICE: This program requires Boost and will not be compiled.") diff --git a/src/common/include/gudhi/Clock.h b/src/common/include/gudhi/Clock.h index 77f196ca..eff48e41 100644 --- a/src/common/include/gudhi/Clock.h +++ b/src/common/include/gudhi/Clock.h @@ -23,9 +23,9 @@ #ifndef CLOCK_H_ #define CLOCK_H_ -#include - +#include #include +#include namespace Gudhi { @@ -33,20 +33,20 @@ class Clock { public: // Construct and start the timer Clock(const std::string& msg_ = std::string()) - : startTime(boost::posix_time::microsec_clock::local_time()), + : startTime(std::chrono::system_clock::now()), end_called(false), msg(msg_) { } // Restart the timer void begin() const { end_called = false; - startTime = boost::posix_time::microsec_clock::local_time(); + startTime = std::chrono::system_clock::now(); } // Stop the timer void end() const { end_called = true; - endTime = boost::posix_time::microsec_clock::local_time(); + endTime = std::chrono::system_clock::now(); } std::string message() const { @@ -71,15 +71,15 @@ class Clock { // - or now otherwise. In this case, the timer is not stopped. double num_seconds() const { if (!end_called) { - auto end = boost::posix_time::microsec_clock::local_time(); - return (end - startTime).total_milliseconds() / 1000.; + auto end = std::chrono::system_clock::now(); + return std::chrono::duration_cast(end-startTime).count() / 1000.; } else { - return (endTime - startTime).total_milliseconds() / 1000.; + return std::chrono::duration_cast(endTime-startTime).count() / 1000.; } } private: - mutable boost::posix_time::ptime startTime, endTime; + mutable std::chrono::time_point startTime, endTime; mutable bool end_called; std::string msg; }; -- cgit v1.2.3 From 8a0f3bf13633cc0608e19a724873dc57e833837b Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 9 Jun 2017 09:45:41 +0000 Subject: Homogenize DEFINE profiling name for subsampling git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2530 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 99176a6381a5c81298d94a781b996904ff2e1acc --- src/Subsampling/include/gudhi/pick_n_random_points.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Subsampling/include/gudhi/pick_n_random_points.h b/src/Subsampling/include/gudhi/pick_n_random_points.h index f0e3f1f1..8c90b6bf 100644 --- a/src/Subsampling/include/gudhi/pick_n_random_points.h +++ b/src/Subsampling/include/gudhi/pick_n_random_points.h @@ -52,7 +52,7 @@ typename OutputIterator> void pick_n_random_points(Point_container const &points, std::size_t final_size, OutputIterator output_it) { -#ifdef GUDHI_SUBS_PROFILING +#ifdef GUDHI_SUBSAMPLING_PROFILING Gudhi::Clock t; #endif @@ -72,7 +72,7 @@ void pick_n_random_points(Point_container const &points, for (int l : landmarks) *output_it++ = points[l]; -#ifdef GUDHI_SUBS_PROFILING +#ifdef GUDHI_SUBSAMPLING_PROFILING t.end(); std::cerr << "Random landmark choice took " << t.num_seconds() << " seconds." << std::endl; -- cgit v1.2.3 From 7260c86a2158b0df3f33b49f314201dd51044563 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 9 Jun 2017 12:20:12 +0000 Subject: Rewrite Contraction and Skeleton blocker time display using Gudhi::Clock git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2535 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e2b5c1e152fd7bdca9d07db0390944409942ba53 --- src/Contraction/example/Garland_heckbert.cpp | 5 +++++ src/Contraction/example/Rips_contraction.cpp | 5 +++++ src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp | 3 +++ src/common/include/gudhi/Clock.h | 2 +- 4 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Contraction/example/Garland_heckbert.cpp b/src/Contraction/example/Garland_heckbert.cpp index 2b0dc973..f0cde95e 100644 --- a/src/Contraction/example/Garland_heckbert.cpp +++ b/src/Contraction/example/Garland_heckbert.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -164,6 +165,8 @@ int main(int argc, char *argv[]) { int num_contractions = atoi(argv[3]); + Gudhi::Clock contraction_chrono("Time to simplify and enumerate simplices"); + // constructs the contractor object with Garland Heckbert policies. Complex_contractor contractor(complex, new GH_cost(complex), @@ -179,6 +182,8 @@ int main(int argc, char *argv[]) { complex.num_edges() << " edges and " << complex.num_triangles() << " triangles." << std::endl; + std::cout << contraction_chrono; + // write simplified complex Gudhi::skeleton_blocker::Skeleton_blocker_off_writer off_writer(argv[2], complex); diff --git a/src/Contraction/example/Rips_contraction.cpp b/src/Contraction/example/Rips_contraction.cpp index 1b97f877..501b0e87 100644 --- a/src/Contraction/example/Rips_contraction.cpp +++ b/src/Contraction/example/Rips_contraction.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -67,6 +68,8 @@ int main(int argc, char *argv[]) { build_rips(complex, atof(argv[2])); + Gudhi::Clock contraction_chrono("Time to simplify and enumerate simplices"); + std::cout << "Initial complex has " << complex.num_vertices() << " vertices and " << complex.num_edges() << " edges" << std::endl; @@ -87,6 +90,8 @@ int main(int argc, char *argv[]) { complex.num_blockers() << " blockers and " << num_simplices << " simplices" << std::endl; + std::cout << contraction_chrono; + return EXIT_SUCCESS; } diff --git a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp index 4a0044e1..08ff0264 100644 --- a/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp +++ b/src/Skeleton_blocker/example/Skeleton_blocker_iteration.cpp @@ -21,6 +21,7 @@ */ #include +#include #include #include @@ -45,6 +46,7 @@ Complex build_complete_complex(int n) { } int main(int argc, char *argv[]) { + Gudhi::Clock skbl_chrono("Time to build the complete complex, enumerate simplices and Euler Characteristic"); const int n = 15; // build a full complex with n vertices and 2^n-1 simplices @@ -78,5 +80,6 @@ int main(int argc, char *argv[]) { std::cout << "Saw " << num_vertices << " vertices, " << num_edges << " edges and " << num_simplices << " simplices" << std::endl; std::cout << "The Euler Characteristic is " << euler << std::endl; + std::cout << skbl_chrono; return EXIT_SUCCESS; } diff --git a/src/common/include/gudhi/Clock.h b/src/common/include/gudhi/Clock.h index eff48e41..b83de2f5 100644 --- a/src/common/include/gudhi/Clock.h +++ b/src/common/include/gudhi/Clock.h @@ -62,7 +62,7 @@ class Clock { if (!clock.msg.empty()) stream << clock.msg << ": "; - stream << clock.num_seconds() << "s"; + stream << clock.num_seconds() << "s\n"; return stream; } -- cgit v1.2.3 From 547a7c9cb50d1818c9412d10cca9655503db625c Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 13 Jun 2017 20:42:51 +0000 Subject: Try to fix Windows compilation for Conda git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2541 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: afa1b10e300aafbc92a85b3519f4b39add2ae6e4 --- src/cmake/modules/GUDHI_third_party_libraries.cmake | 4 ++++ src/cython/CMakeLists.txt | 3 +++ 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index 8f486118..7cd57b25 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -10,6 +10,10 @@ find_package(GMP) if(GMP_FOUND) message(STATUS "GMP_LIBRARIES = ${GMP_LIBRARIES}") INCLUDE_DIRECTORIES(${GMP_INCLUDE_DIR}) + get_filename_component(lib_we ${GMP_LIBRARIES} NAME_WE) + + message("++ lib_we = ${lib_we}") + find_package(GMPXX) if(GMPXX_FOUND) message(STATUS "GMPXX_LIBRARIES = ${GMPXX_LIBRARIES}") diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt index adcc64e4..2a0a3844 100644 --- a/src/cython/CMakeLists.txt +++ b/src/cython/CMakeLists.txt @@ -8,6 +8,9 @@ if(CYTHON_FOUND) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_ALL_NO_LIB', ") set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_SYSTEM_NO_DEPRECATED', ") + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'boost_thread', ") + endif() # Gudhi and CGAL compilation option if(MSVC) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'/fp:strict', ") -- cgit v1.2.3 From f6d8aaaacf4a2802d3aaad6d326f9510fdb2ddf7 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 14 Jun 2017 05:24:01 +0000 Subject: Add traces for debug git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2542 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a9e8098443114a4fe6e9c19e6410169580c134c6 --- src/cmake/modules/GUDHI_third_party_libraries.cmake | 4 ---- src/cython/CMakeLists.txt | 10 ++++++++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index 7cd57b25..8f486118 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -10,10 +10,6 @@ find_package(GMP) if(GMP_FOUND) message(STATUS "GMP_LIBRARIES = ${GMP_LIBRARIES}") INCLUDE_DIRECTORIES(${GMP_INCLUDE_DIR}) - get_filename_component(lib_we ${GMP_LIBRARIES} NAME_WE) - - message("++ lib_we = ${lib_we}") - find_package(GMPXX) if(GMPXX_FOUND) message(STATUS "GMPXX_LIBRARIES = ${GMPXX_LIBRARIES}") diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt index 2a0a3844..eff36f93 100644 --- a/src/cython/CMakeLists.txt +++ b/src/cython/CMakeLists.txt @@ -8,6 +8,7 @@ if(CYTHON_FOUND) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_ALL_NO_LIB', ") set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_SYSTEM_NO_DEPRECATED', ") + message("++ Boost_THREAD_LIBRARY=${Boost_THREAD_LIBRARY} - Boost_thread_LIBRARY=${Boost_thread_LIBRARY} - ") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'boost_thread', ") endif() @@ -106,6 +107,7 @@ if(CYTHON_FOUND) if(CGAL_FOUND) # Add CGAL compilation args + message("++ CGAL_LIBRARIES = ${CGAL_LIBRARIES}") if(CGAL_HEADER_ONLY) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_HEADER_ONLY', ") else(CGAL_HEADER_ONLY) @@ -119,10 +121,14 @@ if(CYTHON_FOUND) # GMP and GMPXX are not required, but if present, CGAL will link with them. if(GMP_FOUND) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_USE_GMP', ") + get_filename_component(GMP_LIBRARY_FILE_NAME ${GMP_LIBRARIES} NAME_WE) + message("++ GMP_LIBRARY_FILE_NAME = ${GMP_LIBRARY_FILE_NAME}") if(WIN32) - set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'libgmp-10', ") + set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'${GMP_LIBRARY_FILE_NAME}', ") else(WIN32) - set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'gmp', ") + STRING(REGEX REPLACE "lib" "" UNIX_GMP_LIBRARY_FILE_NAME ${GMP_LIBRARY_FILE_NAME}) + message("++ UNIX_GMP_LIBRARY_FILE_NAME = ${UNIX_GMP_LIBRARY_FILE_NAME}") + set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'${UNIX_GMP_LIBRARY_FILE_NAME}', ") endif(WIN32) set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${GMP_LIBRARIES_DIR}', ") if(GMPXX_FOUND) -- cgit v1.2.3 From e8c3b007c141551b68859ea178e79ddf618c6dca Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 14 Jun 2017 06:38:20 +0000 Subject: Fix try git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2543 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: da6eb0ef7b79c0d21d8e98d17d78459d1768a5db --- src/cython/CMakeLists.txt | 42 +++++++++++++++++++++------------------- src/cython/cythonize_gudhi.py.in | 2 +- 2 files changed, 23 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt index eff36f93..739e1a89 100644 --- a/src/cython/CMakeLists.txt +++ b/src/cython/CMakeLists.txt @@ -1,6 +1,20 @@ cmake_minimum_required(VERSION 2.8) project(Cython) +function( add_gudhi_cython_lib THE_LIB ) + if(EXISTS ${THE_LIB}) + get_filename_component(THE_LIB_FILE_NAME ${THE_LIB} NAME_WE) + if(WIN32) + message("++ ${THE_LIB} => THE_LIB_FILE_NAME = ${THE_LIB_FILE_NAME}") + set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'${THE_LIB_FILE_NAME}', " PARENT_SCOPE) + else(WIN32) + STRING(REGEX REPLACE "lib" "" UNIX_LIB_FILE_NAME ${THE_LIB_FILE_NAME}) + message("++ ${THE_LIB} => UNIX_LIB_FILE_NAME = ${UNIX_LIB_FILE_NAME}") + set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'${UNIX_LIB_FILE_NAME}', " PARENT_SCOPE) + endif(WIN32) + endif(EXISTS ${THE_LIB}) +endfunction( add_gudhi_cython_lib ) + if(CYTHON_FOUND) message("++ ${PYTHON_EXECUTABLE} v.${PYTHON_VERSION_STRING} - Cython is ${CYTHON_EXECUTABLE} - py.test is ${PYTEST_PATH} - Sphinx is ${SPHINX_PATH}") @@ -8,9 +22,9 @@ if(CYTHON_FOUND) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_ALL_NO_LIB', ") set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_SYSTEM_NO_DEPRECATED', ") - message("++ Boost_THREAD_LIBRARY=${Boost_THREAD_LIBRARY} - Boost_thread_LIBRARY=${Boost_thread_LIBRARY} - ") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'boost_thread', ") + add_gudhi_cython_lib(${Boost_THREAD_LIBRARY}) + set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${Boost_LIBRARY_DIRS}', ") endif() # Gudhi and CGAL compilation option if(MSVC) @@ -107,33 +121,20 @@ if(CYTHON_FOUND) if(CGAL_FOUND) # Add CGAL compilation args - message("++ CGAL_LIBRARIES = ${CGAL_LIBRARIES}") if(CGAL_HEADER_ONLY) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_HEADER_ONLY', ") else(CGAL_HEADER_ONLY) - if(WIN32) - set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'CGAL-vc140-mt-4.7', ") - else(WIN32) - set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'CGAL', ") - endif(WIN32) + add_gudhi_cython_lib(${CGAL_LIBRARIES}) set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${CGAL_LIBRARIES_DIR}', ") endif(CGAL_HEADER_ONLY) # GMP and GMPXX are not required, but if present, CGAL will link with them. if(GMP_FOUND) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_USE_GMP', ") - get_filename_component(GMP_LIBRARY_FILE_NAME ${GMP_LIBRARIES} NAME_WE) - message("++ GMP_LIBRARY_FILE_NAME = ${GMP_LIBRARY_FILE_NAME}") - if(WIN32) - set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'${GMP_LIBRARY_FILE_NAME}', ") - else(WIN32) - STRING(REGEX REPLACE "lib" "" UNIX_GMP_LIBRARY_FILE_NAME ${GMP_LIBRARY_FILE_NAME}) - message("++ UNIX_GMP_LIBRARY_FILE_NAME = ${UNIX_GMP_LIBRARY_FILE_NAME}") - set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'${UNIX_GMP_LIBRARY_FILE_NAME}', ") - endif(WIN32) - set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${GMP_LIBRARIES_DIR}', ") + add_gudhi_cython_lib(${GMP_LIBRARIES}) + set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${GMP_LIBRARIES_DIR}', ") if(GMPXX_FOUND) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_USE_GMPXX', ") - set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'gmpxx', ") + add_gudhi_cython_lib(${GMPXX_LIBRARIES}) set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${GMPXX_LIBRARIES_DIR}', ") endif(GMPXX_FOUND) endif(GMP_FOUND) @@ -154,7 +155,8 @@ if(CYTHON_FOUND) if (TBB_FOUND) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DGUDHI_USE_TBB', ") - set(GUDHI_CYTHON_LIBRARIES "${GUDHI_CYTHON_LIBRARIES}'tbb', 'tbbmalloc', ") + add_gudhi_cython_lib(${TBB_RELEASE_LIBRARY}) + add_gudhi_cython_lib(${TBB_MALLOC_RELEASE_LIBRARY}) set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${TBB_LIBRARY_DIRS}', ") set(GUDHI_CYTHON_INCLUDE_DIRS "${GUDHI_CYTHON_INCLUDE_DIRS}'${TBB_INCLUDE_DIRS}', ") endif() diff --git a/src/cython/cythonize_gudhi.py.in b/src/cython/cythonize_gudhi.py.in index 5a97e9f3..cae4641b 100644 --- a/src/cython/cythonize_gudhi.py.in +++ b/src/cython/cythonize_gudhi.py.in @@ -42,7 +42,7 @@ setup( name = 'gudhi', author='Vincent Rouvreau', author_email='gudhi-contact@lists.gforge.inria.fr', - version='0.1.0', + version='@GUDHI_VERSION@', url='http://gudhi.gforge.inria.fr/', ext_modules = cythonize(gudhi), ) -- cgit v1.2.3 From 30d31a1aabc2035e23eca7bcf3867a30536f11b7 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 16 Jun 2017 07:06:49 +0000 Subject: Fix Python module version numer Fix link with external libraries git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2547 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e2f47e860ea4608a4d298fa4772d750ac540be5a --- CMakeGUDHIVersion.txt | 2 +- src/cython/cythonize_gudhi.py.in | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index bd0c57ac..3d9add66 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,6 +1,6 @@ set (GUDHI_MAJOR_VERSION 2) set (GUDHI_MINOR_VERSION 0) -set (GUDHI_PATCH_VERSION 0) +set (GUDHI_PATCH_VERSION 1.beta) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) message(STATUS "GUDHI version : ${GUDHI_VERSION}") diff --git a/src/cython/cythonize_gudhi.py.in b/src/cython/cythonize_gudhi.py.in index cae4641b..68a95916 100644 --- a/src/cython/cythonize_gudhi.py.in +++ b/src/cython/cythonize_gudhi.py.in @@ -35,6 +35,7 @@ gudhi = Extension( extra_link_args=[@GUDHI_CYTHON_EXTRA_LINK_ARGS@], libraries=[@GUDHI_CYTHON_LIBRARIES@], library_dirs=[@GUDHI_CYTHON_LIBRARY_DIRS@], + runtime_library_dirs=[@GUDHI_CYTHON_LIBRARY_DIRS@], include_dirs = [@GUDHI_CYTHON_INCLUDE_DIRS@], ) -- cgit v1.2.3 From 30b44fa282606a6a6b585e0e83b98dae4f2e6b2e Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 16 Jun 2017 08:12:26 +0000 Subject: Add warning about boost_thread link for the Mac GUDHI python module git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2548 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4a9f6c43f4868bd4f303579c22fdc7a54728e68c --- src/cython/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt index 739e1a89..84441591 100644 --- a/src/cython/CMakeLists.txt +++ b/src/cython/CMakeLists.txt @@ -22,6 +22,15 @@ if(CYTHON_FOUND) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_ALL_NO_LIB', ") set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DBOOST_SYSTEM_NO_DEPRECATED', ") + # TODO: Something more clever could be done. + # This is because of https://github.com/CGAL/cgal/blob/master/Installation/include/CGAL/tss.h + # CGAL is using boost thread if thread_local is not ready (requires XCode 8 for Mac). + # The test in https://github.com/CGAL/cgal/blob/master/Installation/include/CGAL/config.h + # #if __has_feature(cxx_thread_local) || \ + # ( (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L ) || \ + # ( _MSC_VER >= 1900 ) + # #define CGAL_CAN_USE_CXX11_THREAD_LOCAL + # #endif if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") add_gudhi_cython_lib(${Boost_THREAD_LIBRARY}) set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${Boost_LIBRARY_DIRS}', ") -- cgit v1.2.3 From 06f595c9bbe1f7fbc1d4e9dae7f5a0a384fe62c2 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 16 Jun 2017 09:27:12 +0000 Subject: Fix CUSTOMBUILD : error : don't know how to set runtime library search path for MSVC git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/boost_system_no_deprecated_test@2549 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 94c7625b3bc8e943e3856e0e65dc65bb5d8cd0f7 --- src/cython/CMakeLists.txt | 8 ++++---- src/cython/cythonize_gudhi.py.in | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt index 84441591..7586188c 100644 --- a/src/cython/CMakeLists.txt +++ b/src/cython/CMakeLists.txt @@ -170,6 +170,10 @@ if(CYTHON_FOUND) set(GUDHI_CYTHON_INCLUDE_DIRS "${GUDHI_CYTHON_INCLUDE_DIRS}'${TBB_INCLUDE_DIRS}', ") endif() + if(UNIX) + set( GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}") + endif(UNIX) + # set sphinx-build in make files configure_file(doc/Makefile.in "${CMAKE_CURRENT_BINARY_DIR}/doc/Makefile" @ONLY) configure_file(doc/make.bat.in "${CMAKE_CURRENT_BINARY_DIR}/doc/make.bat" @ONLY) @@ -187,10 +191,6 @@ if(CYTHON_FOUND) add_custom_target(cython ALL DEPENDS gudhi.so COMMENT "Do not forget to add ${CMAKE_CURRENT_BINARY_DIR}/ to your PYTHONPATH before using examples or tests") - if(UNIX) - set( ENV{PYTHONPATH} $ENV{PYTHONPATH}:${CMAKE_CURRENT_BINARY_DIR}/ ) - endif(UNIX) - # For installation purpose # TODO(VR) : files matching pattern mechanism is copying all cython directory install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" DESTINATION "${PYTHON_SITE_PACKAGES}/" FILES_MATCHING diff --git a/src/cython/cythonize_gudhi.py.in b/src/cython/cythonize_gudhi.py.in index 68a95916..c1a1717a 100644 --- a/src/cython/cythonize_gudhi.py.in +++ b/src/cython/cythonize_gudhi.py.in @@ -35,8 +35,8 @@ gudhi = Extension( extra_link_args=[@GUDHI_CYTHON_EXTRA_LINK_ARGS@], libraries=[@GUDHI_CYTHON_LIBRARIES@], library_dirs=[@GUDHI_CYTHON_LIBRARY_DIRS@], - runtime_library_dirs=[@GUDHI_CYTHON_LIBRARY_DIRS@], include_dirs = [@GUDHI_CYTHON_INCLUDE_DIRS@], + runtime_library_dirs=[@GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS@], ) setup( -- cgit v1.2.3