Make not finding built-in SQLite3 a fatal error

Use FATAL_ERROR if SQLite3 is not found at all (usually means
--recurse-submodules wasn't used).

See #1273.
This commit is contained in:
Derek Huang
2025-06-08 22:47:37 -04:00
committed by Vadim Zeitlin
parent 9347d233a2
commit ce348126e7

View File

@@ -50,7 +50,11 @@ if (NOT TARGET SQLite::SQLite3)
# available, and if we're allowed to use it.
if (NOT "${SOCI_SQLITE3_BUILTIN}" STREQUAL "OFF")
if (NOT EXISTS ${SOCI_SQLITE3_SOURCE_FILE})
message(WARNING "SQLite3 not found and built-in version not available, have you cloned SOCI repository with --recurse-submodules?")
message(
FATAL_ERROR
"SQLite3 not found and built-in version not available. Please ensure "
"that you have cloned the SOCI repository with --recurse-submodules."
)
else()
set(SOCI_SQLITE3_USE_BUILTIN ON)
endif()