summaryrefslogtreecommitdiff
path: root/ext/pybind11/tests/test_cmake_build/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pybind11/tests/test_cmake_build/main.cpp')
-rw-r--r--ext/pybind11/tests/test_cmake_build/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/pybind11/tests/test_cmake_build/main.cpp b/ext/pybind11/tests/test_cmake_build/main.cpp
new file mode 100644
index 000000000..e0f5b69c9
--- /dev/null
+++ b/ext/pybind11/tests/test_cmake_build/main.cpp
@@ -0,0 +1,10 @@
+#include <pybind11/pybind11.h>
+namespace py = pybind11;
+
+PYBIND11_PLUGIN(test_cmake_build) {
+ py::module m("test_cmake_build");
+
+ m.def("add", [](int i, int j) { return i + j; });
+
+ return m.ptr();
+}