[CMake] Making timestamped tarball with CPack
Eric Noulard
eric.noulard at gmail.com
Thu Feb 15 10:12:40 EST 2007
Hi All,
I am using CPack in order to build some "backup tarballs".
Source tarballs goes on some other media.
Binary tarball may be exchanged with user that don't
want to build the software.
Before using CMake I made Makefile rules
that build some sort of timestamped tarballs something
which may look like:
mysource-x.y.z-11h45-username.tgz
Is there a way to build such tarball with CMake/CPack
or should I post a request for feature or a patch?
I would like something like
make CPACK_VERSION_PATCH='`date "+%Hh%M"`' package_source
which would generate
mypackname-x.y.15h45-Source.tar.gz
This doesn't seems to be possible and I may only do something
more like:
cpack -D CPACK_PACKAGE_FILE_NAME=`date "+%Hh%M"` --config
CPackSourceConfig.cmake
but I loose the package name construction from CPack...
I think I may even tweak a CPackSourceConfigDated.cmake from my
CMakeLists.txt with a custom TARGET "dated_source_package"
but even with this won't be able to make the date
change on each
make dated_source_package
What should be the way to go for my need?
Write a new CPack Generator derived from TGZ?
--
Erk
More information about the CMake
mailing list