Skip to content

Commit

Permalink
Issue #81: using platform-specific suffix for discovering boost_pytho…
Browse files Browse the repository at this point in the history
…n and boost_numpy
  • Loading branch information
dzhoshkun committed Apr 15, 2019
1 parent 4d48b4b commit 36c7caf
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/cmake/boost.python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,22 @@ if(NOT PYTHONLIBS_VERSION_STRING)
endif()
endif()
if(PYTHONLIBS_VERSION_STRING MATCHES ^3\.*)
SET(GG_BOOST_PYTHON_SUFFIX 3)
if(UNIX)
SET(GG_BOOST_PYTHON_SUFFIX 3)
elseif(WIN32)
if(PYTHONLIBS_VERSION_STRING MATCHES ^3\.7\.*)
SET(GG_BOOST_PYTHON_SUFFIX 37)
else()
MESSAGE(FATAL_ERROR
"Found Python version ${PYTHONLIBS_VERSION_STRING} (on Windows only 3.7 is experimentally supported)")
endif()
endif()
elseif(PYTHONLIBS_VERSION_STRING MATCHES ^2\.7\.*)
SET(GG_BOOST_PYTHON_SUFFIX "")
if(UNIX)
SET(GG_BOOST_PYTHON_SUFFIX "")
elseif(WIN32)
SET(GG_BOOST_PYTHON_SUFFIX 27)
endif()
else()
MESSAGE(FATAL_ERROR "Found unsupported Python version ${PYTHONLIBS_VERSION_STRING}")
endif()
Expand Down

0 comments on commit 36c7caf

Please sign in to comment.