Justin, That's not possible with CMake. I posted a similar question a couple of months ago. See this thread: http://www.mail-archive.com/[email protected]/msg19596.html
Regards, Marcel Loose. -----Original Message----- From: KSpam <[email protected]> To: cmake <[email protected]> Subject: [CMake] Macro callbacks Date: Tue, 26 May 2009 13:50:29 -0700 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 _______________________________________________ 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
