MantisBT - CMake
View Issue Details
0009056CMakeCPackpublic2009-05-21 08:542016-06-10 14:30
David Carter 
Bill Hoffman 
normalmajoralways
closedmoved 
CMake-2-6 
 
0009056: CPack recursively includes previously generated archives when creating new ones
When CPack makes multiple archives, for example .gz, .bz2, and .Z, each archive will include the previously generated archive. When run multiple times, it will include the previously generated ones as well.
Remove the following line from CMakeFiles.txt to reproduce:

SET(CPACK_SOURCE_IGNORE_FILES
"/_CPack_Packages/;/CVS/;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;.*~;cscope.*;.*\\\\.tar\\\\.gz;.*\\\\.tar\\\\.bz2;.*\\\\.tar\\\\.Z")

OS: RHEL 5.2 x86_64
No tags attached.
gz qpp-1.0.0.tar.gz (920,794) 2009-05-21 08:54
https://public.kitware.com/Bug/file/2266/qpp-1.0.0.tar.gz
Issue History
2009-05-21 08:54David CarterNew Issue
2009-05-21 08:54David CarterFile Added: qpp-1.0.0.tar.gz
2009-05-21 09:55Bill HoffmanNote Added: 0016538
2009-05-21 09:55Bill HoffmanStatusnew => assigned
2009-05-21 09:55Bill HoffmanAssigned To => Bill Hoffman
2009-05-21 10:05David CarterNote Added: 0016539
2009-05-21 10:31Bill HoffmanNote Added: 0016542
2016-06-10 14:27Kitware RobotNote Added: 0041560
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0016538)
Bill Hoffman   
2009-05-21 09:55   
For source packages it is much better to use out of source builds. However, CPack could do a better job of excluding CMake generated stuff. However, in source builds are tricky because projects can generate lots of files. Still much safer to do an out of source build.

mkdir build
cd build
cmake ../mysource
make
make package_source # should be no problem with binary stuff in source
(0016539)
David Carter   
2009-05-21 10:05   
Unfortunately, even with out of source builds, the problem persists. The package now enforces out of source builds, but when I double checked I was still getting this behaviour. Without the explicit excludes, I am still getting the recursive includes.

So I guess there are two issues here:
1. the recursive includes
2. should out of source builds be automatically enforced?
(0016542)
Bill Hoffman   
2009-05-21 10:31   
I just tried it and it works, but he binary tree can not be a sub directory of the source tree.

So, this works:

tar xvfz qpp-1.0.0.tar.gz
mkdir qpp-1.0.0-build
cd qpp-1.0.0-build
cmake ../qpp-1.0.0
make
make package
make package_source

BTW, qpp built on both windows and linux with no problems for me and packaged as well.

That said, I will see what I can do to try and automatically exclude the build tree from the source package.
(0041560)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.