File: pkg-config-test

package info (click to toggle)
z3 4.13.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 33,364 kB
  • sloc: cpp: 501,803; python: 16,788; cs: 10,567; java: 9,687; ml: 3,282; ansic: 2,531; sh: 162; javascript: 37; makefile: 32
file content (30 lines) | stat: -rwxr-xr-x 552 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

# This test is very similar to include-z3-test, only that we're
# testing whether z3.pc is set up correctly for use with pkg-config.

set -e

TMPDIR=$(mktemp -d)
trap "rm -rf $TMPDIR" EXIT
cd $TMPDIR

cat <<EOF > test-include-z3-h.c
#include <z3.h>
int main ()
{
    Z3_config cfg;
    Z3_context ctx;

    cfg = Z3_mk_config ();
    ctx = Z3_mk_context (cfg);
    Z3_del_config (cfg);

    return 0;
}
EOF

ARGS=$(pkg-config --cflags --libs z3)
cc -o test-include-z3-h test-include-z3-h.c $ARGS
[ -x test-include-z3-h ]
./test-include-z3-h