2 # contrib/test_install_headers.sh
3 # Tim King <taking@google.com> for the CVC4 project, 24 December 2015
5 # ./contrib/test_install_headers.sh <INSTALL>
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.
17 CXXFILE
=test_cvc4_header_install.cpp
18 OUTFILE
=test_cvc4_header_install
22 echo "Generating $CXXFILE"
23 find $INSTALLATION/include
/cvc
4/ -name *.h
-printf '%P\n' | \
24 awk '{ print "#include <cvc4/" $0 ">"}' > $CXXFILE
25 echo "int main() { return 0; }" >> $CXXFILE
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
31 read -p "Do you want to delete $CXXFILE and $OUTFILE? [y/n]" yn
34 [Yy
]* ) rm "$OUTFILE" "$CXXFILE";;
35 * ) echo "Did not get a yes or no answer. Exiting."; exit;;