Example pybind11 module built with a CMake-based build system
|
||
---|---|---|
pybind11@0a07805ab6 | ||
src | ||
.appveyor.yml | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
CMakeLists.txt | ||
license.md | ||
readme.md | ||
setup.py | ||
test.py |
Building pybind11 modules with CMake
An example of building a Python extension using pybind11 and CMake. This is useful for C++ codebases that already have an existing CMake-based build system.
Install
- Make sure CMake >= 2.8.12 is installed on your system
- Clone this repository
pip install ./pybind11_cmake_example
Test
import cmake_example
cmake_example.add(1, 2)