[CMake] make package_source and binary subdir of source

Alexander Neundorf a.neundorf-work at gmx.net
Sun Mar 9 18:10:16 EDT 2008


On Saturday 08 March 2008, Alan W. Irwin wrote:
> To summarize, Erk's current proposal is to implement
>
> set_source_files_properties(file1 file2
>                                  PROPERTIES CPACK_PACKAGE_SOURCE true)
> and
>
> CPACK_SOURCE_ADD_FILES  "list of regular_expressions"
>
> for inclusion and
>
> set_source_files_properties(file1 file2
>                                 PROPERTIES CPACK_PACKAGE_SOURCE false)
>
> for exclusion to supplement the current
>
> CPACK_SOURCE_IGNORE_FILES "list of regular_expressions"
>
> for exclusion.
>
> I think these ideas are good ones.  In particular, I have a couple of
> projects where I add generated documentation to the source tarball,
> and it is pretty ugly to contaminate the source tree by copying the
> generated documentation back to it so it can be included in the source
> tarball.  Thus, it would be great to use CPACK_SOURCE_ADD_FILES to add
> some files that are generated in the build tree to the source package.
>
> I think the following has been assumed by Erk, but I want to explicitly
> state for the record that we should stick to the current result which is
> the source package is made up of everything in the source tree by default.
> This maintains backwards compatibility and also is a pretty good default
> since it is often a good approximation to what is wanted in the source
> package.
>
> Finally, the inclusion rules should override the exclusion rules if there
> is a conflict between them.  For example, this would allow those who want
> to be completely explicit about what files are included to get rid of the
> default by
>
> set(CPACK_SOURCE_IGNORE_FILES "^${PROJECT_SOURCE_DIR}/")
>
> but then add back whatever files they want to cherry pick from the source
> tree using CPACK_SOURCE_ADD_FILES or PROPERTIES CPACK_PACKAGE_SOURCE.
>
> Thoughts?

Please file a feature request in the bug tracker.

Alex


More information about the CMake mailing list