Skip to content

christopher-besch/pybind11_cmake_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resources

Compilation

git clone https://github.com/christopher-besch/pybind11_cmake_test --recurse
cd pybind11_cmake_test
mkdir build && cd build
# '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON' is optional and only used by certein IDEs for static analysis
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
# '-j4' uses 4 threads; can be set to anything
cmake --build . -j4

Use

# to be run from build directory
python
>>> import my_math.my_math as math
>>> math.add(2, 7)
9

About

Template for using pybind11 with CMake.

Resources

Stars

Watchers

Forks