# CMake マクロ

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/ja-jp/help/clion/llms.txt).

[実行/デバッグ構成](run-debug-configuration-application.html)や [外部ツール](configuring-third-party-tools.html)を設定するとき（例えばプロジェクト関連のパスを使用する場合など）に、CMake 固有のマクロを使用できます。

マクロを挿入するフィールドで ![](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.add_dark.svg) をクリックし、リストから選択します。

![CMake マクロ](https://resources.jetbrains.com/help/img/idea/2026.3/cl_cmake_macros.png)

> **Note:**
> [リモート with local sources](remote-projects-support.html) モードで作業している場合は、ローカルおよびリモートのパスと名前にマクロを使用でき、それらは適切に展開されます。 例:  `CMakeCurrentProductLocalFile`  は現在の構成のローカル製品パスに展開されますが、  `CMakeCurrentProductFile`  は代わりに環境 (リモート) パスを返します。

## See also

### ハウツー

[クイック CMake チュートリアル](quick-cmake-tutorial.html) [External Tools](configuring-third-party-tools.html) [カスタムビルドのターゲットとアプリケーション](custom-build-targets.html)

