summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-09-25 16:10:24 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-09-25 16:10:24 +0000
commit7386c4054e33dd28448b040b7e35cb093901f228 (patch)
tree9815ea1b648cae4c93fd3e844668b60fa1dff36f /src
parent7865ef2cc4abd972b2ba1eb50790912820fa2ee2 (diff)
parentfa19484e31dbe0b63d50475f15e654a5e1a0c4e1 (diff)
merge last trunk modifications
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alpha_complex_3d_module_vincent@3908 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: ab0fe69130ba3cbb329e0e975053809180edba5d
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/GUDHIConfig.cmake.in7
-rw-r--r--src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h5
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h5
-rw-r--r--src/common/doc/installation.h24
-rw-r--r--src/cython/CMakeLists.txt27
6 files changed, 55 insertions, 15 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c60346d5..6c446104 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -71,7 +71,7 @@ export(PACKAGE GUDHI)
message("++ make install will install ${PROJECT_NAME} in the following directory : ${CMAKE_INSTALL_PREFIX}")
# Create the GUDHIConfig.cmake and GUDHIConfigVersion files
-set(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include")
+set(CONF_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/include;${CMAKE_INSTALL_PREFIX}/include")
configure_file(GUDHIConfig.cmake.in "${PROJECT_BINARY_DIR}/GUDHIConfig.cmake" @ONLY)
configure_file(GUDHIConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/GUDHIConfigVersion.cmake" @ONLY)
diff --git a/src/GUDHIConfig.cmake.in b/src/GUDHIConfig.cmake.in
index 02b540dc..8d82f235 100644
--- a/src/GUDHIConfig.cmake.in
+++ b/src/GUDHIConfig.cmake.in
@@ -1,7 +1,12 @@
# - Config file for the GUDHI package
# It defines the following variables
# GUDHI_INCLUDE_DIRS - include directories for GUDHI
+#
+# Order is :
+# 1. user defined GUDHI_INCLUDE_DIRS
+# 2. ${CMAKE_SOURCE_DIR}/include => Where the 'cmake' has been done
+# 3. ${CMAKE_INSTALL_PREFIX}/include => Where the 'make install' has been performed
# Compute paths
-set(GUDHI_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@")
+set(GUDHI_INCLUDE_DIRS "${GUDHI_INCLUDE_DIRS};@CONF_INCLUDE_DIRS@")
diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
index c68b5c0b..c51e47a5 100644
--- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
+++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
@@ -300,7 +300,10 @@ class Persistent_cohomology {
// with multiplicity. We used to sum the coefficients directly in
// annotations_in_boundary by using a map, we now do it later.
typedef std::pair<Column *, int> annotation_t;
- thread_local std::vector<annotation_t> annotations_in_boundary;
+#ifdef GUDHI_CAN_USE_CXX11_THREAD_LOCAL
+ thread_local
+#endif // GUDHI_CAN_USE_CXX11_THREAD_LOCAL
+ std::vector<annotation_t> annotations_in_boundary;
annotations_in_boundary.clear();
int sign = 1 - 2 * (dim_sigma % 2); // \in {-1,1} provides the sign in the
// alternate sum in the boundary.
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index ee96d5a2..3ab23c12 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -1057,7 +1057,10 @@ class Simplex_tree {
Dictionary_it next = siblings->members().begin();
++next;
- thread_local std::vector<std::pair<Vertex_handle, Node> > inter;
+#ifdef GUDHI_CAN_USE_CXX11_THREAD_LOCAL
+ thread_local
+#endif // GUDHI_CAN_USE_CXX11_THREAD_LOCAL
+ std::vector<std::pair<Vertex_handle, Node> > inter;
for (Dictionary_it s_h = siblings->members().begin();
s_h != siblings->members().end(); ++s_h, ++next) {
Simplex_handle root_sh = find_vertex(s_h->first);
diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h
index d36a216f..ab54cbc7 100644
--- a/src/common/doc/installation.h
+++ b/src/common/doc/installation.h
@@ -2,22 +2,34 @@
* \tableofcontents
* As GUDHI is a header only library, there is no need to install the library.
*
- * Examples of GUDHI headers inclusion can be found in \ref demos.
+ * Examples of GUDHI headers inclusion can be found in \ref utilities.
*
* \section compiling Compiling
* The library uses c++11 and requires <a target="_blank" href="http://www.boost.org/">Boost</a> &ge; 1.48.0
* and <a target="_blank" href="https://www.cmake.org/">CMake</a> &ge; 3.1.
* It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015.
*
- * \subsection demos Demos and examples
- * To build the demos and examples, run the following commands in a terminal:
+ * \subsection utilities Utilities and examples
+ * To build the utilities, run the following commands in a terminal:
\verbatim cd /path-to-gudhi/
mkdir build
cd build/
cmake ..
make \endverbatim
- * A list of examples is available <a href="examples.html">here</a>.
+ * By default, examples are disabled. You can activate their compilation with
+ * <a href="https://cmake.org/cmake/help/v3.0/manual/ccmake.1.html">ccmake</a> (on Linux and Mac OSX),
+ * <a href="https://cmake.org/cmake/help/v3.0/manual/cmake-gui.1.html">cmake-gui</a> (on Windows) or y mofifying the
+ * cmake command as follows :
+\verbatim cmake -DWITH_GUDHI_EXAMPLE=ON ..
+make \endverbatim
+ * A list of utilities and examples is available <a href="examples.html">here</a>.
*
+ * \subsection libraryinstallation Installation
+ * To install the library (headers and activated utilities), run the following command in a terminal:
+ * \verbatim make install \endverbatim
+ * This action may require to be in the sudoer or administrator of the machine in function of the operating system and
+ * of <a href="https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html">CMAKE_INSTALL_PREFIX</a>.
+ *
* \subsection testsuites Test suites
* To test your build, run the following command in a terminal:
* \verbatim make test \endverbatim
@@ -31,6 +43,10 @@ make doxygen
# You can customize the directory name by calling `cmake -DUSER_VERSION_DIR=/my/custom/folder`
\endverbatim
*
+ * \subsection helloworld Hello world !
+ * The <a target="_blank" href="https://gitlab.inria.fr/GUDHI/hello-gudhi-world">Hello world for GUDHI</a>
+ * project is an example to help developers to make their own C++ project on top of the GUDHI library.
+ *
* \section optionallibrary Optional third-party library
* \subsection gmp GMP
* The multi-field persistent homology algorithm requires GMP which is a free library for arbitrary-precision
diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt
index 1849a6ec..09ea28f1 100644
--- a/src/cython/CMakeLists.txt
+++ b/src/cython/CMakeLists.txt
@@ -130,7 +130,11 @@ if(CYTHON_FOUND)
if(CGAL_FOUND)
can_cgal_use_cxx11_thread_local()
if (NOT CGAL_CAN_USE_CXX11_THREAD_LOCAL_RESULT)
- add_gudhi_cython_lib(${Boost_THREAD_LIBRARY})
+ if(CMAKE_BUILD_TYPE MATCHES Debug)
+ add_gudhi_cython_lib("${Boost_THREAD_LIBRARY_DEBUG}")
+ else()
+ add_gudhi_cython_lib("${Boost_THREAD_LIBRARY_RELEASE}")
+ endif()
set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${Boost_LIBRARY_DIRS}', ")
endif()
# Add CGAL compilation args
@@ -139,22 +143,26 @@ if(CYTHON_FOUND)
set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_HEADER_ONLY', ")
else(CGAL_HEADER_ONLY)
add_gudhi_debug_info("CGAL version ${CGAL_VERSION}")
- add_gudhi_cython_lib(${CGAL_LIBRARY})
+ add_gudhi_cython_lib("${CGAL_LIBRARY}")
set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${CGAL_LIBRARIES_DIR}', ")
# If CGAL is not header only, CGAL library may link with boost system,
- add_gudhi_cython_lib(${Boost_SYSTEM_LIBRARY})
+ if(CMAKE_BUILD_TYPE MATCHES Debug)
+ add_gudhi_cython_lib("${Boost_SYSTEM_LIBRARY_DEBUG}")
+ else()
+ add_gudhi_cython_lib("${Boost_SYSTEM_LIBRARY_RELEASE}")
+ endif()
set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${Boost_LIBRARY_DIRS}', ")
endif(CGAL_HEADER_ONLY)
# GMP and GMPXX are not required, but if present, CGAL will link with them.
if(GMP_FOUND)
add_gudhi_debug_info("GMP_LIBRARIES = ${GMP_LIBRARIES}")
set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_USE_GMP', ")
- add_gudhi_cython_lib(${GMP_LIBRARIES})
+ add_gudhi_cython_lib("${GMP_LIBRARIES}")
set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${GMP_LIBRARIES_DIR}', ")
if(GMPXX_FOUND)
add_gudhi_debug_info("GMPXX_LIBRARIES = ${GMPXX_LIBRARIES}")
set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_USE_GMPXX', ")
- add_gudhi_cython_lib(${GMPXX_LIBRARIES})
+ add_gudhi_cython_lib("${GMPXX_LIBRARIES}")
set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${GMPXX_LIBRARIES_DIR}', ")
endif(GMPXX_FOUND)
endif(GMP_FOUND)
@@ -176,8 +184,13 @@ if(CYTHON_FOUND)
if (TBB_FOUND AND WITH_GUDHI_USE_TBB)
add_gudhi_debug_info("TBB version ${TBB_INTERFACE_VERSION} found and used")
set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DGUDHI_USE_TBB', ")
- add_gudhi_cython_lib(${TBB_RELEASE_LIBRARY})
- add_gudhi_cython_lib(${TBB_MALLOC_RELEASE_LIBRARY})
+ if(CMAKE_BUILD_TYPE MATCHES Debug)
+ add_gudhi_cython_lib("${TBB_DEBUG_LIBRARY}")
+ add_gudhi_cython_lib("${TBB_MALLOC_DEBUG_LIBRARY}")
+ else()
+ add_gudhi_cython_lib("${TBB_RELEASE_LIBRARY}")
+ add_gudhi_cython_lib("${TBB_MALLOC_RELEASE_LIBRARY}")
+ endif()
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()