-
Notifications
You must be signed in to change notification settings - Fork 97
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
Fix shared build #148
Fix shared build #148
Conversation
Codecov Report
@@ Coverage Diff @@
## master #148 +/- ##
==========================================
- Coverage 90.16% 88.44% -1.73%
==========================================
Files 52 53 +1
Lines 3528 3548 +20
Branches 195 198 +3
==========================================
- Hits 3181 3138 -43
- Misses 169 332 +163
+ Partials 178 78 -100
Continue to review full report at Codecov.
|
Hi @intelligide, thank you very much for the PR, I think this makes sense. Quick question: What is the potential to cause breakages/incompatibilities for clients that rely on the current behavior? I.e. do we need a new version? |
There is no breaking change inside code. And if clients currently use the static lib, all should be fine. |
Thank you, I'll push a release next week. One more question: Is it possible to write a "linkage test" that would prevent future regressions (e.g. someone forgets to export a new function)? |
Just write tests for each function and run them twice with |
Drop superfluous import, add changelog for #148
Currently, it always build both static and shared libs with the same name, which leads to name collision on Windows. The static library
cbor.a
replaces the symbol archivecbor.a
.This PR fix this problem:
BUILD_SHARED_LIBS
to create the shared library.cbor_export.h
header (generated by CMake) andCBOR_EXPORT
macros.Fix conan-io/conan-center-index#2578