View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006266CMakeCMakepublic2008-01-23 04:082008-01-23 08:14
ReporterPau Garcia i Quiles 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006266: Feature request: add #cmakedefine-like directive without #define
DescriptionCMake allows to customize header files by using CONFIGURE_FILE and "#cmakedefine variable value", which generates "#define variable value".

It would be nice if we had something like #cmakedefine but for arbitrary files which only wrote the value. For example: "#cmakeset my_text", which would generate "my_text". It's a bit like having <?php my_php_code ?> tags in a .php file.

Use case: combined use of configuration files and INSTALL directives. I need to specify the application directory both in pfsi.conf and in CMakeLists.txt for INSTALL( FILES ${PROJECT_SOURCE_DIR}/pfsi.png DESTINATION ${CMAKE_INSTALL_PREFIX}/{PFSI_APP_DIR} ).

NB: I know this can the done with FILE but I think the use case is common enough, and the implementation simple enough, to add this feature.
TagsNo tags attached.
Attached Filespatch file icon cmakeset.patch [^] (1,381 bytes) 2008-01-23 06:06 [Show Content]
patch file icon cmakeset-2.patch [^] (1,382 bytes) 2008-01-23 06:39 [Show Content]
patch file icon cmakeset-documentation.patch [^] (655 bytes) 2008-01-23 06:45 [Show Content]

 Relationships

  Notes
(0010220)
Pau Garcia i Quiles (reporter)
2008-01-23 06:07

The attached patch (cmakeset.patch) against CVS add the requested feature
(0010221)
Pau Garcia i Quiles (reporter)
2008-01-23 06:39

cmakeset.patch introduced an extra space at the beginning of whatever followed #cmakewrite, cmakeset-2.patch is the right patch.
(0010222)
Pau Garcia i Quiles (reporter)
2008-01-23 06:46

cmakeset-documentation.patch documents #cmakewrite
(0010223)
Pau Garcia i Quiles (reporter)
2008-01-23 07:22

Scrap this feature request, it's already possible. My bad :-)

 Issue History
Date Modified Username Field Change
2008-01-23 04:08 Pau Garcia i Quiles New Issue
2008-01-23 06:06 Pau Garcia i Quiles File Added: cmakeset.patch
2008-01-23 06:07 Pau Garcia i Quiles Note Added: 0010220
2008-01-23 06:39 Pau Garcia i Quiles File Added: cmakeset-2.patch
2008-01-23 06:39 Pau Garcia i Quiles Note Added: 0010221
2008-01-23 06:45 Pau Garcia i Quiles File Added: cmakeset-documentation.patch
2008-01-23 06:46 Pau Garcia i Quiles Note Added: 0010222
2008-01-23 07:22 Pau Garcia i Quiles Note Added: 0010223
2008-01-23 08:14 Bill Hoffman Status new => closed
2008-01-23 08:14 Bill Hoffman Resolution open => no change required


Copyright © 2000 - 2018 MantisBT Team