Skip to content

Update to respect parent scope for BUILD_SHARED_LIBS cmake variable#83

Merged
natevm merged 1 commit intogprt-org:masterfrom
Waqar-ukaea:shared-libs-config
Oct 10, 2025
Merged

Update to respect parent scope for BUILD_SHARED_LIBS cmake variable#83
natevm merged 1 commit intogprt-org:masterfrom
Waqar-ukaea:shared-libs-config

Conversation

@Waqar-ukaea
Copy link
Contributor

This PR enforces that CMake should respect the parent scope for the CMake variable BUILD_SHARED_LIBS if GPRT is included as a subproject but otherwise can default to the same behaviour it had before if the parent project does not provide a value for this.

Before these changes the line set(BUILD_SHARED_LIBS ${GPRT_BUILD_SHARED}) would always set BUILD_SHARED_LIBS to match GPRT_BUILD_SHARED no matter what the parent project was trying to do. So for example, if you wanted to build GPRT as a shared library but keep its dependency libraries static it would be impossible to do so.

@Waqar-ukaea Waqar-ukaea mentioned this pull request Oct 10, 2025
13 tasks
Copy link
Contributor

@natevm natevm left a comment

Choose a reason for hiding this comment

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

Should be okay since this defaults to no change unless an option is set.

@natevm natevm merged commit f1e95e4 into gprt-org:master Oct 10, 2025
1 of 2 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