[CMake] using a variable in the name of a macro

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Sat Nov 4 06:39:09 EST 2006


Hi,

Currently with cmake, we can do:

   SET(type "US")
   SET(IUS "tralala")

then writting ${I{type}} is the same than writting ${IUS}. That's very  
convenient in many cases (and that's the base of WrapITK).
However, it's not possible to do the same with the name of the macro:

   MACRO(DEFINE_PYTHON)
    ...
   ENDMACRO(DEFINE_PYTHON)
   SET(lang PYTHON)

then calling DEFINE_${lang}() doesn't work.

Can I hope to see that feature in the next releases ?

Regards,

Gaetan


-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr


More information about the CMake mailing list