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