Files
soci/scripts/ci/build_empty.sh
Vadim Zeitlin 6691864019 Test building SOCI with multiple enabled backends in the CI
CI jobs always tested building SOCI with a single backend enabled, so we
would never detect any potential problems due to using multiple backends
at once. We also had a completely unused scripts/ci/build_all.sh which
was confusing.

Solve both problems at once by starting to use this script instead of
using "empty" backend for the job testing release packaging. This is
more realistic too.

Most of the changes here just move the release packaging fragment from
build_empty.sh to build_all.sh, so it is recommended to view this commit
with Git --color-moved option.
2026-09-01 02:36:45 +02:00

35 lines
764 B
Bash
Executable File

#!/usr/bin/env bash
# Builds SOCI "empty" backend in CI builds
#
# Copyright (c) 2013 Mateusz Loskot <mateusz@loskot.net>
#
source ${SOCI_SOURCE_DIR}/scripts/ci/common.sh
run_cmake_for_empty()
{
cmake ${SOCI_DEFAULT_CMAKE_OPTIONS} \
-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD:-11} \
-DSOCI_EMPTY=ON \
..
}
build_example()
{
cmake -S "../examples/$1" -B "$1"
cmake --build "$1"
}
run_cmake_for_empty
run_make
if [[ "$BUILD_EXAMPLES" == "YES" ]]; then
# This example simulates SOCI sources being embedded in the project dir
build_example subdir-include
# Install previously built SOCI library on the system
sudo make install
# This example simulates SOCI being installed on the target system
build_example connect
fi