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

Refactor YCMEPHelper to implement git safe clone (without delete) as an externally specified DOWNLOAD step #457

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

traversaro
Copy link
Member

Fix #50 .

Historically YCM relied on a fork of ExternalProject, that ensures that the DOWNLOAD step did not deleted existing source directory. This is important to ensure that you can create multiple different build directories of the same superbuild, without each build deleting the source folders (that are shared among builds). However, this fork of the ExternalProject was difficult to mantain, so in robotology/robotology-superbuild#1674 we switched to use the upstream CMake's ExternalProject module.

However, just using the vanilla CMake's ExternalProject module turned out to be too error prone, as any new build could just remove all the source directories of the superbuild, as found by @giotherobot . So, to restore the old behavior, I searched some way to implement the old behaviour on the top of the latest ExternalProject. It turns out that it was not too difficult, the important thing was to define a custom DOWNLOAD_COMMAND command to pass to the ExternalProject_Add function. In this PR, we move the logic that used to be in the fork of the ExternalProject module to some code that is stored in YCMEpHelper, so that we keep the old behavior even when using the latest ExternalProject.

@traversaro traversaro requested a review from giotherobot August 13, 2024 16:47
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.

Clean ExternalProject patch mess
1 participant