MantisBT - CMake
View Issue Details
0011177CMakeCTestpublic2010-08-26 17:182012-03-06 08:37
Patrick R. Gansterer 
David Cole 
normalfeaturealways
closedno change required 
CMake-2-8 
CMake 2.8.7 
0011177: Add CTEST_PACK
In addition to CTEST_BUILD and CTEST_TEST a CTEST_PACK would be great.
This should run cpack and upload(!) the generated installer/archive (exe, tar.gz, deb, rpm, ...) to CDash where everybody can download the generated installer (e.g. a nightly build).
At the moment this is possible via a custom execute_process (see http://www.cmake.org/Wiki/CTest:Buildserver#Buildmaster [^]), but that's more a hack than a clean solution.
No tags attached.
has duplicate 0012045closed David Cole Add ctest_package command 
Issue History
2010-08-26 17:18Patrick R. GanstererNew Issue
2010-08-26 17:23Bill HoffmanStatusnew => assigned
2010-08-26 17:23Bill HoffmanAssigned To => Bill Hoffman
2010-08-26 17:24Bill HoffmanNote Added: 0021980
2010-08-26 17:37Patrick R. GanstererNote Added: 0021981
2010-08-26 17:41Bill HoffmanNote Added: 0021982
2010-08-26 17:44Patrick R. GanstererNote Added: 0021983
2010-08-26 17:48Bill HoffmanNote Added: 0021984
2010-08-26 17:51Patrick R. GanstererNote Added: 0021985
2010-08-27 04:56David ColeNote Added: 0021987
2011-07-28 18:15David ColeAssigned ToBill Hoffman => David Cole
2011-07-28 18:16David ColeRelationship addedhas duplicate 0012045
2011-07-28 20:52Jean-Christophe Fillion-RobinNote Added: 0027108
2011-07-29 11:38David ColeTarget Version => CMake 2.8.6
2011-09-06 14:50David ColeNote Added: 0027380
2011-09-06 14:50David ColeTarget VersionCMake 2.8.6 =>
2011-10-25 23:12David ColeNote Added: 0027647
2011-10-25 23:12David ColeStatusassigned => resolved
2011-10-25 23:12David ColeFixed in Version => CMake 2.8.7
2011-10-25 23:12David ColeResolutionopen => no change required
2012-03-06 08:37David ColeNote Added: 0028832
2012-03-06 08:37David ColeStatusresolved => closed

Notes
(0021980)
Bill Hoffman   
2010-08-26 17:24   
You could also use the ctest_build command to do this, and have it build the PACKAGE target.
(0021981)
Patrick R. Gansterer   
2010-08-26 17:37   
is there a clean way to "upload" the package? that seams to be a missing feature
(0021982)
Bill Hoffman   
2010-08-26 17:41   
How would that work? ssh, web upload? file copy to an nfs mount? Seems like there are too many ways to get the file to an upload site for it to be abstracted beyond execute_process.

What did you have in mind?
(0021983)
Patrick R. Gansterer   
2010-08-26 17:44   
I want to upload it to CDash. If a file was uploaded via ctest_submit, a additional column will be shown, where you can download this file (output of cpack).
(0021984)
Bill Hoffman   
2010-08-26 17:48   
I see... Interesting idea... Although having CDash store large blobs like this might be an issue. Perhaps I should move this issue to the CDash project.
(0021985)
Patrick R. Gansterer   
2010-08-26 17:51   
It will already help if CDash will provide a "callback" where the user can implement a custom storage algorithm.
Is it already possible to UPLOAD (send) files via CMake?
(0021987)
David Cole   
2010-08-27 04:56   
I prefer the approach of running:
cmake --build . --target package --config Release

as a "BuildPackage" test in the test suite. This way, the output of running the above command can be displayed as a passed/failed test on the dashboard.

Then, if all tests pass, you know you have a package ready for the upload step.

No need for a ctest_pack command. (You could just run the above command with execute_process in your ctest script if you don't want to add a test to your test suite to do it...)
(0027108)
Jean-Christophe Fillion-Robin   
2011-07-28 20:52   
Having a ctest_pack command would be useful. It will avoid to parse the output of cpack.

See https://github.com/Slicer/Slicer/blob/master/CMake/SlicerFunctionCTestPackage.cmake [^]

and line 250 of https://github.com/Slicer/Slicer/blob/master/CMake/SlicerDashboardDriverScript.cmake [^]
(0027380)
David Cole   
2011-09-06 14:50   
Not enough time left to address this issue before the 2.8.6 release. Deferred until a future release.
(0027647)
David Cole   
2011-10-25 23:12   
You can easily build your installer via other means, there's no need for a ctest_pack function.

And now, there's the ctest_upload function in 2.8.6 and later. You can upload files to CDash (still at this point only in the svn trunk version of CDash) and have them appear as downloadable files attached to builds.
(0028832)
David Cole   
2012-03-06 08:37   
Closing resolved issues that have not been updated in more than 4 months.