-
Notifications
You must be signed in to change notification settings - Fork 3
feat: clean up LD CMake variables & allow for OpenSSL dynamic link #255
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
Conversation
|
This pull request has been linked to Shortcut Story #218523: Allow OpenSSL to be dynamically linked. |
444a6a7 to
64c6978
Compare
64c6978 to
0d29f36
Compare
|
|
||
| option(LD_BUILD_EXAMPLES "Build hello-world examples." ON) | ||
|
|
||
|
|
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.
Throwing a warning when someone tries to build shared lib with unit tests enabled. This won't work since we hide symbols by default.
| if (NOT LD_BUILD_STATIC_LIBS) | ||
| # When building a shared library we hide all symbols | ||
| # aside from this we have specifically exported for the C-API. | ||
| set(CMAKE_CXX_VISIBILITY_PRESET hidden) |
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.
Maybe not right now, but we probably need an option for this. For those that build themselves and want to build a C++ dll.
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.
(If they build all their own stuff, then the ABI issue isn't really an SDK issue.)
|
|
||
| if (MSVC OR (NOT BUILD_SHARED_LIBS)) | ||
| if (MSVC OR LD_BUILD_STATIC_LIBS) | ||
| target_link_libraries(${LIBNAME} |
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.
We may want to note this MSVC condition in the readme.
Unless we want to figure out how to make it actually work with dynamically linked boost on windows (world of pain).
🤖 I have created a release *beep* *boop* --- <details><summary>launchdarkly-cpp-client: 3.1.0</summary> ## [3.1.0](launchdarkly-cpp-client-v3.0.10...launchdarkly-cpp-client-v3.1.0) (2023-10-13) ### Features * clean up LD CMake variables & allow for OpenSSL dynamic link ([#255](#255)) ([ed23c9a](ed23c9a)) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-internal bumped from 0.1.11 to 0.2.0 * launchdarkly-cpp-common bumped from 0.3.7 to 0.4.0 * launchdarkly-cpp-sse-client bumped from 0.1.3 to 0.2.0 </details> <details><summary>launchdarkly-cpp-common: 0.4.0</summary> ## [0.4.0](launchdarkly-cpp-common-v0.3.7...launchdarkly-cpp-common-v0.4.0) (2023-10-13) ### Features * clean up LD CMake variables & allow for OpenSSL dynamic link ([#255](#255)) ([ed23c9a](ed23c9a)) </details> <details><summary>launchdarkly-cpp-internal: 0.2.0</summary> ## [0.2.0](launchdarkly-cpp-internal-v0.1.11...launchdarkly-cpp-internal-v0.2.0) (2023-10-13) ### Features * clean up LD CMake variables & allow for OpenSSL dynamic link ([#255](#255)) ([ed23c9a](ed23c9a)) ### Dependencies * The following workspace dependencies were updated * dependencies * launchdarkly-cpp-common bumped from 0.3.7 to 0.4.0 </details> <details><summary>launchdarkly-cpp-sse-client: 0.2.0</summary> ## [0.2.0](launchdarkly-cpp-sse-client-v0.1.3...launchdarkly-cpp-sse-client-v0.2.0) (2023-10-13) ### Features * clean up LD CMake variables & allow for OpenSSL dynamic link ([#255](#255)) ([ed23c9a](ed23c9a)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This adds documentation of the various options used to control the SDK build!
It also cleans up the options by prefixing them with
LD_and making use ofcmake_dependent_optionto expose only relevant options.The default, hands-off configuration is:
Users can then tweak away from the default:
Finally, to simply disable all testing stuff and just produce the SDK, the common
BUILD_TESTINGflag can be disabled. That'll force any of the testing related flags off - use case is build scripts / package maintainers.