[CMake] Test for if a macro defined
Filipe Sousa
natros at gmail.com
Sat Feb 9 06:01:55 EST 2008
James Bigler wrote:
> 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)
I don't think there is but you can get a list of all defined macros:
get_cmake_property(all_macros MACROS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20080209/1c19cff7/signature.pgp
More information about the CMake
mailing list