CLion 2018.2 Help

CMake Macros for External Tools

In CLion, you can run any external scripts or executables, either independently via the Tools | External Tools menu or as a step of your Run/Debug configuration.

When setting up an external tool, you may need CMake-specific macros to configure programs, arguments, and working directories. The list of available macros is presented is the Macros pop-up dialog, accessible by clicking artwork studio icons common add in the Settings / Preferences | Tools | External Tools dialog or in the Before Launch section of the Run | Edit Run/Debug Configurations dialog:

CMake maros for external tools

Macro

Description

CMakeCurrentBuildDir

Build directory for current CMake run configuration

CMakeCurrentBuildTypeName

Build type name for current CMake run configuration

CMakeCurrentExecutableName

CMake executable used for current run configuration

CMakeCurrentGenerationDir

Generation directory for current CMake run configuration

CMakeCurrentProductFile

Product file for current CMake run configuration

CMakeCurrentProgramArguments

Program arguments for current CMake run configuration

CMakeCurrentTargetName

Target name for current CMake run configuration

Last modified: 27 November 2018