Robert Adam 897dac8f9c Allow multiple find_package(SOCI) calls in application using SOCI
We now only define our targets if they don't exist yet to avoid errors
due to redefining them if find_package(SOCI) is done more than once.

Note that multiple calls to find_package(SOCI) that specify different
components will cause all call-sides to use the superset of all
requested components as targets are global (and hence also their link
dependencies).

Fixes #1344.

See #1346.
2026-03-19 16:41:35 +01:00
2026-01-14 23:37:40 +01:00
2025-03-04 18:03:53 +01:00
2025-06-10 17:25:38 +02:00
2026-01-14 23:25:37 +01:00
2025-03-04 18:50:14 +01:00
2026-01-14 23:25:37 +01:00
2026-01-14 23:25:37 +01:00
2025-03-04 18:03:53 +01:00
2025-03-04 18:03:53 +01:00

SOCI - The C++ Database Access Library

GitHub release GitHub commits

Website SourceForge

Gitter Mailing Lists StackExchange

Build Status

Branches GitHub Actions AppVeyor-CI Documentation Coverity Scan
master Build Status Build status Docs Status Coverage
release/4.1 Build Status Build status Docs Status

History

Originally, SOCI was developed by Maciej Sobczak at CERN as abstraction layer for Oracle, a Simple Oracle Call Interface. Later, several database backends have been developed for SOCI, thus the long name has lost its practicality. Currently, if you like, SOCI may stand for Simple Open (Database) Call Interface or something similar.

"CERN is also a user of the SOCI library, which serves as a database access layer in some of the control system components."

-- Maciej Sobczak at Inspirel

License

SOCI library is distributed under the terms of the Boost Software License.

Requirements

Core:

  • Compiler with C++14 support (please use 4.0 series for C++98 support) or MSVS 2017 or later.
  • CMake 3.23 or later.
  • Optionally: Boost C++ Libraries (header-only and Boost.DateTime).

Backend specific client libraries for:

  • DB2
  • Firebird
  • MySQL / MariaDB
  • ODBC with specific database driver
  • Oracle
  • PostgreSQL
  • SQLite 3

See documentation at soci.sourceforge.net for details

BSL © Maciej Sobczak and contributors.

S
Description
Official repository of the SOCI - The C++ Database Access Library
Readme 66 MiB
Languages
C++ 90.1%
Ada 3.4%
CMake 3.3%
Shell 1.9%
HTML 0.9%
Other 0.3%