MantisBT - CMake
View Issue Details
0011845CMakeCMakepublic2011-02-11 10:322012-11-05 14:32
Matt Darland 
David Cole 
normalfeatureN/A
closedduplicate 
 
CMake 2.8.9 
0011845: Add an EVAL command to evaluate a string as a CMake script
Add an EVAL command that evaluates the string passed in as a CMake script, within the same environment closure as the caller.

Similar to the INSTALL(SCRIPT), but run at CMake evaluation instead of install time.


Motivation: I'd like to write a macro similar to:
#-- LIST_APPLY(src fn)
#-- Calls command in ${fn} against each item in src
MACRO(LIST_APPLY src fn)
  FOREACH(_i ${src})
    EVAL("${fn}(${_i}")
  ENDFOREACH()
ENDMACRO()

So I'm not constantly writing boilerplate foreach code
No tags attached.
duplicate of 0004034closed David Cole using a variable in the name of a macro. 
Issue History
2011-02-11 10:32Matt DarlandNew Issue
2012-06-01 11:20David ColeAssigned To => David Cole
2012-06-01 11:20David ColeStatusnew => assigned
2012-06-01 11:21David ColeNote Added: 0029595
2012-06-01 11:21David ColeRelationship addedduplicate of 0004034
2012-06-01 11:21David ColeStatusassigned => resolved
2012-06-01 11:21David ColeFixed in Version => CMake 2.8.9
2012-06-01 11:21David ColeResolutionopen => duplicate
2012-11-05 14:32David ColeNote Added: 0031439
2012-11-05 14:32David ColeStatusresolved => closed

Notes
(0029595)
David Cole   
2012-06-01 11:21   
Please see notes in the duplicate "bug" -- we won't be adding this feature to the CMake language.
(0031439)
David Cole   
2012-11-05 14:32   
Closing resolved issues that have not been updated in more than 4 months.