Skip to content
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

CMake: Prefer BUILD_STATIC_LIBS over NSTATIC #521

Merged
merged 23 commits into from
Nov 18, 2023

Conversation

mmuetzel
Copy link
Contributor

The "default" CMake flag to select whether static or dynamic libraries should be built is BUILD_SHARED_LIBS. CMake projects that support building shared and static libraries at the same time, use BUILD_SHARED_LIBS and BUILD_STATIC_LIBS by default.

As a first step towards a "more default" setup, add support for BUILD_STATIC_LIBS for selecting whether static libraries should be build.
Keep support for NSTATIC for backwards compatibility. But BUILD_STATIC_LIBS takes precedence over NSTATIC if both are set by a user.

This is in preparation for #424.

The "default" CMake flag to select whether static or dynamic libraries
should be built is `BUILD_SHARED_LIBS`. CMake projects that support
building shared and static libraries at the same time, use
`BUILD_SHARED_LIBS` and `BUILD_STATIC_LIBS` by default.

As a first step towards a "more default" setup, add support for
`BUILD_STATIC_LIBS` for selecting whether static libraries should be build.
Keep support for `NSTATIC` for backwards compatibility. But
`BUILD_STATIC_LIBS` takes precedence over `NSTATIC` if both are set by a
user.
@DrTimothyAldenDavis DrTimothyAldenDavis merged commit b1ffcd6 into DrTimothyAldenDavis:dev2 Nov 18, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants