NC-2499: Add BUILD_SHARED_LIBS and -TESTING-option#71
Open
martinweismann wants to merge 2 commits intomasterfrom
Open
NC-2499: Add BUILD_SHARED_LIBS and -TESTING-option#71martinweismann wants to merge 2 commits intomasterfrom
martinweismann wants to merge 2 commits intomasterfrom
Conversation
Member
Author
|
@t-paul : this should conform to "standard cmake" now. Can you check in your project and comment on it? Thanks! |
765c8ac to
9116b4a
Compare
9116b4a to
f6d04ce
Compare
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.
This PR intends to resolve #58 .
Only
BUILD_SHARED_LIBSis standard in CMAKE (BUILD_STATIC_LIBSis no standard cmake-option). CMake default isOFF.This pull request changes the cmake-project structure such that only one version (static or shared library) of lib3MF is built:
(The reason to not include the C++-classes in the shared library is that this would decrease the portability of the shared library: bare C++ classes require matching runtime environments. It essentially puts all the restrictions a static library has into the shared library.)
BUILD_SHARED_LIBS=OFF, lib3MF's C-like interface and the underlying C++ classes will be available in the static library.Users of the static library can choose which interface to use.
Also adds the option
BUILD_TESTINGto determine whether the tests of the library should be built. Default isON.