mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-12 05:36:09 -04:00
Add more options on default commands for valgrind in build.sh
This commit is contained in:
parent
955ad030d0
commit
3ab4382b2f
47
build.sh
47
build.sh
@ -1,24 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2012-2020 Sébastien Rombauts (sebastien.rombauts@gmail.com)
|
# Copyright (c) 2012-2020 Sébastien Rombauts (sebastien.rombauts@gmail.com)
|
||||||
#
|
#
|
||||||
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
|
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
|
||||||
# or copy at http://opensource.org/licenses/MIT)
|
# or copy at http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
# exit on first error
|
# exit on first error
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
# Generate a Makefile for GCC (or Clang, depanding on CC/CXX envvar)
|
# Generate a Makefile for GCC (or Clang, depanding on CC/CXX envvar)
|
||||||
cmake -DCMAKE_BUILD_TYPE=Debug -DSQLITECPP_USE_ASAN=ON -DSQLITECPP_USE_GCOV=OFF -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON ..
|
cmake -DCMAKE_BUILD_TYPE=Debug -DSQLITECPP_USE_ASAN=ON -DSQLITECPP_USE_GCOV=OFF -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON ..
|
||||||
|
|
||||||
# Build (ie 'make')
|
# Build (ie 'make')
|
||||||
cmake --build .
|
cmake --build .
|
||||||
|
|
||||||
# Build and run unit-tests (ie 'make test')
|
# Build and run unit-tests (ie 'make test')
|
||||||
ctest --output-on-failure
|
ctest --output-on-failure
|
||||||
|
|
||||||
# And with Valgrind
|
# And with Valgrind
|
||||||
#valgrind --leak-check=full --error-exitcode=1 ./SQLiteCpp_example1
|
echo "Note: uncomment to run valgrind memcheck"
|
||||||
#valgrind --leak-check=full --error-exitcode=1 ./SQLiteCpp_tests
|
#valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./SQLiteCpp_example1
|
||||||
|
#valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./SQLiteCpp_tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user