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

Add cmake option BACKWARD_INSTALL to allow backward-cpp built as a subproject but not be installed #338

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

zhao-shihan
Copy link

No description provided.

@zhao-shihan zhao-shihan marked this pull request as draft June 22, 2024 10:21
@zhao-shihan zhao-shihan marked this pull request as ready for review June 22, 2024 10:27
@lahwaacz
Copy link
Contributor

This should not be done with yet another option, but by changing the way you use the subproject:

add_subdirectory (path-to-backward-cpp EXCLUDE_FROM_ALL)

See https://stackoverflow.com/a/64900982

@zhao-shihan
Copy link
Author

This should not be done with yet another option, but by changing the way you use the subproject:

add_subdirectory (path-to-backward-cpp EXCLUDE_FROM_ALL)

See https://stackoverflow.com/a/64900982

I certainly agree! However, in many cases FetchContent is much convenient than raw add_subdirectory. But unlike add_subdirectory, FetchContent have no EXCLUDE_FROM_ALL until CMake 3.28, which is a pretty new release (Debian 12 has just 3.25). Therefore, add this option might help old toolchains.

Libraries like fmt and yaml-cpp also provide corresponding XYZ_INSTALL. It does not harm in practice.

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