-
Notifications
You must be signed in to change notification settings - Fork 887
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
Add MSGPACK_ENABLE_SHARED option, defaulting to ON #316
Conversation
This allows building just static libraries using the CMake build, which is useful if your product is entirely statically linked. By default there is no change to the output - MSGPACK_ENABLE_SHARED must be explicitly set to false to disable building the shared library.
Thank you for sending the PR. It looks good to me. I don't have much time right now. I will merge it next week. |
I got the following error when I set -DMSGPACK_ENABLE_SHARED=OFF:
|
Let me look into this, I wasn't building with GTest available so likely didn't hit this. Interesting that the CI server also didn't. |
When MSGPACK_ENABLE_SHARED is ON, the default setting, no errors are occurred. MSGPACK_ENABLE_SHARED is introduced by this PR. So travis-ci doesn't test with -DMSGPACK_ENABLE_SHARED=OFF. I think that modifying travis-ci settings are a little complicated. I will merge the PR when the error that I pointed out would be fixed. I mean updating travis-ci setting is not mandatory. |
This commit causes the tests to be linked against the msgpack-static target if MSGPACK_ENABLE_SHARED is set to OFF.
In build_cmake.sh, SHARED is not always $5 due to BOOST_INC, so I added BOOST_INC to all .travis.yml environment. Then merged. Thanks. |
Thanks! |
This allows building just static libraries using the CMake build, which is useful if your product is entirely statically linked. By default there is no change to the output - MSGPACK_ENABLE_SHARED must be explicitly set to false to disable building the shared library.