Skip to content

Conversation

@MeanSquaredError
Copy link
Contributor

@MeanSquaredError MeanSquaredError commented Dec 17, 2025

This PR exports the CMake module targets and documents them. I built and tested it with

cmake -B build -G Ninja -DBUILD_POSTGRESQL_CONNECTOR=ON -DBUILD_SQLITE3_CONNECTOR=ON -DBUILD_MYSQL_CONNECTOR=ON -DBUILD_TESTING=ON -DDEPENDENCY_CHECK=ON

(all connectors included, modules disabled)

and

cmake -B build -G Ninja -DBUILD_POSTGRESQL_CONNECTOR=ON -DBUILD_SQLITE3_CONNECTOR=ON -DBUILD_MYSQL_CONNECTOR=ON -DBUILD_TESTING=ON -DDEPENDENCY_CHECK=ON -DBUILD_WITH_MODULES=ON

(all connectors included, modules enabled)

So hopefully it doesn't break anything.

The test targets could be renamed or aliased as well to make their names more in-line with the names of the module targets, but that's not urgent and can wait until someone finds the time to do that :-)

- Cleanup the code that creates the module targets
- Rename the module targets to sqlpp23::xxxxx_module
- When exporting module targets also export additional information that allows the targets to be imported.
@MeanSquaredError MeanSquaredError changed the title CMakeLists: Add module targets. Document the changes CMakeLists: Export the module targets. Document the changes Dec 17, 2025
@MeanSquaredError
Copy link
Contributor Author

Fixed a typo in the documentation: specifix -> specific

docs/setup.md Outdated
| sqlpp23::sqlite3 | #include <sqlpp23/sqlite3/sqlite3.h> | The SQLite3 connector as headers |
| sqlpp23::sqlite3_module | import sqlpp23::sqlite3; | The SQLite3 connector as a module |

[^1]: The SQLCipher connector re-uses the codebase of the SQLite3 connector.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

foot notes 1 and 2 seem to be swapped?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed I somehow missed that! That should be fixed now.

@rbock
Copy link
Owner

rbock commented Jan 10, 2026

Thanks for the changes, LGTM!

@rbock rbock merged commit 0558d2c into rbock:main Jan 10, 2026
1 check failed
@MeanSquaredError
Copy link
Contributor Author

MeanSquaredError commented Jan 10, 2026

Great! That concludes pretty much all the changes related to modules, that I had in mind.

So right now sqlpp23 is one of the few libraries that fully support modules (modulo any bugs that the recent changes may have introduced :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants