File: build

package info (click to toggle)
roboptim-core 2.0-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,488 kB
  • ctags: 1,160
  • sloc: cpp: 5,388; sh: 395; ansic: 387; makefile: 25; python: 19
file content (44 lines) | stat: -rwxr-xr-x 1,012 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
# autopkgtest check: Build and run a program against roboptim-core, to
# verify that the headers and pkg-config file are installed correctly
# (C) 2013 Thomas Moulard
# Author: Thomas Moulard <thomas.moulard@gmail.com>

set -e

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > roboptimcoretest.cpp
#include <roboptim/core/function.hh>

using namespace roboptim;

template <typename T>
struct Null : public GenericFunction<T>
{
  typedef typename GenericFunction<T>::argument_t argument_t;
  typedef typename GenericFunction<T>::result_t result_t;

  Null () : GenericFunction<T> (1, 1, "null function")
  {}

  void impl_compute (result_t& res, const argument_t&) const throw ()
  {
    res.setZero ();
  }
};

int main()
{
    Null< ::roboptim::EigenMatrixDense> null;
    return 0;
}
EOF

g++ -o roboptimcoretest roboptimcoretest.cpp \
 `pkg-config --cflags --libs roboptim-core`
echo "build: OK"
[ -x roboptimcoretest ]
./roboptimcoretest
echo "run: OK"