CLion
 
2024.2
Get CLion
You are viewing the documentation for an earlier version of CLion.

Built-in IDE macros

Last modified: 08 October 2024

CLion provides a number of built-in macros, which are variables that you can use to specify various paths, options, and other command-line arguments for external tools and run configurations. Dialog fields that accept macros as values have a plus icon on them:

Add an IDE macro

The value of a macro depends on the current context. For example, if you need to pass the name of the directory that contains the current file, you can use $FileDirName$. Or if you need the full path: $FileDir$.