These are the required steps to use Boost.Python with your C++ project:
- As in the previous recipe, we start by defining the minimum version, the project name, supported language, and the default build type:
# define minimum cmake versioncmake_minimum_required(VERSION 3.5 FATAL_ERROR)# project name and supported languageproject(recipe-04 LANGUAGES CXX)# require C++11set(CMAKE_CXX_STANDARD 11)set(CMAKE_CXX_EXTENSIONS OFF)set(CMAKE_CXX_STANDARD_REQUIRED ON)# we default to Release build typeif(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)endif()
- In this recipe, we depend on the Python and Boost libraries as well as the Python interpreter for testing. The name of the Boost.Python component ...