Linux: gate WSC source files and zlib system deps on HC_NOWEBSOCKETS/HC_NOZLIB#990
Open
v-patrickpe wants to merge 1 commit into
Open
Conversation
…HC_NOZLIB After microsoft#965, websocketpp_websocket.cpp was added to LINUX_SOURCE_FILES unconditionally and install_dependencies.bash installed zlib1g/zlib1g-dev unconditionally. Consumers opting out via HC_NOWEBSOCKETS or HC_NOZLIB still paid the build/dep cost. - CMakeLists.txt: gate websocketpp_websocket.{cpp,h} + x509_cert_utilities.hpp on NOT DEFINED HC_NOWEBSOCKETS (matches existing HC_NOZLIB gating pattern at line 89). - install_dependencies.bash: skip zlib1g/zlib1g-dev when HC_NOZLIB=true or HC_NOWEBSOCKETS=true (compression cannot run without zlib, and websockets are the only consumer of compression). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the first two checklist items in #989.
After #965, Linux consumers opting out of WebSockets (
HC_NOWEBSOCKETS) or zlib (HC_NOZLIB) still paid the cost of buildingwebsocketpp_websocket.cppand installingzlib1g/zlib1g-devsystem packages.Changes
Build/libHttpClient.Linux/CMakeLists.txt— wrapwebsocketpp_websocket.{cpp,h}+x509_cert_utilities.hppaddition toLINUX_SOURCE_FILESinif (NOT DEFINED HC_NOWEBSOCKETS). Matches the existing pattern at line 89 (if (NOT DEFINED HC_NOZLIB)guards the zlib source list).Build/libHttpClient.Linux/install_dependencies.bash— skipzlib1g/zlib1g-devwhenHC_NOZLIB=trueorHC_NOWEBSOCKETS=true. WSC is the only consumer of zlib on Linux, so both opt-outs make zlib unnecessary. Build toolchain deps (clang/make/autoconf/automake/libtool) are unchanged.Validation
install_dependencies.bashdefault behavior unchanged when neither env var is set.--checkmode adapts automatically (loops over the samelibrary_dependenciesarray, which is empty in the opt-out case).Not in this PR (tracked in #989)
HC_ENABLE_WEBSOCKET_COMPRESSIONtoggle (hard-coded=1in pbxproj).HCEnableWebSocketCompression=trueandboost-wintlssubmodule is missing.%(PreprocessorDefinitions)per-file-override audit (one instance fixed in GDK: add ASIO_DISABLE_SERIAL_PORT to per-file websocketpp_websocket.cpp defines (follow-up to #987) #988).Resolves first two boxes of #989.