CMake Functions and Macros

CMake supports both functions and macros to provide a named abstraction for some repetitive works. A function or macro always define a new command.

Functions

where name is the name of the function, with arguments arg1, arg2, etc.

Example