-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake-presets support #205
Comments
Which version of cmake are you running? Anyway: Adding an option like |
Another problem: the plugin does not add include directories if there are no source files inside the project (Even if link directories are created). |
It loooks like VSCode is parsing the preset file to gather settings from the presets and call CMake directly with those settings. Maybe it's the sanest way of using presets. Some Ideas:
IMHO supporting presets may lead to a refactoring of the whole plugin, as everything can change depending on choosen preset, which also changes how GUI dialogs expose settings (readonly?). |
I created a CMakePresets.json file containing project configurations.
I can see the list of available configurations by adding --list-presets to Other CMake arguments
I can run a configuration by adding --preset MY_CONFIG_NAME
But I can't run --build --presets and --workflow --presets.
Cmake4Eclipse adds first: -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_RULE_MESSAGES:BOOL=OFF -G "Unix Makefiles".
Cmake throws an error. Cmake expects --workflow --presets to be the first argument.
The first step would be to add the ability to run cmake with its own parameters, without adding additional arguments. I think it's not difficult to implement.
The second step would be to load configurations from CMakePresets.json. This is more complicated. I'm not sure it's possible.
But the first step would be enough. Configurations with --preset can be created manually.
CMakePresets.json is very useful when the project is distributed, and a user who does not use Eclipse can build it from the command line, or in another IDE supporting Cmake (VS, QTCreator...)
The text was updated successfully, but these errors were encountered: