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

CMakeLists.txt: dont include base #673

Merged
merged 2 commits into from
Feb 29, 2024
Merged

CMakeLists.txt: dont include base #673

merged 2 commits into from
Feb 29, 2024

Conversation

nim65s
Copy link
Collaborator

@nim65s nim65s commented Feb 29, 2024

Hi,

This follow #670, and fix the case where this project is used with FetchContent, because FetchContent would detect the new CMakeLists.txt and execute it.

Then, if this CMakeLists.txt includes base.cmake, multiple global targets are created in the FetchContent and an error is raised later, in the downstream project() initialization, as its own include of base.cmake would try to define again the same global targets.

Of course, the proper fix would be to gracefully allow multiple inclusions of base.cmake, but that's a lot of work.

Instead, this PR only get what's need to generate CMake export in CMakeLists.txt.

@jcarpent jcarpent merged commit bf135ef into master Feb 29, 2024
3 checks passed
@jcarpent jcarpent deleted the install-without-base branch February 29, 2024 19:30
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