header-compilation 567 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. (for i in $TESTDIR/../../build/include/apt-pkg/*.h; do echo "#include \"$i\""; done) > include.h
  7. testone() {
  8. local cxx=$1
  9. shift
  10. if type $cxx 2>&1 1>/dev/null; then
  11. testsuccess $cxx -c -o /dev/null include.h
  12. testsuccess $cxx -c -o /dev/null -std=c++98 include.h
  13. testsuccess $cxx -c -o /dev/null -std=c++11 include.h
  14. else
  15. msgskip "Compile $cxx is not installed"
  16. fi
  17. }
  18. testone clang++
  19. testone g++
  20. testone g++-4.8