mirror of
https://github.com/allankoechke/soci.git
synced 2026-11-30 10:58:24 +00:00
Add custom target to show SOCI build configuration
This can be useful to check how the library was configured later.
This commit is contained in:
@@ -156,3 +156,14 @@ message(STATUS "SOCI ${SOCI_VERSION} will be built as ${SOCI_LIB_TYPE} library${
|
||||
message(STATUS "Enabled SOCI backends are: ${SOCI_ENABLED_BACKENDS}")
|
||||
|
||||
endif()
|
||||
|
||||
# Also make it possible to see SOCI configuration later.
|
||||
add_custom_target(show_config
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "SOCI ${SOCI_VERSION} configured with:"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " Build type: ${CMAKE_BUILD_TYPE}"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " Library type: ${SOCI_LIB_TYPE}"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo " Enabled backends: ${SOCI_ENABLED_BACKENDS}"
|
||||
COMMENT
|
||||
"Show SOCI build configuration summary"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
@@ -95,6 +95,8 @@ When it comes to enabling specific backends, SOCI supports three distinct option
|
||||
|
||||
SQLite backend is special, as it may use the built-in SQLite library if the system version is not found, see its documentation below for more details.
|
||||
|
||||
SOCI outputs the summary of its build configuration at the end of the CMake configuration step, so you can easily see which backends are effectively enabled. It is also possible to show the build configuration at any later time by running `cmake --build $builddir --target show_config` where `builddir` is the build directory.
|
||||
|
||||
#### Empty (sample backend)
|
||||
|
||||
* `SOCI_EMPTY` - Enabler - Enables the [sample backend](backends/index.md) called Empty. Always ON by default.
|
||||
|
||||
Reference in New Issue
Block a user