NC-2499: Add BUILD_SHARED_LIBS and -TESTING-option #71
+53
−53
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_LIBS
is standard in CMAKE (BUILD_STATIC_LIBS
is 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_TESTING
to determine whether the tests of the library should be built. Default isON
.