Skip to content
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

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

dg0yt
Copy link
Contributor

@dg0yt dg0yt commented Sep 26, 2024

No description provided.

Copy link
Contributor

@WangWeiLin-MV WangWeiLin-MV left a 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

@WangWeiLin-MV WangWeiLin-MV added category:port-bug The issue is with a library, which is something the port should already support info:reviewed Pull Request changes follow basic guidelines labels Sep 27, 2024
Copy link
Contributor

@JavierMatosD JavierMatosD left a 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.

Comment on lines +35 to +45
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}")
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@JavierMatosD JavierMatosD marked this pull request as draft September 30, 2024 17:19
@dg0yt dg0yt marked this pull request as ready for review October 2, 2024 04:27
@JavierMatosD JavierMatosD merged commit de32b96 into microsoft:master Oct 2, 2024
16 checks passed
@dg0yt dg0yt deleted the sqlpp11 branch October 3, 2024 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants