# CMake macros

You can use CMake-specific macros when setting up [run/debug configurations](run-debug-configuration-application.html) and [external tools](configuring-third-party-tools.html) (for example, to use a project-related path).

Click ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.general.add_dark.svg) in the field where you want to insert a macro and select it from the list:

![CMake macros](https://resources.jetbrains.com/help/img/idea/2026.2/cl_cmake_macros.png)

> **Note:**
> If you are working in the [remote with local sources](remote-projects-support.html) mode, you can use the macros for local and remote paths and names, and they will be expanded properly. For example, `CMakeCurrentProductLocalFile` expands to the local product path for the current configuration, while `CMakeCurrentProductFile` returns the environment (remote) path instead.

## See also

### How tos

[Quick CMake tutorial](quick-cmake-tutorial.html) [External Tools](configuring-third-party-tools.html) [Custom build targets and applications](custom-build-targets.html)

