[CMake] CPack -- adding license to files

Raymond Wan r.wan at aist.go.jp
Fri Jul 1 12:17:20 EDT 2011


Hi all,

I was wondering if there is an easy/automated way that I can get CMake
or CPack to add a license to every source file prior to distribution
of the source.  Of course, I mean that I would provide the wording of
the license and "all" it does is copy this license to the top of each
source file in a way that is specific to the language (ideally).
i.e., using // for C++ source files.

It would be nice if it could also update dates too, but that's more of
a wishlist.  (i.e., changing "Copyright 2011" to "Copyright
2011-2012")

Thank you!

Ray


More information about the CMake mailing list