File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # autopkgtest check: Build and run a program against roboptim-core, to
3+ # verify that the headers and pkg-config file are installed correctly
4+ # (C) 2013 Thomas Moulard
5+ # Author: Thomas Moulard <thomas.moulard@gmail.com>
6+
7+ set -e
8+
9+ WORKDIR=$( mktemp -d)
10+ trap " rm -rf $WORKDIR " 0 INT QUIT ABRT PIPE TERM
11+ cd $WORKDIR
12+ cat << EOF > roboptimcoretest.cpp
13+ #include <roboptim/core/function.hh>
14+
15+ using namespace roboptim;
16+
17+ template <typename T>
18+ struct Null : public GenericFunction<T>
19+ {
20+ typedef typename GenericFunction<T>::argument_t argument_t;
21+ typedef typename GenericFunction<T>::result_t result_t;
22+
23+ Null () : GenericFunction<T> (1, 1, "null function")
24+ {}
25+
26+ void impl_compute (result_t& res, const argument_t&) const throw ()
27+ {
28+ res.setZero ();
29+ }
30+ };
31+
32+ int main()
33+ {
34+ Null< ::roboptim::EigenMatrixDense> null;
35+ return 0;
36+ }
37+ EOF
38+
39+ g++ -o roboptimcoretest roboptimcoretest.cpp \
40+ ` pkg-config --cflags --libs roboptim-core`
41+ echo " build: OK"
42+ [ -x roboptimcoretest ]
43+ ./roboptimcoretest
44+ echo " run: OK"
You can’t perform that action at this time.
0 commit comments