Replies: 1 comment 7 replies
-
@neundorf I'd love to understand more about the "limit users" statement. You mention that it supports both the CMakePresets.json and the VS Code settings.json, how does this limit using the full flexibility of cmake? We do have the ability to load existing settings I believe, if you use the setting |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
VS Code uses CMakePresets.json (where you can configure e.g. the generators and the build directories), it also supports cmake settings in the settings.json (where you can also configure the generator and the build directory), and both of that limits users who would like to use the full flexibility of cmake, e.g. creating multiple slightly different build directories for one source tree (with different build types, different options, etc.).
I suggest to add the feature to "load" an existing cmake build directory. AFAICS it contains all information that VS Code needs via the file API. From the CMakeCache.txt, vs code could parse CMAKE_COMMAND, which gives the path to the cmake that has been used to create that build dir. Then vs code can write a file API query file, rerun cmake, and read everything it needs to know from the response files: the build- and source-directories in codemodel.json, the generator in index.json, the compiler in toolchains.json.
Then any user who knows how to use cmake can create the build directories as he is used to from cmake (build types, different compilers etc.), and simply load them, without having to edit additional text files, which may have to go into VCS.
Beta Was this translation helpful? Give feedback.
All reactions