[CMake] Is this possible ?

Benoit Thomas benoit.thomas at gameloft.com
Thu Feb 18 17:02:38 EST 2010


Hi,

I am trying to do something like this:

function (FOO_DEBUG)
     ...
endfunction (FOO_DEBUG)

function (FOO_RELEASE)
     ...
endfunction (FOO_RELEASE)

foreach (CONFIG ${CMAKE_CONFIGURATION_TYPES})
     FOO_${CONFIG}
endforeach(CONFIG)

But naturally, it doesn't work :(
Is there a way to make it works ? I looked for command like eval or exec 
but didn't find any. I am trying to achieve a behavior similar to TCL code.

Thank you,
Ben.



More information about the CMake mailing list