summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2016-06-22 15:44:06 +0200
committerAlexis Hildebrandt <afh@surryhill.net>2016-06-22 15:44:06 +0200
commit34fec311884f874ffc16c4f7e8263f1270dfc2d6 (patch)
tree212faa69c6046946acfb0f2222cd1c24e432573d /CMakeLists.txt
parent01220484f428a447e9b00e071a0d85185f30e1de (diff)
downloadfork-ledger-34fec311884f874ffc16c4f7e8263f1270dfc2d6.tar.gz
fork-ledger-34fec311884f874ffc16c4f7e8263f1270dfc2d6.tar.bz2
fork-ledger-34fec311884f874ffc16c4f7e8263f1270dfc2d6.zip
[cmake] Fix detection for Boost Python 1.59.0 workaround
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad96b345..969ded69 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,6 +93,7 @@ include(CheckIncludeFiles)
include(CheckLibraryExists)
include(CheckFunctionExists)
include(CheckCSourceCompiles)
+include(CheckCXXSourceCompiles)
include(CheckCXXSourceRuns)
include(CMakePushCheckState)
@@ -173,7 +174,7 @@ set(CMAKE_REQUIRED_INCLUDES
set(CMAKE_REQUIRED_LIBRARIES
${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ${PROFILE_LIBS})
-check_cxx_source_runs("
+check_cxx_source_compiles("
#include <boost/python.hpp>
struct X { int y; };
@@ -181,9 +182,10 @@ struct X { int y; };
int main()
{
boost::python::make_setter(&X::y);
-}" BOOST_MAKE_SETTER_RUNS)
+ return 0;
+}" BOOST_MAKE_SETTER_COMPILES)
-if (BOOST_MAKE_SETTER_RUNS)
+if (BOOST_MAKE_SETTER_COMPILES)
set(HAVE_BOOST_159_ISSUE_39 0)
else()
set(HAVE_BOOST_159_ISSUE_39 1)