-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sqlpp11] Fix libmariadb linkage, generate usage #41201
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The port features usage tests pass with the following triplets:
- x64-linux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, except the usage instructions. The usage is supposed to be the minimum instructions to get a user running. This looks like it's trying to supply the whole thing.
set(usage "sqlpp11 provides CMake targets:\n") | ||
if(FEATURES STREQUAL "core") | ||
set(usage "This build of sqlpp11 doesn't include any connector.\n(Available via features: sqlite3, mariadb, mysql, postgresql.)\n") | ||
endif() | ||
foreach(component IN ITEMS SQLite3 SQLCipher MySQL MariaDB PostgreSQL) | ||
string(TOLOWER "${component}" lib) | ||
if("${lib}" IN_LIST FEATURES) | ||
string(APPEND usage "\n find_package(Sqlpp11 CONFIG REQUIRED COMPONENTS ${component})\n target_link_libraries(main PRIVATE sqlpp11::${lib})\n") | ||
endif() | ||
endforeach() | ||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do this as opposed to simply writing a usage file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For copy&paste and good UX with minimal output, subject to actual features. Both CMake commands should name the backend.
No description provided.