2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 05:42:30 +00:00

Append python version detector

Slight modifications from Jim Bosch for more standard language in
build system language.
This commit is contained in:
Toshiki Teramura
2014-11-20 22:27:15 +09:00
committed by Jim Bosch
parent 7ff5465e7d
commit e2c23fd5f9

View File

@@ -31,12 +31,17 @@ find_package(NumPy REQUIRED)
# set(Boost_USE_STATIC_LIBS ON)
# set(Boost_USE_MULTITHREADED ON)
# set(Boost_USE_STATIC_RUNTIME ON)
FIND_PACKAGE(Boost COMPONENTS python REQUIRED)
if(${PYTHON_VERSION_STRING} GREATER 3.0)
message(STATUS "Using Python3")
find_package(Boost COMPONENTS python3 REQUIRED)
else()
message(STATUS "Using Python2")
find_package(Boost COMPONENTS python REQUIRED)
endif()
message( STATUS "found boost:"
"\nINCLUDE: ${Boost_INCLUDE_DIRS}"
"\nLIB: ${Boost_LIBRARIES}"
)
message( STATUS "Boost Paths:")
message( STATUS "Include : " ${Boost_INCLUDE_DIRS})
message( STATUS "Libraries: " ${Boost_LIBRARIES})
# add_definitions( -DBOOST_ALL_NO_LIB )
# In some cases, you may need to explicitly specify that a dynamic Boost is used; if so use: