-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[sqlite3] Control features with a configuration header #29376
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.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 6aa38234d08efefc55b70025cf6afc2212e78e15 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index c4bdb53..5617361 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -7346,7 +7346,7 @@
},
"sqlite3": {
"baseline": "3.40.1",
- "port-version": 0
+ "port-version": 1
},
"sqlitecpp": {
"baseline": "3.2.0",
diff --git a/versions/s-/sqlite3.json b/versions/s-/sqlite3.json
index def50a9..eef55ad 100644
--- a/versions/s-/sqlite3.json
+++ b/versions/s-/sqlite3.json
@@ -1,5 +1,10 @@
{
"versions": [
+ {
+ "git-tree": "f9e3e845c47e2aa1bd4cacced5e948e71e3409cf",
+ "version": "3.40.1",
+ "port-version": 1
+ },
{
"git-tree": "e906c625a802b4fb35a8ad2ff23016f76a92e7e3",
"version": "3.40.1",
…ake or pkgconfig. Resolves microsoft#29335 Alternate of microsoft#29258 @Neumann-A points out that controlling features through CMake configs and pkgconfig causes MSBuild customers to be left out in the cold. Moreover, attempting to add parenthesis to the SQLITE_API marco breaks autotools. This change makes such parenthesis unnecessary and ensures the configuration bits are used with automatic linking.
d9b4ebf
to
348679b
Compare
ports/sqlite3/portfile.cmake
Outdated
-DPKGCONFIG_VERSION=${VERSION} | ||
OPTIONS_DEBUG | ||
-DSQLITE3_SKIP_TOOLS=ON | ||
MAYBE_UNUSED_VARIABLES |
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.
You should be able to remove this by making two separate vcpkg_check_feature()
calls -- one to create the definitions for vcpkg_cmake_configure()
and the other just to set the portfile variables.
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.
Done!
vcpkg_fixup_pkgconfig() | ||
|
||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sqlite3.h" "# define SQLITE_API\n" "# define SQLITE_API __declspec(dllimport)\n") |
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.
Is this line in sqlite3.h
guarded by ifndef
?
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.
Yes
18f7ca3
…ne in the sqlite3 port.
"dependencies": [ | ||
"sqlite3" | ||
] | ||
"description": "Deprecated; no effects" |
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.
Oops, I shouldn't have ever merged this back in 2020 :D #14029
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.
Sorry @Hoikas
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 not simply remove this feature?
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.
vcpkg upgrade
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.
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.
is that even released yet? Even then it would probably requires 6 months of waiting before removal so that everybody can be assumed to have rebootstraped.
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 'needs to wait for 6 months' thing isn't a requirement for expected-to-be-only-interactive commands like upgrade
. We care about install
(as you saw in the default triplet change PR) because that's expected to be in build scripts where people are intentionally changing nothing about the setup.
rather than CMake or pkgconfig.
Resolves #29335
Alternate of #29258
@Neumann-A points out that controlling features through CMake configs and pkgconfig causes MSBuild customers to be left out in the cold. Moreover, attempting to add parenthesis to the SQLITE_API marco breaks autotools. This change makes such parenthesis unnecessary and ensures the configuration bits are used with automatic linking.