Skip to content

Commit 69771bf

Browse files
authored
Test linking with builtin libsqlite3-dev package on Ubuntu (#485)
2 parents b150588 + 0f8d912 commit 69771bf

File tree

4 files changed

+678
-641
lines changed

4 files changed

+678
-641
lines changed
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CMake SQLite3 builtin library
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
name: ${{ matrix.config.name }}
8+
runs-on: ${{ matrix.config.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
config:
13+
- {
14+
name: "Ubuntu Latest GCC",
15+
os: ubuntu-latest,
16+
generator: "Unix Makefiles",
17+
}
18+
- {
19+
name: "macOS Latest Clang",
20+
os: macos-latest,
21+
generator: "Unix Makefiles",
22+
}
23+
24+
steps:
25+
- name: Checkout ${{ github.ref_name }}
26+
uses: actions/checkout@v4
27+
- run: git submodule update --init --recursive
28+
- run: mkdir build
29+
- run: cmake -G "Unix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug -DSQLITECPP_INTERNAL_SQLITE=OFF -DSQLITE_OMIT_LOAD_EXTENSION=ON -DSQLITECPP_BUILD_TESTS=ON -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_RUN_CPPCHECK=OFF -DSQLITECPP_RUN_CPPLINT=OFF ..
30+
working-directory: build
31+
- run: cmake --build build --config Debug
32+
- run: ctest --verbose --output-on-failure --test-dir build

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ if (SQLITECPP_INCLUDE_SCRIPT)
190190
.gitbugtraq
191191
.github/dependabot.yml
192192
.github/workflows/cmake.yml
193+
.github/workflows/cmake_builtin_lib.yml
193194
.github/workflows/cmake_subdir_example.yml
194195
.github/workflows/meson.yml
195196
.gitignore

examples/example1/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ int main()
8787
{
8888
// Using SQLITE_VERSION would require #include <sqlite3.h> which we want to avoid: use SQLite::VERSION if possible.
8989
// std::cout << "SQlite3 version " << SQLITE_VERSION << std::endl;
90-
std::cout << "SQlite3 version " << SQLite::VERSION << " (" << SQLite::getLibVersion() << ")" << std::endl;
90+
std::cout << "SQlite3 compile time header version " << SQLite::VERSION << " (vs dynamic lib version " << SQLite::getLibVersion() << ")" << std::endl;
9191
std::cout << "SQliteC++ version " << SQLITECPP_VERSION << std::endl;
9292

9393
////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)