[CMake] Calling a dynamically created macro

Rodolfo Lima rodolfo at rodsoft.org
Tue Dec 18 21:50:42 EST 2007


Is there a way to call a dynamically created macro name?

This is what I want to achieve:

set(module "ftgl")

if(COMMAND use_${module})
	use_${module}()
endif()

But cmake chokes, saying

Parse error.  Expected a command name, got unquoted argument with text
"use_${module}".

Regards,
rod



More information about the CMake mailing list