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

Force exclude-from-all on FetchContent subdirectory #6

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

drbenmorgan
Copy link
Contributor

Versions of CMake prior to 3.28 (3.20 tested) do not appear to respect, or at least propagate, EXCLUDE_FROM_ALL to subdirectories added through FetchContent_MakeAvailable. This results in install failures due to attempts to install unbuilt targets, suggesting partial propagation and/or a bug in CMake.

Workaround issue by manually populating and adding subproject with explicit add_subdirectory(... EXCLUDE_FROM_ALL).

@sethrj, I didn't push directly just to double check this fix with you!

Versions of CMake prior to 3.28 (3.20 tested) do not appear to
respect, or at least propagate, EXCLUDE_FROM_ALL to subdirectories
added through FetchContent_MakeAvailable. This results in install
failures due to attempts to install unbuilt targets, suggesting
partial propagation and/or a bug in CMake.

Workaround issue by manually populating and adding subproject with
explicit add_subdirectory(... EXCLUDE_FROM_ALL).
@drbenmorgan drbenmorgan requested a review from sethrj March 22, 2024 14:12
Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

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

Thanks!

@sethrj sethrj merged commit bb27795 into celeritas-project:main Mar 22, 2024
3 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