-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[cmake] Crossguid offline url override #10948
Conversation
More or less the issue is, if you provide a non full path it'll fail and download. Since ffmpeg and libdvd generate the fullpath for you it would be more consistent to do it how the others are doing it. |
Sorry, it's almost AM here and I'm not sure I understand the problem. What do you mean by a non full path? Are you only passing the filename?
Again, don't fully understand what you mean but I presume you want to check if files exists:
Thanks for taking the time to look into this. CMake is very much a work in progress and all input is welcome. Ideally we should cache downloaded files and look in there first. Not quite there yet. 😉 |
Non-full path meaning a non absolute path (relative path). So where ever your root CMakeLists.txt file is For example: Crossguild url fails, and ffmpeg url works. Could be some cached download which for the absolute path would be: This issue is: Will fail since that file does not exists, which means ill need to know the full absolute path from the command line. So it would be better if we did it like ffmpeg and libdvd (in FindFFMPEG.cmake) you give a relative path, which then cmake builds the absolute path with: Which is what Ive done here. So now you can use a relative path based on the root CMakeLists.txt vs knowing an absolute path from the command line |
Also why do we need to check if the file exists to fall back? The override is usually manually done, soo if they give an incorrect path, error out. That seems fair to me (otherwise it might be confusing if they are not paying attention and then use the downloaded version vs the one they are attempting to override with) |
Now I understand! Like I said, almost (very) AM. Sorry for wasting your time. jenkins build this please |
O no worries i didnt explain it very well to begin with :) |
this is ok, thanks. |
@@ -7,7 +7,9 @@ if(ENABLE_INTERNAL_CROSSGUID) | |||
|
|||
# allow user to override the download URL with a local tarball | |||
# needed for offline build envs | |||
if(NOT EXISTS ${CROSSGUID_URL}) | |||
if(CROSSGUID_URL) | |||
get_filename_component(CROSSGUID_URL "${CROSSGUID_URL}" ABSOLUTE) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
adebe2c
to
4b6e23e
Compare
Done and squashed |
Crossguid offline url override
Description
When attempting to build offline crossguid will still attempt to download even when you override the URL. It also does not generate the full path for you. Updated it so it will override the URL the same way as ffmpeg and libdvd.
I could also be assuming something here but trying to use it like ffmpeg/libdvd. If so just reject this PR!
Motivation and Context
Would like to override the URL for offline building.
How Has This Been Tested?
Test by -DCROSSGUID_URL=foo.tar.bz2 then make crossguid and see that it still downloads the tar ball. With the change, it wont download anymore! (Though it'll fail unless you have a foo.tar.bz2 as the real crossguild tar ball!)
Screenshots (if appropriate):
Types of change
Checklist: