[CMake] Test for if a macro defined

James Bigler bigler at cs.utah.edu
Fri Feb 8 20:29:34 EST 2008


Is there an expression similar to the one for variables to determine if a macro is defined?

MACRO(TEST)
   MESSAGE("TEST is defined")
ENDMACRO(TEST)

IF(DEFINED TEST)
   TEST()
ELSE(DEFINED TEST)
   MESSAGE("TEST is not defined")
ENDIF(DEFINED TEST)

James


More information about the CMake mailing list