SQLiteCpp/build.sh
Sébastien Rombauts 2b36f52b6e Add an explicit CMake error message on missing googletest submodule
- build.bat now exit on error instead of trying to build or run tests
2016-07-18 18:20:40 +02:00

22 lines
591 B
Bash
Executable File

#!/bin/sh
# Copyright (c) 2012-2016 Sébastien Rombauts (sebastien.rombauts@gmail.com)
#
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
# or copy at http://opensource.org/licenses/MIT)
# exit on firts error
set -e
mkdir -p build
cd build
# Generate a Makefile for GCC (or Clang, depanding on CC/CXX envvar)
cmake -DCMAKE_BUILD_TYPE=Debug -DSQLITECPP_USE_GCOV=OFF -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON ..
if [ $? != 0 ] ; then exit
# Build (ie 'make')
cmake --build .
# Build and run unit-tests (ie 'make test')
ctest --output-on-failure