Remove linking against gmp and cln in tests and parser (#6376)
[cvc5.git] / contrib / test_install_headers.sh
1 #!/bin/bash
2 # contrib/test_install_headers.sh
3 # Tim King <taking@google.com> for the CVC4 project, 24 December 2015
4 #
5 # ./contrib/test_install_headers.sh <INSTALL>
6 #
7 # This files tests the completeness of the public headers for CVC4.
8 # Any header marked by #include "cvc4_public.h" in either the builds/
9 # or src/ directory is installed into the path INSTALL/include/cvc4 where
10 # INSTALL is set using the --prefix=INSTALL flag at configure time.
11 # This test uses find to attempt to include all of the headers in
12 # INSTALL/include/cvc4 and compiles a simple cpp file.
13
14 INSTALLATION=$1
15 CXX=g++
16 LDFLAGS=-lcln
17 CXXFILE=test_cvc4_header_install.cpp
18 OUTFILE=test_cvc4_header_install
19
20 echo $INSTALLATION
21
22 echo "Generating $CXXFILE"
23 find $INSTALLATION/include/cvc4/ -name *.h -printf '%P\n' | \
24 awk '{ print "#include <cvc4/" $0 ">"}' > $CXXFILE
25 echo "int main() { return 0; }" >> $CXXFILE
26
27 echo "Compiling $CXXFILE into $OUTFILE"
28 echo "$CXX -I$INSTALLATION/include -L$INSTALLATION/lib $LDFLAGS -o $OUTFILE $CXXFILE"
29 $CXX -I$INSTALLATION/include -L$INSTALLATION/lib $LDFLAGS -o $OUTFILE $CXXFILE
30
31 read -p "Do you want to delete $CXXFILE and $OUTFILE? [y/n]" yn
32 case $yn in
33 [Nn]* ) exit;;
34 [Yy]* ) rm "$OUTFILE" "$CXXFILE";;
35 * ) echo "Did not get a yes or no answer. Exiting."; exit;;
36 esac