-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Data] Unconditionally includes of SQLParser.h #4378
Comments
Or maybe the issue is that the header files in the |
But there is conditional including in the poco/Data/include/Poco/Data/SQLParser.h Lines 23 to 28 in 48d7a3e
|
However, when downstream or individual programs call this header file, they are not obligated to pass this macro at compile time, and may not necessarily know that it needs to be passed. This can lead to the inclusion of the aforementioned header files, potentially causing issues with header file not found. |
What exactly are you proposing to do here? Wrap |
Firstly, add the installation of headers from the Secondly, redesign a forward-working macro to replace |
I'm not sure what "installation of headers from the Line 44 in 48d7a3e
Sounds like inverse logic resulting in the same situation where SQLParser is present by default, and must be explicitly excluded. While you are helping the clients who are using the build without SQLParser, what about the users who want it and now explicitly have to enable it? As far as I see at the moment, only an additional level of indirection can resolve this situation - in order to be able to remove the |
The "installation of headers from the
The mentioned I fully agree with the solution you proposed. Before it is completed and released, I will add the following patch to this PR to ensure that the issue of missing header files does not occur again in vcpkg.
|
Thank you for your fix. But even if you
the file "Config.h" (after the installation with "cmake --build . --target install") won't be updated with #define POCO_DATA_NO_SQL_PARSER (in my case it's "/usr/local/include/Poco/Config.h") |
I have modified my fix solution in vcpkg. The current result is that the header files under |
The use of the SQL parser is optional but the
SQLParser
header is included unconditionally in e.g. theStatement.h
header.This is problematic as
SQLParser.h
itself includespoco/Data/include/Poco/Data/SQLParser.h
Lines 26 to 28 in 48d7a3e
but these are only considered if the parser is active
poco/Data/CMakeLists.txt
Lines 4 to 8 in 48d7a3e
and thus these don't end up getting installed along the other stuff if the parser is disabled. However, as soon as that happens compilation fails as the parser's header includes these non-existent files.
Therefore, I think it would probably make sense to add some conditional including at some point. Most logical to me would seem to guard the includes of
SQLParser.h
itself.The text was updated successfully, but these errors were encountered: