[CMake] Making timestamped tarball with CPack
Eric Noulard
eric.noulard at gmail.com
Thu Feb 15 12:02:50 EST 2007
2007/2/15, Alan W. Irwin <irwin at beluga.phys.uvic.ca>:
> >
> > 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?
>
> You have complete control over the name of the source tarball and binary
> tarball from _cmake_. Just set CPACK_SOURCE_PACKAGE_FILE_NAME and/or
> CPACK_PACKAGE_FILE_NAME from within your top-level CMakeLists.txt file. Just
> invoke cmake with -DDATE=`date "+%Hh%M"` and then use that DATE variable to
> build the name that you want within your top-level CMakeLists.txt file.
In fact I know that, but this does not really correspond to my need.
I should have expressed myself more clearly.
I want the name of the tarball to be generated
at "make" time
and not
at "CMake" time
that is two consecutive launches of
make package_source
would generate two tarballs with DIFFERENT names.
but you are right I may try to ADD_CUSTOM_TARGET
package_backup
which forces CMake relaunch in order to modify
CPACK_SOURCE_PACKAGE_FILE_NAME.
--
Erk
More information about the CMake
mailing list