[CMake] Packaging : Debug + Release together

Eric Noulard eric.noulard at gmail.com
Mon May 21 18:45:12 EDT 2012


2012/5/21 Nicholas Yue <yue.nicholas at gmail.com>:
> Hi,
>
>    I can build debug and release code by setting the CMAKE_BUILD_TYPE
> variable.
>
>    What is the recommend process/workflow if I wish to build/install/package
> both the Debug and Release build into a single e.g. RPM, as part of an
> automated process (e.g. nightly build) ?

Currently CPack cannot do that out of the box because CMake cannot do
that either.
CMake requires 2 build trees for that (at least on Linux)

>    How will CPack find the different builds for packaging ?

He won't.

May be it's possible to craft your own CPackConfig.cmake file which would
refer to the 2 build trees but how would you ensure that there won't
be any name collision between "debug" and "release" tree?

Shall they be installed in different place /prefix ?
What would be the layout of the expected unique RPM ?



-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list