[CMake] How to CPack my sources
Michael Jackson
mike.jackson at bluequartz.net
Thu Jul 19 12:39:49 EDT 2012
587:[mjackson at Ferb:Build]$ cpack --help
cpack version 2.8.7
Usage
cpack -G <generator> [options]
Options
-G <generator> = Use the specified generator to generate
package.
-C <Configuration> = Specify the project configuration
-D <var>=<value> = Set a CPack variable.
--config <config file> = Specify the config file.
So in my head I thought "Configuration" meant use one of the "CPack*Config.cmake" files since there is a "Config" in the name of those files. A little bit of a disconnect. I supposed if I had slowed down a bit I might have looked 2 more lines down and caught the --config parameter. Maybe -C should have the "This the same as CMAKE_BUILD_TYPE" or something like that. or just add (Debug, Release...) to the end of the
-C <Configuration> = Specify the project configuration
line to make this REALLY clear what is meant.
Anyways, that was my thought process. Yours may vary. :-)
___________________________________________________________
Mike Jackson Principal Software Engineer
BlueQuartz Software Dayton, Ohio
mike.jackson at bluequartz.net www.bluequartz.net
On Jul 19, 2012, at 12:06 PM, David Cole wrote:
> Mike,
>
> Did you make this error with -C because of some bad documentation
> somewhere? (I seem to recall this in the past, but I think we've fixed
> up all the places where that error occurred...) If there's still an
> error out there somewhere in some docs that seem like they should be
> "current", I'd like to fix it.
>
> Thanks,
> David
>
>
> On Thu, Jul 19, 2012 at 12:01 PM, Eric Noulard <eric.noulard at gmail.com> wrote:
>> 2012/7/19 Michael Jackson <mike.jackson at bluequartz.net>:
>>> I would like to be able to run "make source" or "cpack source" or something like that where just my source files are packed up.
>>
>> You were almost there this is:
>>
>> make package_source
>>
>>> I have the following in a cmake file that is included in my Main CMakeLists.txt file:
>>>
>>>
>>> SET(CPACK_SOURCE_GENERATOR "TGZ")
>>> SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_Source.tar.gz")
>>> SET(CPACK_SOURCE_TOPLEVEL_TAG "Source")
>>> SET(CPACK_IGNORE_FILES "/i386/;/x64/;/VS2008/;/zRel/;/Build/;/\\\\.git/;\\\\.*project")
>>> SET(CPACK_SOURCE_IGNORE_FILES "/i386/;/x64/;/VS2008/;/zRel/;/Build/;/\\\\.git/;\\\\.*project")
>>>
>>> I see that I get a CPackSourceConfig.cmake file in my build directory.
>>>
>>> I tried the following from the command line:
>>>
>>> cpack -G TGZ -C CPackSourceConfig.cmake
>>
>> the appropriate syntax is:
>>
>> cpack -G TGZ --config CPackSourceConfig.cmake
>>
>> -C is the "Specify the project configuration" which
>> is "the configuration that the project was build with, for example
>> 'Debug', 'Release'."
>>
>> see:
>> http://www.cmake.org/cmake/help/v2.8.8/cpack.html#opt:-CConfiguration
>>
>>> but that just created the usual binary release. I am sure I am missing something simple at this point.
>>
>> --
>> Erk
>> Le gouvernement représentatif n'est pas la démocratie --
>> http://www.le-message.org
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list