Notes |
|
(0025567)
|
Eric NOULARD
|
2011-02-24 03:22
|
|
Hi Dave,
I just saw that this was on the 2.8.5 Roadmap.
What about adding a more generic
file(UPLOAD file url TIMEOUT timeout] [STATUS status] [LOG log])
to cmake and build the
"CPack_UploadAllPackagesTo(url, upload_type)" on top of that.
CPack does not currently produce something usable about the set
of files produced by each generator but it can be added?
i.e. we could make CPack create a
cpack_<GEN>_package.cmake file (in the build tree)
which would contain something like;
cpack_RPM_package.cmake:
set(CPACK_RPM_GENERATED_FILES "/absolute/path/file1.rpm /absolute/path/file2.rpm")
list(APPEND CPACK_GENERATED_FILES ${CPACK_RPM_GENERATED_FILES})
that way one can easily have the list of files produced by
any if not ALL CPack generator used.
For Adam,
What do you mean by "All Package" ?
Does this mean all files generated by all CPack generayor
found in CPACK_GENERATOR?
Be aware that some CPack generators may create several files
because a component install has been requested (Archive generators and RPM). |
|
|
(0025568)
|
Eric NOULARD
|
2011-02-24 03:23
|
|
Another note, I think
SCP, DAV, NFS or CIFS should be part of the url itself. |
|
|
(0025572)
|
David Cole
|
2011-02-24 07:09
|
|
Hey, Eric. Great minds think alike.
I'm actually in the middle of implementing "file(UPLOAD" right now... :-)
I also think that the protocol should be part of the url itself, and that if file(UPLOAD in a cmake script is insufficient for some reason, people should use "find_program" and "execute_process" to execute an external tool to do the upload. |
|
|
(0025614)
|
David Cole
|
2011-03-01 16:24
|
|
|
|
(0025615)
|
David Cole
|
2011-03-01 16:37
|
|
Eric,
If you would like to extend CPack to provide a list of all files generated, then it should be simple to do something like this, after CPack has run:
foreach(f ${CPACK_LIST_OF_GENERATED_FILES})
get_filename_component(filename "${f}" NAME)
set(url "http://someurl/uploadfile.php?filename=${filename}" [^])
file(UPLOAD "${f}" "${url}" STATUS status LOG log)
message("status='${status}'")
message("log='${log}'")
endforeach()
I foresee people using the new "file(upload" and the forthcoming "ctest_upload" from ctest -S scripts as well to upload packages. So I do not think mucking around too much with CPack itself is warranted for this feature request.
Enabling such capabilities from anywhere using "file(UPLOAD" is done now. Anybody can use it from anywhere with CMake 2.8.5 and later.
In other words..... I'm going to resolve this issue as "fixed" -- if somebody wants to do more with this and extend CPack in some way, please open another issue and make concrete suggestions, attach documented/tested patches, ...
:-) |
|
|
(0025616)
|
David Cole
|
2011-03-01 16:39
|
|
See previous notes for fix details and discussion about future directions. Please open other issues for further work, unless something is incorrectly implemented in the new "file(UPLOAD" feature.
Thanks. |
|
|
(0027335)
|
David Cole
|
2011-09-05 11:37
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|