summaryrefslogtreecommitdiff
path: root/cmake/modules/GUDHI_third_party_libraries.cmake
diff options
context:
space:
mode:
authorGard Spreemann <gspreemann@gmail.com>2017-10-08 11:15:17 +0200
committerGard Spreemann <gspreemann@gmail.com>2017-10-08 11:15:17 +0200
commit866f6ce614e9c09c97fed12c8c0c2c9fb84fad3f (patch)
tree0c90eb9bab09ccc9785cdf2dc59f0ec861670b85 /cmake/modules/GUDHI_third_party_libraries.cmake
parent8d7329f3e5ad843e553c3c5503cecc28ef2eead6 (diff)
GUDHI 2.0.1 as released by upstream in a tarball.upstream/2.0.1
Diffstat (limited to 'cmake/modules/GUDHI_third_party_libraries.cmake')
-rw-r--r--cmake/modules/GUDHI_third_party_libraries.cmake28
1 files changed, 10 insertions, 18 deletions
diff --git a/cmake/modules/GUDHI_third_party_libraries.cmake b/cmake/modules/GUDHI_third_party_libraries.cmake
index 5f84c602..f2bbafdc 100644
--- a/cmake/modules/GUDHI_third_party_libraries.cmake
+++ b/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 program_options thread)
if(NOT Boost_FOUND)
message(FATAL_ERROR "NOTICE: This program requires Boost and will not be compiled.")
@@ -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})
@@ -106,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)
@@ -128,17 +117,20 @@ if(NOT GUDHI_CYTHON_PATH)
endif(NOT GUDHI_CYTHON_PATH)
if(PYTHONINTERP_FOUND AND CYTHON_FOUND)
- # Unitary tests are available through py.test
- find_program( PYTEST_PATH py.test )
# Default found version 2
if(PYTHON_VERSION_MAJOR EQUAL 2)
# Documentation generation is available through sphinx
find_program( SPHINX_PATH sphinx-build )
elseif(PYTHON_VERSION_MAJOR EQUAL 3)
- # Documentation generation is available through sphinx
- set(SPHINX_PATH "${CMAKE_SOURCE_DIR}/${GUDHI_CYTHON_PATH}/doc/python3-sphinx-build")
+ # No sphinx-build in Pyton3, just hack it
+ set(SPHINX_PATH "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/${GUDHI_CYTHON_PATH}/doc/python3-sphinx-build.py")
else()
message(FATAL_ERROR "ERROR: Try to compile the Cython interface. Python version ${PYTHON_VERSION_STRING} is not valid.")
endif(PYTHON_VERSION_MAJOR EQUAL 2)
+ # get PYTHON_SITE_PACKAGES relative path from a python command line
+ execute_process(
+ COMMAND "${PYTHON_EXECUTABLE}" -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(prefix='', plat_specific=True))"
+ OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
endif(PYTHONINTERP_FOUND AND CYTHON_FOUND)