File: build

package info (click to toggle)
visp 3.7.0-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 166,332 kB
  • sloc: cpp: 392,705; ansic: 224,448; xml: 23,444; python: 13,701; java: 4,792; sh: 206; objc: 145; makefile: 60
file content (28 lines) | stat: -rwxr-xr-x 665 bytes parent folder | download | duplicates (7)
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
#!/bin/sh
# autopkgtest check: Build and run a program against visp, 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 > visptest.cpp
#include <visp/vpColor.h>

int main()
{
    vpColor red = vpColor::red;
    return 0;
}
EOF

g++ -o visptest visptest.cpp `pkg-config --cflags --libs visp`
echo "build: OK"
[ -x visptest ]
# often prints "libdc1394 error: Failed to initialize libdc1394" to stderr,
# avoid test failure due to that
./visptest 2>&1
echo "run: OK"