From b61611728970de6a9f19fe29de11b9f7087063d8 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Mon, 21 Nov 2022 19:23:45 +0100 Subject: Insert vertices first --- src/python/gudhi/simplex_tree.pxd | 3 ++- src/python/gudhi/simplex_tree.pyx | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/python/gudhi/simplex_tree.pxd b/src/python/gudhi/simplex_tree.pxd index f86f1232..5309c6fa 100644 --- a/src/python/gudhi/simplex_tree.pxd +++ b/src/python/gudhi/simplex_tree.pxd @@ -56,7 +56,8 @@ cdef extern from "Simplex_tree_interface.h" namespace "Gudhi": int upper_bound_dimension() nogil bool find_simplex(vector[int] simplex) nogil bool insert(vector[int] simplex, double filtration) nogil - void insert_matrix(double* filtrations, int n, int stride0, int stride1, double max_filtration) nogil + void insert_matrix(double* filtrations, int n, int stride0, int stride1, double max_filtration) nogil except + + void insert_batch_vertices(vector[int] v, double f) nogil except + vector[pair[vector[int], double]] get_star(vector[int] simplex) nogil vector[pair[vector[int], double]] get_cofaces(vector[int] simplex, int dimension) nogil void expansion(int max_dim) nogil except + diff --git a/src/python/gudhi/simplex_tree.pyx b/src/python/gudhi/simplex_tree.pyx index 18215d2f..4cf176f5 100644 --- a/src/python/gudhi/simplex_tree.pyx +++ b/src/python/gudhi/simplex_tree.pyx @@ -12,6 +12,7 @@ from libc.stdint cimport intptr_t, int32_t, int64_t import numpy as np cimport gudhi.simplex_tree cimport cython +from numpy.math cimport INFINITY __author__ = "Vincent Rouvreau" __copyright__ = "Copyright (C) 2016 Inria" @@ -239,7 +240,7 @@ cdef class SimplexTree: @staticmethod @cython.boundscheck(False) - def create_from_array(filtrations, double max_filtration=np.inf): + def create_from_array(filtrations, double max_filtration=INFINITY): """Creates a new, empty complex and inserts vertices and edges. The vertices are numbered from 0 to n-1, and the filtration values are encoded in the array, with the diagonal representing the vertices. It is the caller's responsibility to ensure that this defines a filtration, which can be achieved with either:: @@ -281,6 +282,8 @@ cdef class SimplexTree: .. seealso:: :func:`insert_batch` """ + # Without this, it could be slow if we end up inserting vertices in a bad order (flat_map). + self.get_ptr().insert_batch_vertices(np.unique(np.stack((edges.row, edges.col))), INFINITY) # TODO: optimize this? for edge in zip(edges.row, edges.col, edges.data): self.get_ptr().insert((edge[0], edge[1]), edge[2]) @@ -303,8 +306,7 @@ cdef class SimplexTree: :param filtrations: the filtration values. :type filtrations: numpy.array of shape (n,) """ - # This may be slow if we end up inserting vertices in a bad order (flat_map). - # We could first insert the vertices from np.unique(vertex_array), or leave it to the caller. + cdef vector[int] vertices = np.unique(vertex_array) cdef Py_ssize_t k = vertex_array.shape[0] cdef Py_ssize_t n = vertex_array.shape[1] assert filtrations.shape[0] == n, 'inconsistent sizes for vertex_array and filtrations' @@ -312,6 +314,9 @@ cdef class SimplexTree: cdef Py_ssize_t j cdef vector[int] v with nogil: + # Without this, it could be slow if we end up inserting vertices in a bad order (flat_map). + # NaN currently does the wrong thing + self.get_ptr().insert_batch_vertices(vertices, INFINITY) for i in range(n): for j in range(k): v.push_back(vertex_array[j, i]) -- cgit v1.2.3 From 9920ebf573304c19dd18389ddcff3e677a8bc92a Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Tue, 15 Nov 2022 15:50:18 +0100 Subject: Fall back to Hera's bottleneck without CGAL Once we move to Hera 2, we could just add it to include_directories and not bother adding it specifically for 3 python files + some tests and examples. [skip ci] --- src/Nerve_GIC/example/CMakeLists.txt | 34 +++++++++------------ src/Nerve_GIC/include/gudhi/GIC.h | 17 +++++++++-- src/Nerve_GIC/test/CMakeLists.txt | 17 +++++------ src/Nerve_GIC/utilities/CMakeLists.txt | 36 ++++++++++------------ src/python/CMakeLists.txt | 56 +++++++++++++++++----------------- 5 files changed, 80 insertions(+), 80 deletions(-) diff --git a/src/Nerve_GIC/example/CMakeLists.txt b/src/Nerve_GIC/example/CMakeLists.txt index 4b0f4677..9faf1f3b 100644 --- a/src/Nerve_GIC/example/CMakeLists.txt +++ b/src/Nerve_GIC/example/CMakeLists.txt @@ -1,25 +1,21 @@ project(Nerve_GIC_examples) -if (NOT CGAL_VERSION VERSION_LESS 4.11.0) +add_executable ( CoordGIC CoordGIC.cpp ) +add_executable ( FuncGIC FuncGIC.cpp ) - add_executable ( CoordGIC CoordGIC.cpp ) - add_executable ( FuncGIC FuncGIC.cpp ) +if (TBB_FOUND) + target_link_libraries(CoordGIC ${TBB_LIBRARIES}) + target_link_libraries(FuncGIC ${TBB_LIBRARIES}) +endif() - if (TBB_FOUND) - target_link_libraries(CoordGIC ${TBB_LIBRARIES}) - target_link_libraries(FuncGIC ${TBB_LIBRARIES}) - endif() +# Copy files for not to pollute sources when testing +file(COPY "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) +file(COPY "${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) +file(COPY "${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat_PCA1" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - # Copy files for not to pollute sources when testing - file(COPY "${CMAKE_SOURCE_DIR}/data/points/tore3D_1307.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - file(COPY "${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - file(COPY "${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat_PCA1" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) +add_test(NAME Nerve_GIC_example_CoordGIC COMMAND $ + "${CMAKE_CURRENT_BINARY_DIR}/tore3D_1307.off" "0") - add_test(NAME Nerve_GIC_example_CoordGIC COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/tore3D_1307.off" "0") - - add_test(NAME Nerve_GIC_example_FuncGIC COMMAND $ - "${CMAKE_CURRENT_BINARY_DIR}/lucky_cat.off" - "${CMAKE_CURRENT_BINARY_DIR}/lucky_cat_PCA1") - -endif (NOT CGAL_VERSION VERSION_LESS 4.11.0) +add_test(NAME Nerve_GIC_example_FuncGIC COMMAND $ + "${CMAKE_CURRENT_BINARY_DIR}/lucky_cat.off" + "${CMAKE_CURRENT_BINARY_DIR}/lucky_cat_PCA1") diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h index 1b1f9323..3f9f0dc5 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -17,6 +17,14 @@ #include #endif +#if __has_include() +# define GUDHI_GIC_USE_CGAL 1 +# include +#elif __has_include() +# define GUDHI_GIC_USE_HERA 1 +# include +#endif + #include #include #include @@ -25,7 +33,6 @@ #include #include #include -#include #include #include @@ -35,8 +42,6 @@ #include #include -#include // for CGAL_VERSION_NR - #include #include #include @@ -1228,7 +1233,13 @@ class Cover_complex { Cboot.set_cover_from_function(); Cboot.find_simplices(); Cboot.compute_PD(); +#ifdef GUDHI_GIC_USE_CGAL double db = Gudhi::persistence_diagram::bottleneck_distance(this->PD, Cboot.PD); +#elif defined GUDHI_GIC_USE_HERA + double db = hera::bottleneckDistExact(this->PD, Cboot.PD); +#else + throw std::logic_error("This function requires CGAL or Hera for the bottleneck distance."); +#endif if (verbose) std::clog << db << std::endl; distribution.push_back(db); } diff --git a/src/Nerve_GIC/test/CMakeLists.txt b/src/Nerve_GIC/test/CMakeLists.txt index 567bf43f..e012a178 100644 --- a/src/Nerve_GIC/test/CMakeLists.txt +++ b/src/Nerve_GIC/test/CMakeLists.txt @@ -1,15 +1,12 @@ project(Graph_induced_complex_tests) -if (NOT CGAL_VERSION VERSION_LESS 4.11.0) - include(GUDHI_boost_test) +include(GUDHI_boost_test) - add_executable ( Nerve_GIC_test_unit test_GIC.cpp ) - if (TBB_FOUND) - target_link_libraries(Nerve_GIC_test_unit ${TBB_LIBRARIES}) - endif() +add_executable ( Nerve_GIC_test_unit test_GIC.cpp ) +if (TBB_FOUND) + target_link_libraries(Nerve_GIC_test_unit ${TBB_LIBRARIES}) +endif() - file(COPY data DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) +file(COPY data DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - gudhi_add_boost_test(Nerve_GIC_test_unit) - -endif (NOT CGAL_VERSION VERSION_LESS 4.11.0) +gudhi_add_boost_test(Nerve_GIC_test_unit) diff --git a/src/Nerve_GIC/utilities/CMakeLists.txt b/src/Nerve_GIC/utilities/CMakeLists.txt index 65a08d9a..4521a992 100644 --- a/src/Nerve_GIC/utilities/CMakeLists.txt +++ b/src/Nerve_GIC/utilities/CMakeLists.txt @@ -1,27 +1,23 @@ project(Nerve_GIC_examples) -if (NOT CGAL_VERSION VERSION_LESS 4.11.0) +add_executable ( Nerve Nerve.cpp ) +add_executable ( VoronoiGIC VoronoiGIC.cpp ) - add_executable ( Nerve Nerve.cpp ) - add_executable ( VoronoiGIC VoronoiGIC.cpp ) +if (TBB_FOUND) + target_link_libraries(Nerve ${TBB_LIBRARIES}) + target_link_libraries(VoronoiGIC ${TBB_LIBRARIES}) +endif() - if (TBB_FOUND) - target_link_libraries(Nerve ${TBB_LIBRARIES}) - target_link_libraries(VoronoiGIC ${TBB_LIBRARIES}) - endif() +file(COPY KeplerMapperVisuFromTxtFile.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) +# Copy files for not to pollute sources when testing +file(COPY "${CMAKE_SOURCE_DIR}/data/points/human.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - file(COPY KeplerMapperVisuFromTxtFile.py km.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - # Copy files for not to pollute sources when testing - file(COPY "${CMAKE_SOURCE_DIR}/data/points/human.off" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) +add_test(NAME Nerve_GIC_utilities_nerve COMMAND $ + "human.off" "2" "10" "0.3") - add_test(NAME Nerve_GIC_utilities_nerve COMMAND $ - "human.off" "2" "10" "0.3") +add_test(NAME Nerve_GIC_utilities_VoronoiGIC COMMAND $ + "human.off" "100") - add_test(NAME Nerve_GIC_utilities_VoronoiGIC COMMAND $ - "human.off" "100") - - install(TARGETS Nerve DESTINATION bin) - install(TARGETS VoronoiGIC DESTINATION bin) - install(FILES KeplerMapperVisuFromTxtFile.py km.py km.py.COPYRIGHT DESTINATION bin) - -endif (NOT CGAL_VERSION VERSION_LESS 4.11.0) +install(TARGETS Nerve DESTINATION bin) +install(TARGETS VoronoiGIC DESTINATION bin) +install(FILES KeplerMapperVisuFromTxtFile.py km.py km.py.COPYRIGHT DESTINATION bin) diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 32ec13bd..8bf176fc 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -163,10 +163,10 @@ if(PYTHONINTERP_FOUND) set(GUDHI_PYBIND11_MODULES "${GUDHI_PYBIND11_MODULES}'clustering/_tomato', ") set(GUDHI_PYBIND11_MODULES "${GUDHI_PYBIND11_MODULES}'hera/wasserstein', ") set(GUDHI_PYBIND11_MODULES "${GUDHI_PYBIND11_MODULES}'hera/bottleneck', ") + set(GUDHI_CYTHON_MODULES "${GUDHI_CYTHON_MODULES}'nerve_gic', ") if (NOT CGAL_VERSION VERSION_LESS 4.11.0) set(GUDHI_PYBIND11_MODULES "${GUDHI_PYBIND11_MODULES}'datasets/generators/_points', ") set(GUDHI_PYBIND11_MODULES "${GUDHI_PYBIND11_MODULES}'bottleneck', ") - set(GUDHI_CYTHON_MODULES "${GUDHI_CYTHON_MODULES}'nerve_gic', ") endif () if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.11.0) set(GUDHI_CYTHON_MODULES "${GUDHI_CYTHON_MODULES}'subsampling', ") @@ -432,38 +432,38 @@ if(PYTHONINTERP_FOUND) ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/bottleneck_basic_example.py") add_gudhi_py_test(test_bottleneck_distance) + endif (NOT CGAL_VERSION VERSION_LESS 4.11.0) - # Cover complex - file(COPY ${CMAKE_SOURCE_DIR}/data/points/human.off DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - file(COPY ${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat.off DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - file(COPY ${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat_PCA1 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) - add_test(NAME cover_complex_nerve_example_py_test - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND ${CMAKE_COMMAND} -E env "${GUDHI_PYTHON_PATH_ENV}" - ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/nerve_of_a_covering.py" - -f human.off -c 2 -r 10 -g 0.3) + # Cover complex + file(COPY ${CMAKE_SOURCE_DIR}/data/points/human.off DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) + file(COPY ${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat.off DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) + file(COPY ${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat_PCA1 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) + add_test(NAME cover_complex_nerve_example_py_test + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E env "${GUDHI_PYTHON_PATH_ENV}" + ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/nerve_of_a_covering.py" + -f human.off -c 2 -r 10 -g 0.3) - add_test(NAME cover_complex_coordinate_gic_example_py_test - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND ${CMAKE_COMMAND} -E env "${GUDHI_PYTHON_PATH_ENV}" - ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/coordinate_graph_induced_complex.py" - -f human.off -c 0 -v) + add_test(NAME cover_complex_coordinate_gic_example_py_test + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E env "${GUDHI_PYTHON_PATH_ENV}" + ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/coordinate_graph_induced_complex.py" + -f human.off -c 0 -v) - add_test(NAME cover_complex_functional_gic_example_py_test - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND ${CMAKE_COMMAND} -E env "${GUDHI_PYTHON_PATH_ENV}" - ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/functional_graph_induced_complex.py" - -o lucky_cat.off - -f lucky_cat_PCA1 -v) + add_test(NAME cover_complex_functional_gic_example_py_test + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E env "${GUDHI_PYTHON_PATH_ENV}" + ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/functional_graph_induced_complex.py" + -o lucky_cat.off + -f lucky_cat_PCA1 -v) - add_test(NAME cover_complex_voronoi_gic_example_py_test - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND ${CMAKE_COMMAND} -E env "${GUDHI_PYTHON_PATH_ENV}" - ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/voronoi_graph_induced_complex.py" - -f human.off -n 700 -v) + add_test(NAME cover_complex_voronoi_gic_example_py_test + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E env "${GUDHI_PYTHON_PATH_ENV}" + ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/voronoi_graph_induced_complex.py" + -f human.off -n 700 -v) - add_gudhi_py_test(test_cover_complex) - endif (NOT CGAL_VERSION VERSION_LESS 4.11.0) + add_gudhi_py_test(test_cover_complex) if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 5.1.0) # Alpha -- cgit v1.2.3 From a63010aba4fedd80fc9076c9e10e9afce7a0755f Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 16 Nov 2022 14:34:11 +0100 Subject: Always include Hera's directory --- src/cmake/modules/GUDHI_submodules.cmake | 2 ++ src/python/setup.py.in | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmake/modules/GUDHI_submodules.cmake b/src/cmake/modules/GUDHI_submodules.cmake index c844386d..9ede852d 100644 --- a/src/cmake/modules/GUDHI_submodules.cmake +++ b/src/cmake/modules/GUDHI_submodules.cmake @@ -1,3 +1,5 @@ # For those who dislike bundled dependencies, this indicates where to find a preinstalled Hera. set(HERA_INTERNAL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/ext/hera/include) set(HERA_INCLUDE_DIR ${HERA_INTERNAL_INCLUDE_DIR} CACHE PATH "Directory where one can find hera/{wasserstein.h,bottleneck.h}") +# since everything is cleanly under include/hera/, there is no harm always including it +include_directories(${HERA_INCLUDE_DIR}) diff --git a/src/python/setup.py.in b/src/python/setup.py.in index 1ecbe985..af921894 100644 --- a/src/python/setup.py.in +++ b/src/python/setup.py.in @@ -27,7 +27,7 @@ extra_compile_args=[@GUDHI_PYTHON_EXTRA_COMPILE_ARGS@] extra_link_args=[@GUDHI_PYTHON_EXTRA_LINK_ARGS@] libraries=[@GUDHI_PYTHON_LIBRARIES@] library_dirs=[@GUDHI_PYTHON_LIBRARY_DIRS@] -include_dirs = [numpy_get_include(), '@CMAKE_CURRENT_SOURCE_DIR@/gudhi/', @GUDHI_PYTHON_INCLUDE_DIRS@] +include_dirs = [numpy_get_include(), '@CMAKE_CURRENT_SOURCE_DIR@/gudhi/', '@HERA_INCLUDE_DIR@', @GUDHI_PYTHON_INCLUDE_DIRS@] runtime_library_dirs=[@GUDHI_PYTHON_RUNTIME_LIBRARY_DIRS@] # Create ext_modules list from module list @@ -48,8 +48,6 @@ ext_modules = cythonize(ext_modules, compiler_directives={'language_level': '3'} for module in pybind11_modules: my_include_dirs = include_dirs + [pybind11.get_include(False), pybind11.get_include(True)] - if module.startswith('hera/'): - my_include_dirs = ['@HERA_INCLUDE_DIR@'] + my_include_dirs ext_modules.append(Extension( 'gudhi.' + module.replace('/', '.'), sources = [source_dir + module + '.cc'], -- cgit v1.2.3 From ae423409b495166a52f473e387f031db7996b371 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 16 Nov 2022 14:57:04 +0100 Subject: Declare variable even on the error path. --- src/Nerve_GIC/include/gudhi/GIC.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h index 3f9f0dc5..560f7d6c 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -1238,6 +1238,7 @@ class Cover_complex { #elif defined GUDHI_GIC_USE_HERA double db = hera::bottleneckDistExact(this->PD, Cboot.PD); #else + double db; throw std::logic_error("This function requires CGAL or Hera for the bottleneck distance."); #endif if (verbose) std::clog << db << std::endl; -- cgit v1.2.3 From b7277485f6aa568f65abc9dbbe8d9420fad9575c Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 16 Nov 2022 15:11:24 +0100 Subject: Update the path for Hera --- src/Nerve_GIC/include/gudhi/GIC.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Nerve_GIC/include/gudhi/GIC.h b/src/Nerve_GIC/include/gudhi/GIC.h index 560f7d6c..047fba61 100644 --- a/src/Nerve_GIC/include/gudhi/GIC.h +++ b/src/Nerve_GIC/include/gudhi/GIC.h @@ -20,9 +20,9 @@ #if __has_include() # define GUDHI_GIC_USE_CGAL 1 # include -#elif __has_include() +#elif __has_include() # define GUDHI_GIC_USE_HERA 1 -# include +# include #endif #include -- cgit v1.2.3 From 511755957af00e7a4dac0af579551d53f844fa51 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 16 Nov 2022 16:21:20 +0100 Subject: Checkout submodules for all CircleCI jobs --- .circleci/config.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e2df5c87..ad6f0e3f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,6 +12,7 @@ jobs: - run: name: Build and test examples command: | + git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -26,6 +27,7 @@ jobs: - run: name: Build and test unitary tests command: | + git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=ON -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -40,6 +42,7 @@ jobs: - run: name: Build and test utilities command: | + git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=ON -DWITH_GUDHI_PYTHON=OFF .. @@ -54,8 +57,7 @@ jobs: - run: name: Build and test python module. Generates and tests the python documentation command: | - git submodule init - git submodule update + git submodule update --init mkdir build cd build cmake -DWITH_GUDHI_THIRD_PARTY=OFF -DUSER_VERSION_DIR=version .. @@ -85,8 +87,7 @@ jobs: - run: name: Generates the C++ documentation with doxygen command: | - git submodule init - git submodule update + git submodule update --init mkdir build cd build cmake -DWITH_GUDHI_THIRD_PARTY=OFF -DUSER_VERSION_DIR=version .. @@ -116,6 +117,7 @@ jobs: - run: name: Build and test examples without cgal and eigen command: | + git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -130,6 +132,7 @@ jobs: - run: name: Build and test unitary tests without cgal and eigen command: | + git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=ON -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -144,6 +147,7 @@ jobs: - run: name: Build and test utilities without cgal and eigen command: | + git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=ON -DWITH_GUDHI_PYTHON=OFF .. @@ -158,8 +162,7 @@ jobs: - run: name: Build and test python module without cgal and eigen command: | - git submodule init - git submodule update + git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=ON -DPython_ADDITIONAL_VERSIONS=3 .. @@ -178,6 +181,7 @@ jobs: - run: name: Build and test examples without cgal command: | + git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DEIGEN3_INCLUDE_DIR=/eigen-3.3.9 -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -192,6 +196,7 @@ jobs: - run: name: Build and test unitary tests without cgal command: | + git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DEIGEN3_INCLUDE_DIR=/eigen-3.3.9 -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=ON -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -206,6 +211,7 @@ jobs: - run: name: Build and test utilities without cgal command: | + git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DEIGEN3_INCLUDE_DIR=/eigen-3.3.9 -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=ON -DWITH_GUDHI_PYTHON=OFF .. @@ -220,8 +226,7 @@ jobs: - run: name: Build and test python module without cgal command: | - git submodule init - git submodule update + git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DEIGEN3_INCLUDE_DIR=/eigen-3.3.9 -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=ON -DPython_ADDITIONAL_VERSIONS=3 .. -- cgit v1.2.3 From 99cb6c464b103a05cddd65fa88a9c341f1b384bc Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 25 Nov 2022 11:51:49 +0100 Subject: Remove redundant include --- src/python/setup.py.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/setup.py.in b/src/python/setup.py.in index af921894..6eb0db42 100644 --- a/src/python/setup.py.in +++ b/src/python/setup.py.in @@ -27,7 +27,7 @@ extra_compile_args=[@GUDHI_PYTHON_EXTRA_COMPILE_ARGS@] extra_link_args=[@GUDHI_PYTHON_EXTRA_LINK_ARGS@] libraries=[@GUDHI_PYTHON_LIBRARIES@] library_dirs=[@GUDHI_PYTHON_LIBRARY_DIRS@] -include_dirs = [numpy_get_include(), '@CMAKE_CURRENT_SOURCE_DIR@/gudhi/', '@HERA_INCLUDE_DIR@', @GUDHI_PYTHON_INCLUDE_DIRS@] +include_dirs = [numpy_get_include(), '@CMAKE_CURRENT_SOURCE_DIR@/gudhi/', @GUDHI_PYTHON_INCLUDE_DIRS@] runtime_library_dirs=[@GUDHI_PYTHON_RUNTIME_LIBRARY_DIRS@] # Create ext_modules list from module list -- cgit v1.2.3 From e591a9564ddf31befd153acd088e19b50421807c Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 25 Nov 2022 11:55:57 +0100 Subject: CircleCI tweak --- .circleci/config.yml | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ad6f0e3f..fc363ea7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,10 +9,11 @@ jobs: - image: gudhi/ci_for_gudhi:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test examples command: | - git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -24,10 +25,11 @@ jobs: - image: gudhi/ci_for_gudhi:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test unitary tests command: | - git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=ON -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -39,10 +41,11 @@ jobs: - image: gudhi/ci_for_gudhi:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test utilities command: | - git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=ON -DWITH_GUDHI_PYTHON=OFF .. @@ -54,10 +57,11 @@ jobs: - image: gudhi/ci_for_gudhi:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test python module. Generates and tests the python documentation command: | - git submodule update --init mkdir build cd build cmake -DWITH_GUDHI_THIRD_PARTY=OFF -DUSER_VERSION_DIR=version .. @@ -84,10 +88,11 @@ jobs: - image: gudhi/doxygen_for_gudhi:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Generates the C++ documentation with doxygen command: | - git submodule update --init mkdir build cd build cmake -DWITH_GUDHI_THIRD_PARTY=OFF -DUSER_VERSION_DIR=version .. @@ -114,10 +119,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test examples without cgal and eigen command: | - git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -129,10 +135,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test unitary tests without cgal and eigen command: | - git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=ON -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -144,10 +151,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test utilities without cgal and eigen command: | - git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=ON -DWITH_GUDHI_PYTHON=OFF .. @@ -159,10 +167,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test python module without cgal and eigen command: | - git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=ON -DPython_ADDITIONAL_VERSIONS=3 .. @@ -178,10 +187,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test examples without cgal command: | - git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DEIGEN3_INCLUDE_DIR=/eigen-3.3.9 -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -193,10 +203,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test unitary tests without cgal command: | - git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DEIGEN3_INCLUDE_DIR=/eigen-3.3.9 -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=ON -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF .. @@ -208,10 +219,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test utilities without cgal command: | - git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DEIGEN3_INCLUDE_DIR=/eigen-3.3.9 -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=ON -DWITH_GUDHI_PYTHON=OFF .. @@ -223,10 +235,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout + - run: git submodule sync + - run: git submodule update --init - run: name: Build and test python module without cgal command: | - git submodule update --init mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DEIGEN3_INCLUDE_DIR=/eigen-3.3.9 -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=ON -DPython_ADDITIONAL_VERSIONS=3 .. -- cgit v1.2.3 From 46f4ef780df47e977e9acd95436bded4f5a69ada Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 25 Nov 2022 12:22:58 +0100 Subject: CircleCI tweak 2 --- .circleci/config.yml | 91 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 26 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fc363ea7..c8c0b70b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,8 +9,11 @@ jobs: - image: gudhi/ci_for_gudhi:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test examples command: | @@ -25,8 +28,11 @@ jobs: - image: gudhi/ci_for_gudhi:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test unitary tests command: | @@ -41,8 +47,11 @@ jobs: - image: gudhi/ci_for_gudhi:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test utilities command: | @@ -57,8 +66,11 @@ jobs: - image: gudhi/ci_for_gudhi:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test python module. Generates and tests the python documentation command: | @@ -88,8 +100,11 @@ jobs: - image: gudhi/doxygen_for_gudhi:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Generates the C++ documentation with doxygen command: | @@ -119,8 +134,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test examples without cgal and eigen command: | @@ -135,8 +153,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test unitary tests without cgal and eigen command: | @@ -151,8 +172,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test utilities without cgal and eigen command: | @@ -167,8 +191,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test python module without cgal and eigen command: | @@ -187,8 +214,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test examples without cgal command: | @@ -203,8 +233,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test unitary tests without cgal command: | @@ -219,8 +252,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test utilities without cgal command: | @@ -235,8 +271,11 @@ jobs: - image: gudhi/ci_for_gudhi_wo_cgal:latest steps: - checkout - - run: git submodule sync - - run: git submodule update --init + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init - run: name: Build and test python module without cgal command: | -- cgit v1.2.3 From 7637d0e1d07144631bf7c22bbec5356a7376fc11 Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Thu, 1 Dec 2022 10:46:24 +0100 Subject: python ctest was not launched for python circleci job --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index c8c0b70b..b59b7562 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -82,6 +82,7 @@ jobs: cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=ON -DPython_ADDITIONAL_VERSIONS=3 -DWITH_GUDHI_REMOTE_TEST=ON . cd python python3 setup.py build_ext --inplace + ctest --output-on-failure make sphinx cp -R sphinx /tmp/sphinx python3 setup.py install -- cgit v1.2.3 From 18fa67330d5a3ba1848b9143c23cc46877e67baf Mon Sep 17 00:00:00 2001 From: Vincent Rouvreau Date: Fri, 2 Dec 2022 09:42:45 +0100 Subject: Modifications to test biblio files in CI --- .circleci/config.yml | 20 ++++++++++++++++++++ biblio/bibliography.bib | 2 +- biblio/test/test_biblio.tex | 7 +++++++ biblio/test/test_gudhi_citation.tex | 7 +++++++ src/Doxyfile.in | 1 - src/cmake/modules/GUDHI_user_version_target.cmake | 7 +++++-- 6 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 biblio/test/test_biblio.tex create mode 100644 biblio/test/test_gudhi_citation.tex diff --git a/.circleci/config.yml b/.circleci/config.yml index c8c0b70b..bf95d2f5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -125,6 +125,26 @@ jobs: path: /tmp/doxygen destination: doxygen + bibliography: + docker: + - image: gudhi/doxygen_for_gudhi:latest + steps: + - checkout + - run: + name: Checkout submodules + command: | + git submodule sync + git submodule update --init + - run: + name: Test the LaTeX bibliography files + command: | + mkdir build + cd build + cmake -DWITH_GUDHI_THIRD_PARTY=OFF -DUSER_VERSION_DIR=version .. + cd biblio/test + latexmk -pdf -interaction=nonstopmode test_biblio.tex + latexmk -pdf -interaction=nonstopmode test_gudhi_citation.tex + ### With all third parties, except CGAL and Eigen diff --git a/biblio/bibliography.bib b/biblio/bibliography.bib index 0a3ef43d..d8472ad0 100644 --- a/biblio/bibliography.bib +++ b/biblio/bibliography.bib @@ -1090,7 +1090,7 @@ language={English} @ARTICLE{Reininghaus_Huber_ALL_PSSK, author = {J. Reininghaus and S. Huber and U. Bauer and R. Kwitt}, title = {A Stable Multi-Scale Kernel for Topological Machine Learning.}, - journal = {Proc. 2015 IEEE Conf. Comp. Vision & Pat. Rec. (CVPR '15)}, + journal = {Proc. 2015 IEEE Conf. Comp. Vision \& Pat. Rec. (CVPR '15)}, year = {2015} } diff --git a/biblio/test/test_biblio.tex b/biblio/test/test_biblio.tex new file mode 100644 index 00000000..97dee9ed --- /dev/null +++ b/biblio/test/test_biblio.tex @@ -0,0 +1,7 @@ +\documentclass{article} +\usepackage{hyperref} +\bibliographystyle{plainurl} +\begin{document} +\nocite{*} +\bibliography{../bibliography} +\end{document} \ No newline at end of file diff --git a/biblio/test/test_gudhi_citation.tex b/biblio/test/test_gudhi_citation.tex new file mode 100644 index 00000000..5fb2d33d --- /dev/null +++ b/biblio/test/test_gudhi_citation.tex @@ -0,0 +1,7 @@ +\documentclass{article} +\usepackage{hyperref} +\bibliographystyle{plainurl} +\begin{document} +\nocite{*} +\bibliography{../how_to_cite_gudhi} +\end{document} \ No newline at end of file diff --git a/src/Doxyfile.in b/src/Doxyfile.in index 1ec190d9..d5664a49 100644 --- a/src/Doxyfile.in +++ b/src/Doxyfile.in @@ -700,7 +700,6 @@ LAYOUT_FILE = # search path. See also \cite for info how to create references. CITE_BIB_FILES = @CMAKE_SOURCE_DIR@/biblio/bibliography.bib \ - @CMAKE_SOURCE_DIR@/biblio/how_to_cite_cgal.bib \ @CMAKE_SOURCE_DIR@/biblio/how_to_cite_gudhi.bib #--------------------------------------------------------------------------- diff --git a/src/cmake/modules/GUDHI_user_version_target.cmake b/src/cmake/modules/GUDHI_user_version_target.cmake index 2144ff6f..b9bf1414 100644 --- a/src/cmake/modules/GUDHI_user_version_target.cmake +++ b/src/cmake/modules/GUDHI_user_version_target.cmake @@ -18,14 +18,17 @@ add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E string(TIMESTAMP GUDHI_VERSION_YEAR "%Y") configure_file(${CMAKE_SOURCE_DIR}/biblio/how_to_cite_gudhi.bib.in "${CMAKE_CURRENT_BINARY_DIR}/biblio/how_to_cite_gudhi.bib" @ONLY) file(COPY "${CMAKE_SOURCE_DIR}/biblio/bibliography.bib" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/biblio/") +file(COPY "${CMAKE_SOURCE_DIR}/biblio/test" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/biblio") # append cgal citation inside bibliography - sphinx cannot deal with more than one bib file file(READ "${CMAKE_SOURCE_DIR}/biblio/how_to_cite_cgal.bib" CGAL_CITATION_CONTENT) file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/biblio/bibliography.bib" "${CGAL_CITATION_CONTENT}") -# Copy biblio directory for user version +# Copy biblio files for user version add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E - copy_directory ${CMAKE_CURRENT_BINARY_DIR}/biblio ${GUDHI_USER_VERSION_DIR}/biblio) + copy ${CMAKE_CURRENT_BINARY_DIR}/biblio/bibliography.bib ${GUDHI_USER_VERSION_DIR}/biblio/bibliography.bib) +add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E + copy ${CMAKE_CURRENT_BINARY_DIR}/biblio/how_to_cite_gudhi.bib ${GUDHI_USER_VERSION_DIR}/biblio/how_to_cite_gudhi.bib) add_custom_command(TARGET user_version PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/README.md ${GUDHI_USER_VERSION_DIR}/README.md) -- cgit v1.2.3