[CMake] Calling macros from within macros.

Alexander Neundorf a.neundorf-work at gmx.net
Wed Oct 24 11:29:44 EDT 2007


On Wednesday 24 October 2007, Josef Karthauser wrote:
> Is it not possible to call a variable macroname from within a macro?
>
> 	MACRO(INDIRECT_MACRO MACRONAME LIST)
> 		FOREACH(L ${LIST})
> 			${MACRONAME}(${L})
> 		ENDFOREACH(L)
>       ENDMACRO(INDIRECT_MACRO)
>
> 	INDIRECT_MACRO(MESSAGE ONE TWO THREE)

No, variable function/macronames are not supported. Maybe there is already a 
feature request in the bug tracker for this.

Alex


More information about the CMake mailing list