Command Definitions: Macros
Let's learn about command definition and macros in CMake.
We'll cover the following...
Command definitions
There are two ways to define our own command: we can use the macro()
command or the function()
command. The easiest way to explain the differences between these commands is by comparing them to C-style preprocessor
A
macro()
command works more like a find-and-replace instruction than an actual subroutine call such asfunction()
. Contrary to ...