Add setting "preConfigureTask"#4960
Open
erdemiru wants to merge 2 commits into
Open
Conversation
Author
|
@microsoft-github-policy-service agree company="QualCode" |
jonahgraham
approved these changes
Jun 5, 2026
jonahgraham
left a comment
There was a problem hiding this comment.
FWIW I approve of this as I think it resolves #2449 too.
IIUC It leaves one small side-effect. If people have done the workaround suggested in #2449 (comment) then if those users apply this change and leave pre run task on, and run the configure as a task, the pre configure task will run twice. If my understanding is correct, then the release notes may want to point this out.
| "cmake-tools.configuration.cmake.emscriptenSearchDirs.description": "Directories where Emscripten may be installed.", | ||
| "cmake-tools.configuration.cmake.mergedCompileCommands.description": "Recursively collect and merge all compile_commands.json found in the cmake.buildDirectory.", | ||
| "cmake-tools.configuration.cmake.copyCompileCommands.description": "Copy compile_commands.json to this location after a successful configure.", | ||
| "cmake-tools.configuration.cmake.preConfigureTask.description": "If set, this named task will be executed before a successful CMake configure.", |
There was a problem hiding this comment.
I don't think the preConfigureTask is conditional on the configure being successful.
Suggested change
| "cmake-tools.configuration.cmake.preConfigureTask.description": "If set, this named task will be executed before a successful CMake configure.", | |
| "cmake-tools.configuration.cmake.preConfigureTask.description": "If set, this named task will be executed before CMake configure.", |
Author
There was a problem hiding this comment.
Thanks @jonahgraham, I've updated the wording with your suggestions.
jonahgraham
approved these changes
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes introduce a new feature
The following changes are proposed:
The purpose of this change
The purpose of this change is to enable users to set up tasks before CMake configuration, allowing for greater automation. This is particularly useful when external tools are required to generate source code and CMake files before the cmake configure stage.
Other Notes/Information
While pre-build and post-configure tasks are already supported, they are insufficient when additional tools are needed to generate CMake files. In my use case, toolchain flags, such as included paths, libraries and also list of generated source files are all based on input JSON or XML configuration files. Using execute_process() or custom commands have many other drawbacks in such cases: