How to change cmake options in clion 2017 without going through CMakeCache.txt
Asked Answered
H

1

10

I use clion for quite a while now and in the past there was a dedicated window which shows all cmake variables/options for the current projet. Here you could see and change all variables/options. It was very convenient. I guess they changed this now and you have to open the CMakeCache.txt file and change the options in this file. But this file is so big it is very annoying to search for the option you want to change. It is even more annoying when you don't know the exact name of the option. So, my feeling is, there should be better way to list at least all options. So, is there a better way or do I have to go through the hassle and search for the options in the CMakeCache.txt?

Hocus answered 22/7, 2017 at 16:41 Comment(0)
T
1

As mentioned by @Maxim Banaev in the comments, there is a feature request on youtrack. Quoting from the discussion thread:

we hope to deliver this feature this year. Hopefully, in 2022.2 release

We've added the editor to CMake settings in EAP3 link and more updates for it are yet to come in EAP4 and EAP5.

And it has now been added. See the release announcement here: https://blog.jetbrains.com/clion/2022/06/clion-2022-2-eap3-cmakecache-editor-symbol-servers-for-debug-evaluation-of-constant-values-in-the-editor/#ui_for_setting_cmake_options.

Note: Even without those changes, you could use the interactive dialog applications that come bundled with CMake, ccmake (a curses-based terminal gui), and cmake-gui (a gui application). Both provide user-friendly interfaces to edit the CMake cache variables, including appropriate GUI inputs based on the cache variable's type (string, bool, path, filepath, etc.), and enable hide/show of variables that are marked as being for advanced usage scenarios. They also provide the option to group options by common prefixes of cache variable names and to visually expand and collapse those groups.

Tittup answered 28/9, 2022 at 6:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.