mirror of
https://github.com/pybind/pybind11.git
synced 2024-12-12 14:57:14 +00:00
b0f3885c95
Add a BUILD_INTERFACE and a pybind11::pybind11 alias for the interface library to match the installed target. Add new cmake tests for add_subdirectory and consolidates the .cpp and .py files needed for the cmake build tests: Before: tests |-- test_installed_module | |-- CMakeLists.txt | |-- main.cpp | \-- test.py \-- test_installed_target |-- CMakeLists.txt |-- main.cpp \-- test.py After: tests \-- test_cmake_build |-- installed_module/CMakeLists.txt |-- installed_target/CMakeLists.txt |-- subdirectory_module/CMakeLists.txt |-- subdirectory_target/CMakeLists.txt |-- main.cpp \-- test.py
6 lines
142 B
Python
6 lines
142 B
Python
import sys
|
|
import test_cmake_build
|
|
|
|
assert test_cmake_build.add(1, 2) == 3
|
|
print("{} imports, runs, and adds: 1 + 2 = 3".format(sys.argv[1]))
|