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

Path variables

Last modified: 19 October 2021

Path variables are placeholders that stand for absolute paths to resources that are linked to your project but are stored outside it. If you are working in a team, these absolute paths on the computers of your teammates may differ. With path variables, you can flexibly share your code so all the references to the linked resources are resolved properly as the path variables accept the values according to the configuration on each specific computer.

There are two pre-defined variables in CLion: $USER_HOME$ for your home directory and $PROJECT_DIR$ for the directory where your project is stored.

You can refer to path variables in project settings (for example, when configuring external tools) and run/debug configurations of the following types: