-
Notifications
You must be signed in to change notification settings - Fork 48
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
[WIP] Experimental bootstrap using FetchContent #473
Conversation
One meta question: why we want to use
FetchContent_GetProperties(YCM)
if(NOT ycm_POPULATED)
FetchContent_Populate(YCM)
# This or something like include a cmake file that is in ${ycm_SOURCE_DIR}
list(APPEND CMAKE_MODULE_PATH ${ycm_SOURCE_DIR}/modules)
endif() Due to al the downloading from third party repos in YCM, probably this means that FetchContent will needs to be done from an offline archive. Once the appropriate YCM modules are available, then a different YCM version is downloaded as done for all other projects, by having a |
That's what I wanted to do at the beginning, but the list(APPEND CMAKE_MODULE_PATH ${ycm_SOURCE_DIR}/modules) line was actually a lot more complicated than that, because the sub-projects (and probably also 3rd party projects) should be able to find YCM. To clarify, YCM and it's modules must be available in the configure phase and must be found in a "standard" path during the build phase, so that the subprojects can find it. An option to avoid the build-commands-executed-during-the-configure-phase-madness would be to download the Therefore I am now considering to support 2 different options in the YCMBootstrap.cmake file. Another alternative could be to have some branches auto-generated using the github actions, which could download the files, after each push, and save either the "offline" version (that requires running cmake and make in the configure phase) or the "installation" version (slightly more complicated than the other method). So the options that I see are these:
This draft is, in my mind, the first test towards the "hybrid bootstrap"... But perhaps the effort is too much compared to the benefits. Nonetheless we should definitely support the stable/development branches... |
9837009
to
065d203
Compare
But to simplify this logic, can't we just download YCM two times, once via FetchContent for the the bootstrap procedure, and the second time via ExternalProject/YCMEpHelper to install it so that it can be found by all the other projects? |
It could work, but I'm afraid this might be a bit confusing... |
I think that having just one project that is not installed as the others is also confusing, and having the two YCM may be a reasonable compromise. |
I'm closing this for now... |
This is an experiment where I'm using a customized version of the
YCMBootstrap.cmake
module, that removes a lot of madness,include_url
, etc., and instead it usesFetchContent
to download YCM.These are a few open points to discuss and/or to fix:
ExternalProject
like all the other projects.USE_SYSTEM_YCM
defined?YCM_TAG
must now be defined somewhere.YCM_EP_INSTALL_DIR
defined?@traversaro what do you think?