[CMake] Dynamic function names
Nima Talebi
nima at it.net.au
Mon Feb 2 06:40:10 EST 2009
Hello,
I have defined a number of functions, like so...
function(BUILD_HOTWIRE_SERVER)
...
endfunction(BUILD_HOTWIRE_SERVER)
Now, based on what user as requested, I'd like to call selected functions
like so...
foreach(COMPONENT ${ONLY})
if(ENABLE_${COMPONENT})
message(BUILD_${COMPONENT})
BUILD_${COMPONENT}()
endif()
message(${LINE})
endforeach(COMPONENT)
...however, cmake does not seem too friendly to the BUILD_${COMPONENT}().
What should I do?
Thankyou,
Nima
--
Nima Talebiw: http://ai.autonomy.net.au/
p: +61-4-0667-7607 m: nima at autonomy.net.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090202/4c9c28e2/attachment.htm>
More information about the CMake
mailing list