-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Make -DCLAD_SOURCE_DIR option work #17308
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
Conversation
Using the -DCLAD_SOURCE_DIR currently does not disable the git checkout. From the cmake documentation for ExternalProject_Add: Note: If a download method is specified, any existing contents of the source directory may be deleted. Only the URL download method checks whether this directory is either missing or empty before initiating the download, stopping with an error if it is not empty. All other download methods silently discard any previous contents of the source directory. Currently cmake deletes the source directory defined by -DCLAD_SOURCE_DIR and then tries to recreate it using a git checkout, but fails if there is no network available: Cloning into 'clad-1.7'... fatal: unable to access 'https://github.com/vgvassilev/clad.git/': Could not resolve host: github.com Cloning into 'clad-1.7'... fatal: unable to access 'https://github.com/vgvassilev/clad.git/': Could not resolve host: github.com Cloning into 'clad-1.7'... fatal: unable to access 'https://github.com/vgvassilev/clad.git/': Could not resolve host: github.com Had to git clone more than once: 3 times. CMake Error at redhat-linux-build/interpreter/cling/tools/plugins/clad/clad-prefix/tmp/clad-gitclone.cmake:50 (message): Failed to clone repository: 'https://github.com/vgvassilev/clad.git' The attempt to disable the git checkout by setting the DOWNLOAD_COMMAND option to an empty string is not working. This commit fixes the issue by only defining the GIT_REPOSITORY and GIT_TAG options when CLAD_SOURCE_DIR is not defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me! Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Awesome, thanks for fixing this up! My bad, I didn't notice then that it didn't work because I always had internet connection. |
Also enables one more feature of ROOT (support of convolutions via fftw). Furthermore removes a patch related to building Clad from source that is not needed anymore thanks to root-project/root#17308.
Also enables one more feature of ROOT (support of convolutions via fftw). Furthermore removes a patch related to building Clad from source that is not needed anymore thanks to root-project/root#17308.
Also enables one more feature of ROOT (support of convolutions via fftw). Furthermore removes a patch related to building Clad from source that is not needed anymore thanks to root-project/root#17308.
This Pull request:
Changes or fixes:
Using the -DCLAD_SOURCE_DIR currently does not disable the git checkout. From the cmake documentation for ExternalProject_Add:
Note: If a download method is specified, any existing contents of the source directory may be deleted. Only the URL download method checks whether this directory is either missing or empty before initiating the download, stopping with an error if it is not empty. All other download methods silently discard any previous contents of the source directory.
Currently cmake deletes the source directory defined by -DCLAD_SOURCE_DIR and then tries to recreate it using a git checkout, but fails if there is no network available:
Cloning into 'clad-1.7'...
fatal: unable to access 'https://github.com/vgvassilev/clad.git/': Could not resolve host: github.com Cloning into 'clad-1.7'...
fatal: unable to access 'https://github.com/vgvassilev/clad.git/': Could not resolve host: github.com Cloning into 'clad-1.7'...
fatal: unable to access 'https://github.com/vgvassilev/clad.git/': Could not resolve host: github.com Had to git clone more than once: 3 times.
CMake Error at redhat-linux-build/interpreter/cling/tools/plugins/clad/clad-prefix/tmp/clad-gitclone.cmake:50 (message):
Failed to clone repository: 'https://github.com/vgvassilev/clad.git'
The attempt to disable the git checkout by setting the DOWNLOAD_COMMAND option to an empty string is not working.
This commit fixes the issue by only defining the GIT_REPOSITORY and GIT_TAG options when CLAD_SOURCE_DIR is not defined.
Checklist: