Is it possible to  call variable macro names from within another macro?  The 
following is a simple (non-working) example of what I would like to do:

        macro (do_something callback)
                # Call the callback macro and pass a message argument
                ${callback}("Hello world")
        endmacro (do_something)

        macro (my_callback msg)
                message("${msg}")
        endmacro (my_callback)

        # Call do_something macro, which will call my_callback macro as a 
callback
        set(callback_name my_callback)
        do_something(${callback_name})

Thanks,
Justin


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to