File: build

package info (click to toggle)
sdformat 9.3.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,708 kB
  • sloc: cpp: 42,166; python: 1,618; javascript: 704; ruby: 368; sh: 81; ansic: 37; makefile: 16
file content (27 lines) | stat: -rwxr-xr-x 594 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
#!/bin/sh
# autopkgtest check: Build and run a program against glib, to verify that the
# headers and pkg-config file are installed correctly
# (C) 2012 Jose Luis Rivero
# Author: Jose Luis Rivero <jrivero@osrfoundation.org>

set -e

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > sdformattest.c
#include <sdf/sdf.hh>

int main()
{
    sdf::SDFPtr p(new sdf::SDF());
    sdf::init(p);
    return 0;
}
EOF

g++ -o sdformattest sdformattest.c `pkg-config --cflags --libs sdformat9`
echo "build: OK"
[ -x sdformattest ]
./sdformattest
echo "run: OK"