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

MacroDescription
CMakeCurrentBuildDirBuild directory for current CMake run configuration
CMakeCurrentBuildTypeNameBuild type name for current CMake run configuration
CMakeCurrentExecutableNameCMake executable used for current run configuration
CMakeCurrentGenerationDirGeneration directory for current CMake run configuration
CMakeCurrentProductFileProduct file for current CMake run configuration
CMakeCurrentProgramArgumentsProgram arguments for current CMake run configuration
CMakeCurrentTargetNameTarget name for current CMake run configuration
Last modified: 18 September 2018