View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013357CMakeCPackpublic2012-06-27 22:322012-11-05 14:33
ReporterDavid Sandberg 
Assigned ToDavid Cole 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformWindowsOSWindowsOS Version7
Product VersionCMake 2.8.8 
Target VersionFixed in Version 
Summary0013357: CPACK macros in own copy of NSIS.template.in are still generated even though they are commented out
DescriptionThe parser of NSIS.template.in generates output for CPACK macros that are commented out (for example @CPACK_NSIS_CREATE_ICONS@). The parser only comments out the first row of the macro's output.

Here's an example:

CMakeLists.txt:
set(CPACK_COMPONENTS_ALL APP1 APP2)

NSIS.template.in (don't want it to install default icons because I need to use arguments in the shortcut collected during installation):
;@CPACK_NSIS_CREATE_ICONS@

This will generate the following output in project.nsi:
; CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\APP1.lnk" "$INSTDIR\bin\APP1.exe"
  CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\APP2.lnk" "$INSTDIR\bin\APP2.exe"

TagsCPACK, NSIS
Attached Files

 Relationships

  Notes
(0029854)
David Cole (manager)
2012-06-27 22:52

That's just the way it works...

When the file is "configured", the part of the file that says @CPACK_NSIS_CREATE_ICONS@ is replaced by whatever the value of CPACK_NSIS_CREATE_ICONS is at the time. If it contains newlines, then those are going to be in the result file.

If that's not what you want, then simply remove the @CPACK_NSIS_CREATE_ICONS@ from the .in file rather than commenting it out. Or, put a space in between the "@" and the CPACK_NSIS_CREATE_ICONS to prevent the CMake configuration step from replacing the value.

The NSIS comment has nothing to do with how the file gets configured.
(0029855)
David Cole (manager)
2012-06-27 22:53

Nothing to fix here. This behavior is as designed/expected.
(0031461)
David Cole (manager)
2012-11-05 14:33

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-06-27 22:32 David Sandberg New Issue
2012-06-27 22:33 David Sandberg Tag Attached: CPACK
2012-06-27 22:33 David Sandberg Tag Attached: NSIS
2012-06-27 22:52 David Cole Note Added: 0029854
2012-06-27 22:52 David Cole Assigned To => David Cole
2012-06-27 22:52 David Cole Status new => assigned
2012-06-27 22:53 David Cole Note Added: 0029855
2012-06-27 22:53 David Cole Status assigned => resolved
2012-06-27 22:53 David Cole Resolution open => no change required
2012-11-05 14:33 David Cole Note Added: 0031461
2012-11-05 14:33 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team