[Cmake] CMake command issue
Ken Martin
ken.martin at kitware.com
Tue Aug 13 08:52:55 EDT 2002
Hey Folk,
A quick question. I am adding macros/procedures to CMake because a few
people have asked for them and they are very easy to implement. My
question is on syntax. For example, consider the following simple
example:
MACRO(ASSERT value message)
IF (NOT ${value})
MESSAGE(${message})
ENDIF (NOT ${value})
ENDMACRO(ASSERT)
My question is which of the following two invocations would be better?
ASSERT(WIN32 "we are not on windows")
or
INVOKE_MACRO(ASSERT WIN32 "we are not on windows")
The first is easier to read, looks and smells like a regular command.
The down side is that someone might confuse it for a regular command
(I guess C and C++ have the same issue) The second format is a little
less clean, but it is clear that you are invoking a macro. Thoughts?
Thanks
Ken
--------------------------
Ken Martin, PhD
Kitware Inc.
518 371-3971 x101
469 Clifton Corporate Pkwy.
Clifton Park, NY 12065
More information about the CMake
mailing list