I'm new to CMake, so maybe there's a better way to do this, but how can I make CLion install an executable/component it just built?
Basically, I want some targets (Run/Debug Configurations), but not others, to automatically perform an installation step after building as defined by the install command in the CMake project. So I'd like to be able to somehow append "install" or a component name to the CMake command line generated by CLion, but I haven't found a way to do this. The "Build options" under CMake Settings appear to apply to all targets (including Clean) so that won't really help. This doesn't seem like an uncommon thing to do so maybe I'm just misunderstanding how either CMake or CLion are meant to be used. Any ideas?