[CMake] CPack and windows maximum path legth

Eric Noulard eric.noulard at gmail.com
Tue Mar 12 10:39:16 EDT 2013


2013/3/12 Jakub Zakrzewski <jzakrzewski at e2e.ch>:
> Hi All!
>
> I have recently reached the maximum path length using CPack on windows. The problem is that the project I'm working on has a directory hierarchy that cannot be changed. Somebody some time ago decided on concrete paths and if I try to change it, I got into real trouble. All our tools have hardcoded paths, many things have dependecies on source or build directory location.
>
> Is there any way, to make CPack use other temporary directory than ${BUILD_DIR)/_CPack_Packages ? I'd rather avoid having two build trees and having to compile again only to produce a package.

Yes there is.

CPACK_PACKAGE_DIRECTORY is what you are looking for.
see: cpack  --help-variable CPACK_PACKAGE_DIRECTORY

You can set this variable in your CMakeLists.txt or CPack project config file
or from the cpack command line using the "-B" command line option.

see: cpack  --help

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


More information about the CMake mailing list