build.sh 564 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # Copyright (c) 2012-2016 Sébastien Rombauts (sebastien.rombauts@gmail.com)
  3. #
  4. # Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
  5. # or copy at http://opensource.org/licenses/MIT)
  6. # exit on firts error
  7. set -e
  8. mkdir -p build
  9. cd build
  10. # Generate a Makefile for GCC (or Clang, depanding on CC/CXX envvar)
  11. cmake -DCMAKE_BUILD_TYPE=Debug -DSQLITECPP_USE_GCOV=OFF -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON ..
  12. # Build (ie 'make')
  13. cmake --build .
  14. # Build and run unit-tests (ie 'make test')
  15. ctest --output-on-failure