From b554d1296888f567c3a661cbd6de2a57457528d1 Mon Sep 17 00:00:00 2001 From: Tim Landscheidt Date: Sun, 27 Jan 2019 14:09:31 +0000 Subject: Add Travis CI setup for macOS and homebrew-installed Boost On macOS, CMake detects the Boost.Python component installed by homebrew only when named "python27". Thus this change not only adds a Travis CI setup for macOS, but also a CMake option to switch the component name between "python" and "python27". In addition, precompiling system.hh does not work with the current setup for Clang, so another CMake option to disable it is added. The currently used commands to compile specific versions of Boost do not produce a result that works out of the box on macOS. It should be possible just to mimic homebrew's formula for boost-python (https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost-python.rb), but for the moment on macOS this change tests only against Boost installed by homebrew. --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c2c27097..2116701e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,10 +27,12 @@ endif() ######################################################################## option(USE_PYTHON "Build support for the Python scripting bridge" OFF) +OPTION(USE_PYTHON27_COMPONENT "Use python27 as name of Boost.Python component" OFF) option(USE_DOXYGEN "Build reference documentation using Doxygen" OFF) option(DISABLE_ASSERTS "Build without any internal consistency checks" OFF) option(BUILD_DEBUG "Build support for runtime debugging" OFF) +option(PRECOMPILE_SYSTEM_HH "Precompile system.hh" ON) option(BUILD_LIBRARY "Build and install Ledger as a library" ON) option(BUILD_DOCS "Build and install documentation" OFF) @@ -67,7 +69,11 @@ if (USE_PYTHON) find_package(PythonLibs) if (PYTHONLIBS_FOUND) - set(BOOST_PYTHON python) + if(USE_PYTHON27_COMPONENT) + set(BOOST_PYTHON "python27") + else() + set(BOOST_PYTHON "python") + endif() set(HAVE_BOOST_PYTHON 1) include_directories(SYSTEM ${PYTHON_INCLUDE_DIRS}) else() -- cgit v1.2.3