Changing default settings for Cmake configuration in CLion
Asked Answered
R

1

12

In the settings for CLion, CMake only appears in Build, Execution, Deployment under project specific settings. It does not exist under Default Settings. Is there a way I can specify a universal CMake configuration such that it is available to all projects by default for current and all future projects unless specified otherwise?

For example let's say I want to set the Generation path of all projects to a default location of build. Instead of manually editing the project settings for each project to include that, is there a workaround to set that as the default?

Please try to provide a solution that will only affect a local environment

Rostrum answered 7/4, 2017 at 0:0 Comment(0)
C
5

Only starting from CLion 2019.3 there is ability to configure CMake defaults.

It will affect all new projects (without .idea config directory).

enter image description here

You can specify default build types/toolchains, CMake options, generation path etc. Also there is pretty nice macro $PROJECT_NAME$.

Cutlor answered 29/4, 2020 at 16:2 Comment(2)
It is now in File | New Projects Setup | Settings for New Projects....Putout
It depends on the OS. Settings word is used on the Linux/Windows. On OS X it's Preferences.Cutlor

© 2022 - 2024 — McMap. All rights reserved.