[pybind11] 06/07: Use CMake to build the autopkgtest example tests
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sat Feb 11 15:08:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository pybind11.
commit 961f3e5dfb8127ccfc306e95763d03038e679eb4
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date: Fri Feb 10 20:45:42 2017 +0000
Use CMake to build the autopkgtest example tests
---
debian/tests/control | 12 ++++++------
debian/tests/example/CMakeLists.txt | 5 +++++
debian/tests/{ => example}/example.cpp | 0
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/debian/tests/control b/debian/tests/control
index dd61d08..bf1f129 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,11 +1,11 @@
-Test-Command: c++ -shared -fPIC `python-config --cflags --ldflags` -o $AUTOPKGTEST_TMP/example.so ./debian/tests/example.cpp
- ; PYTHONPATH=$AUTOPKGTEST_TMP python -c "import example; assert(example.add(1, 2) == 3)"
-Depends: g++ | c++-compiler, pybind11-dev, python-dev
+Test-Command: cp debian/tests/example/* $AUTOPKGTEST_TMP && cd $AUTOPKGTEST_TMP
+ ; cmake . && make && python -c "import example; assert(example.add(1, 2) == 3)"
+Depends: cmake, g++ | c++-compiler, pybind11-dev, python-dev
Restrictions: allow-stderr
-Test-Command: c++ -shared -fPIC `python3-config --cflags --ldflags` -o $AUTOPKGTEST_TMP/example.so ./debian/tests/example.cpp
- ; PYTHONPATH=$AUTOPKGTEST_TMP python3 -c "import example; assert(example.add(1, 2) == 3)"
-Depends: g++ | c++-compiler, pybind11-dev, python3-dev
+Test-Command: cp debian/tests/example/* $AUTOPKGTEST_TMP && cd $AUTOPKGTEST_TMP
+ ; cmake . && make && python3 -c "import example; assert(example.add(1, 2) == 3)"
+Depends: cmake, g++ | c++-compiler, pybind11-dev, python3-dev
Restrictions: allow-stderr
Test-Command: python -c "import pybind11; print pybind11.get_include()"
diff --git a/debian/tests/example/CMakeLists.txt b/debian/tests/example/CMakeLists.txt
new file mode 100644
index 0000000..ec499f1
--- /dev/null
+++ b/debian/tests/example/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 2.8.12)
+project(pybind11-example)
+
+find_package(pybind11 REQUIRED)
+pybind11_add_module(example example.cpp)
diff --git a/debian/tests/example.cpp b/debian/tests/example/example.cpp
similarity index 100%
rename from debian/tests/example.cpp
rename to debian/tests/example/example.cpp
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pybind11.git
More information about the debian-science-commits
mailing list