[CMake] copying the contents of a directory with cpack

Alan W. Irwin irwin at beluga.phys.uvic.ca
Tue Sep 18 11:36:52 EDT 2007


On 2007-09-18 09:48-0400 Bill Hoffman wrote:

> Alan W. Irwin wrote:
>> That advice is correct for generating binary distributions with "make
>> package", but in case you wanted to include the doxygen output in a source
>> distribution with the "make package_source" command, then all you have to 
>> do
>> is make your build tree a subdirectory of your source tree or copy the
>> doxygen output from the build tree to the source tree.  By default, "make
>> package_source" packages everything in the source tree, and you use a 
>> regex
>> expression variable called CPACK_SOURCE_IGNORE_FILES to ignore anything 
>> you
>> do not want.  To see how to set this up, have a look at the top-level
>> CMakeLists.txt file of CMake itself.
> Since doxygen is output from running the build, a source package would not be
> a good idea.   I would add custom commands to run doxygen and create the 
> docs,
> then add rules to install them, and then cpack should install them as well.

I will go along with the idea that a source package should not include files
generated by compilers, but that prohibition should not be applied to the
case of generated documentation. Of course, it is certainly proper to
question whether it is necessary to include doxygen-generated documentation
in a source package, but some CPack users may want this feature (in case
they are concerned their users may not have access to doxygen or don't want
to bother to install it).  An even stronger case can be made for including
DocBook-generated documentation in source packages.  I am familiar with the
DocBook case since that is what we use to generate the PLplot documentation.
The required DocBook software stack is still a tricky issue so we don't even
try to build PLplot documentation on any platform other than Linux.
Therefore, we have had a long history of including our generated
documentation in our source tarball. An additional benefit of this approach
for our Linux users is it drastically reduces our build dependencies.  So
PLplot (and presumably a number of other projects) will want to use CPack to
include generated documentation.

Given the need (strong in the case of at least DocBook although some doxygen
users may want this capability as well) to have generated documentation in
the source package, the only recourse that I am aware of is to copy the
generated documentation from the build tree to the source tree so that cpack
can include it in its source package. Anyhow, that is the approach we use
with PLplot (with a special option so the source tree ordinarily does
not get contaminated this way).  Ideally, we wouldn't have to do this and
there would be a method to tell cpack to include certain files that were
external to the source tree in the source package.  Is there any chance
that this functionality will be added to cpack?

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list