diff options
author | Tim King <taking@google.com> | 2015-12-30 11:45:37 -0800 |
---|---|---|
committer | Tim King <taking@google.com> | 2015-12-30 11:45:37 -0800 |
commit | fa7f30a4ba08afe066604daee87006b4fb5f21f7 (patch) | |
tree | 6eecac7cce64fa00f4ac5c18f023f1bc234435a3 /contrib | |
parent | 1ce397129214a427a10ff3e33069e315fe13eec1 (diff) |
Shuffling around public vs. private headers
- Adding a script contrib/test_install_headers.h that tests whether one can include all cvc4_public headers. CVC4 can pass this test after this commit.
- Making lib/{clock_gettime.h,ffs.h,strtok_r.h} cvc4_private.
- Making prop/sat_solver_factory.h cvc4_private.
- Moving the expr iostream manipulators into their own files: expr_iomanip.{h,cpp}.
- Setting the generated *_options.h files back to being cvc4_private.
-- Removing the usage of options/expr_options.h from expr.h.
-- Removing the include of base_options.h from options.h.
- Cleaning up CPP macros in cvc4_public headers.
-- Changing the ROLL macro in floatingpoint.h into an inline function.
-- Removing the now unused flag -D__BUILDING_STATISTICS_FOR_EXPORT.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/test_install_headers.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/test_install_headers.sh b/contrib/test_install_headers.sh new file mode 100755 index 000000000..6f6855e31 --- /dev/null +++ b/contrib/test_install_headers.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# contrib/test_install_headers.sh +# Tim King <taking@google.com> for the CVC4 project, 24 December 2015 +# +# ./contrib/test_install_headers.sh <INSTALL> +# +# This files tests the completeness of the public headers for CVC4. +# Any header marked by #include "cvc4_public.h" in either the builds/ +# or src/ directory is installed into the path INSTALL/include/cvc4 where +# INSTALL is set using the --prefix=INSTALL flag at configure time. +# This test uses find to attempt to include all of the headers in +# INSTALL/include/cvc4 and compiles a simple cpp file. + +INSTALLATION=$1 +CXX=g++ +LDFLAGS=-lcln +CXXFILE=test_cvc4_header_install.cpp +OUTFILE=test_cvc4_header_install + +echo $INSTALLATION + +echo "Generating $CXXFILE" +find $INSTALLATION/include/cvc4/ -name *.h -printf '%P\n' | \ + awk '{ print "#include <cvc4/" $0 ">"}' > $CXXFILE +echo "int main() { return 0; }" >> $CXXFILE + +echo "Compiling $CXXFILE into $OUTFILE" +echo "$CXX -I$INSTALLATION/include -L$INSTALLATION/lib $LDFLAGS -o $OUTFILE $CXXFILE" +$CXX -I$INSTALLATION/include -L$INSTALLATION/lib $LDFLAGS -o $OUTFILE $CXXFILE + +read -p "Do you want to delete $CXXFILE and $OUTFILE? [y/n]" yn +case $yn in + [Nn]* ) exit;; + [Yy]* ) rm "$OUTFILE" "$CXXFILE";; + * ) echo "Did not get a yes or no answer. Exiting."; exit;; +esac |