summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2015-09-15 16:39:10 +0200
committerAlexis Hildebrandt <afh@surryhill.net>2015-09-15 16:39:10 +0200
commit49a0601c142d535afe5bc722593535bf66408b2d (patch)
tree07cd764766b72d9e161009fdfd7a05afb5313b3c /CMakeLists.txt
parent32eca734799a6ebe95c727482a3fcb8688098548 (diff)
downloadfork-ledger-49a0601c142d535afe5bc722593535bf66408b2d.tar.gz
fork-ledger-49a0601c142d535afe5bc722593535bf66408b2d.tar.bz2
fork-ledger-49a0601c142d535afe5bc722593535bf66408b2d.zip
Add workaround for Boost.Python compile errors
when using version 1.59.0
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2516b530..96d4d663 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -164,6 +164,32 @@ endif()
cmake_pop_check_state()
+# Check if fix for https://github.com/boostorg/python/issues/39 is needed
+if (HAVE_BOOST_PYTHON)
+cmake_push_check_state()
+
+set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH} ${Boost_INCLUDE_DIRS})
+set(CMAKE_REQUIRED_LIBRARIES ${Boost_LIBRARIES} ${PROFILE_LIBS})
+
+check_cxx_source_runs("
+#include <boost/python.hpp>
+
+struct X { int y; };
+
+int main()
+{
+ boost::python::make_setter(&X::y);
+}" BOOST_MAKE_SETTER_RUNS)
+
+if (BOOST_MAKE_SETTER_RUNS)
+ set(HAVE_BOOST_159_ISSUE_39 0)
+else()
+ set(HAVE_BOOST_159_ISSUE_39 1)
+endif()
+
+cmake_pop_check_state()
+endif()
+
########################################################################
include_directories(${CMAKE_INCLUDE_PATH})