[cmake-developers] [CMake 0012906]: CPACK_PACKAGE_DIRECTORY in CPackConfig.cmake is not respected

Mantis Bug Tracker mantis at public.kitware.com
Fri Jan 20 16:55:59 EST 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=12906 
====================================================================== 
Reported By:                K. R. Walker
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12906
Category:                   CPack
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-01-20 16:55 EST
Last Modified:              2012-01-20 16:55 EST
====================================================================== 
Summary:                    CPACK_PACKAGE_DIRECTORY in CPackConfig.cmake is not
respected
Description: 
The CPack project directory (command-line argument '-B' a.k.a.
CPACK_PACKAGE_DIRECTORY) cannot be set in CMake code and be respected.

CMake writes out the CPACK_PACKAGE_DIRECTORY variable in CPackConfig.cmake, but
when:
  cpack --config ./CPackConfig.cmake
is run from the package target, cpack.cxx does the following:

1. Variable cpackProjectDirectory is initialized from
GetCurrentWorkingDirectory() (line 151)

2. The CPackConfig.cmake file is used to sets globalMF variables (line 272)

3. Because cpackProjectDirectory is not empty (line 306), the value of this is
then inserted into globalMF as CPACK_PACKAGE_DIRECTORY. This overwrites the
value that was in the CPackConfig.cmake file.


CPACK_PACKAGE_DIRECTORY should not be set to the value of
GetCurrentWorkingDirectory() unless it's not set by line 321 (just after -D
variables have been inserted into globalMF).
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-01-20 16:55 K. R. Walker   New Issue                                    
======================================================================




More information about the cmake-developers mailing list