Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enable build of cpp-netlib as shared libraries#165

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 5 commits intocpp-netlib:masterfromtorbjoernk:cmake-shared-libs
Nov 4, 2012
Merged

Enable build of cpp-netlib as shared libraries#165

deanberris merged 5 commits intocpp-netlib:masterfromtorbjoernk:cmake-shared-libs
Nov 4, 2012

Conversation

@torbjoernk
Copy link

As proposed by@deanberris onGoogle Groups, this patch adds an additionalCMake optionBUILD_SHARED_LIBS to buildcpp-netlib as shared libraries.

As a side effect, two furtherCMake options are introduced to selectively enable or disable build of the unit tests and examples:BUILD_TESTS andBUILD_EXAMPLES.

Some minor modifications to the preprocessor part of the unit tests were necessary to achieve successful build and execution of the unit tests with cpp-netlib as shared libraries.

I tested these modifications with CMake 2.8.9 and 2.8.10 with GCC 4.7 on Linux 64bit. Unfortunately I cannot test on other platforms as OSX or Windows.

Add options to CMake to enable build of cpp-netlib as shared libraries.New options are:  BUILD_SHARED_LIBS (default OFF)  BUILD_TESTS (default ON)  BUILD_EXAMPLES (default ON)As the current (CMakeLists-)setup of the tests and examples does notwork with a shared cpp-netlib build, those get not build then.Specify with `cmake -D<OPTION>=<ON|OFF>`
keeping those lines will break previously introduced options
The unit tests will compile and run now as well for cpp-netlib compiledas shared libraries.
'cppnetlib-utils-thread_pool' had to be added to the list of linkedlibraries for 'cppnetlib-http-server'. For the static case this was nota problem but in the shared case symbols were missing.Listing external shared or static libraries in 'add_dependencies' is notrequired. This CMake command is for adding dependencies betweendifferent targets defined by 'add_executable', 'add_library' or'add_custom_target'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I've always meant to upgrade this to 1.51 -- would you mind changing this to 1.51 now?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nothing easier than that. I've only tested with Boost 1.51.0 though.

@ghostghost assigneddeanberrisNov 4, 2012
@deanberris
Copy link
Member

This one looks very good to me. Let me know if you can make the upgrade to 1.51 too. 👍

@deanberris
Copy link
Member

Awesome stuff, thanks Torbjörn! I'm merging this in now.

deanberris added a commit that referenced this pull requestNov 4, 2012
Enable build of cpp-netlib as shared libraries
@deanberrisdeanberris merged commitb9c3a01 intocpp-netlib:masterNov 4, 2012
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@deanberrisdeanberris

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@torbjoernk@deanberris

[8]ページ先頭

©2009-2025 Movatter.jp