[CMake] cpack -C CPackSourceConfig.cmake not making source package

Jack Stalnaker jack.stalnaker at gmail.com
Fri Sep 7 13:17:44 EDT 2012


Ignore the last paragraph of my previous message. That was with the '-C'
option.

On Fri, Sep 7, 2012 at 12:10 PM, Jack Stalnaker <jack.stalnaker at gmail.com>wrote:

> --config worked. Wow, if -C is the wrong option, I wish it wouldn't appear
> in the tutorial and in the wiki section on creating a package. From
> cmake.org itself. That's confusing. It's not the only error I've noticed
> in the tutorial. In the section on testing, it's never mentioned that
> enable_testing() has to be called. I only found that out when my tests
> failed to run. I had to search outside the tutorial for the appropriate
> sequence of calls, and then verify in the tutorial source files that
> enable_testing was called.
>
> I did try an out of source build (making certain to delete the cache files
> first), but I got the same results. It's still only packing the bin
> directory with the built file.
>
> Thanks for the help.
>
> On Fri, Sep 7, 2012 at 11:52 AM, Eric Noulard <eric.noulard at gmail.com>wrote:
>
>> 2012/9/7 Jack Stalnaker <jack.stalnaker at gmail.com>:
>> > Even if I download the tutorial sources directly from cmake.org (for
>> this
>> > tutorial  http://www.cmake.org/cmake/help/cmake_tutorial.html ), unzip
>> them,
>> > and run cpack -C CPackSourceConfig.cmake, I don't get a source package.
>>
>> -C is the wrong option.
>>
>> You should do:
>>
>> cpack --config CPackSourceConfig.cmake
>>
>> > I get what I would consider a binary package. I saw that another user
>> had
>> > reported the same issue here
>> >
>> http://cmake.3232098.n2.nabble.com/How-to-deliver-a-source-code-package-td6505888.html
>> > but didn't really resolve it. That user resorted to make package_source,
>> > which does indeed pack up the source...and everything else in the
>> directory.
>>
>> This is the expected CPack "source" packaging behavior.
>> If you want to avoid that:
>>
>> 1) build out-of-source:
>>        http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees
>>
>> 2) setup appropriate value for CPACK_SOURCE_IGNORE_FILES
>>
>>    see cpack --help-variable CPACK_SOURCE_IGNORE_FILES
>>
>> > I tried throwing some dummy "sandbox" files in there, and they get
>> zipped
>> > right up, too.  Am I doing something wrong? I'm following the tutorial
>> as
>> > well as I can tell.  It seems like the command above should create a
>> source
>> > package containing no binary files, and only the sources that you have
>> told
>> > it to include.
>>
>> CPack "source" packaging is currently packaging the source directory
>> while excluding "CPACK_SOURCE_IGNORE_FILES" that's unfortunately
>> a very basic behavior.
>>
>> CPack cannot tel apart binary or source file unless you do out-of-source
>> build.
>>
>>
>> --
>> Erk
>> Le gouvernement représentatif n'est pas la démocratie --
>> http://www.le-message.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120907/160fcaf3/attachment.htm>


More information about the CMake mailing list