MantisBT - CMake
View Issue Details
0011433CMakeCMakepublic2010-11-10 06:162010-12-08 08:20
Rolf Eike Beer 
 
normalfeatureN/A
closedwon't fix 
CMake-2-8 
CMake 2.8.4CMake 2.8.4 
0011433: Add download command to CMake command mode
I often come to system where a trivial download from command line is not possible (like Windows, QNX) without installing additional software. Since CMake has the capability to download stuff anyway I would like to see something like

cmake -E download http://url [^] [ftp://url [^]]
No tags attached.
related to 0011286closed David Cole REQ: Upload packages to webserver 
Issue History
2010-11-10 06:16Rolf Eike BeerNew Issue
2010-11-10 06:56Eric NOULARDNote Added: 0023127
2010-11-10 06:57Eric NOULARDRelationship addedrelated to 0011286
2010-11-10 07:47David ColeNote Added: 0023129
2010-12-08 08:20David ColeNote Added: 0023792
2010-12-08 08:20David ColeStatusnew => closed
2010-12-08 08:20David ColeResolutionopen => won't fix
2010-12-08 08:20David ColeFixed in Version => CMake 2.8.4
2010-12-08 08:20David ColeTarget Version => CMake 2.8.4

Notes
(0023127)
Eric NOULARD   
2010-11-10 06:56   
Hi Rolf,

You can already do that with a small CMake script with the

file(DOWNLOAD url file [TIMEOUT timeout] [STATUS status] [LOG log])

command and cmake -P dlscript.cmake

that said if DOWNLOAD was to be added to -E command then UPLOAD should be
added too
file(UPLOAD file url TIMEOUT timeout] [STATUS status] [LOG log])
should be added as well but I think there is a bug report about that
I'll check and link those two.
(0023129)
David Cole   
2010-11-10 07:47   
How about (shell escaping left to the actual user on an actual system he cares about):

echo file(DOWNLOAD http://www.site.com?file=blah.txt [^] blah.txt) >/tmp/download.cmake && cmake -P /tmp/download.cmake

Or a bash/cmd script that does the equivalent?

Do we really need a bunch of new argument parsing code for the command line interpreter when we've already got it built into the file command?
(0023792)
David Cole   
2010-12-08 08:20   
This would add unnecessary complexity for very little benefit. We're not going to add -E download to cmake.

See other notes for details.