-
Notifications
You must be signed in to change notification settings - Fork 449
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
Run program before configuring #2449
Comments
This seems somewhat related to this request here: #2448. I'm not sure if setting up a system of hooks for events in our extension is the right thing to do. The tasks system was designed by VS Code to do the things you are asking for. Hopefully when we complete #2452, creating configure/build/test tasks will be much more straightforward and you can chain up the tasks any way you like. You can run any of these tasks at any time using the VS Code "Run Task" action. |
It would be really nice if CMake tools could let me launch Visual Studio's Developer Command prompt before configuring CMake. |
Discussed in #2403
Originally posted by jasonbeach February 28, 2022
Is it possible to have the extension run an external program prior to configuring cmake? The immediate use case is pulling in conan dependencies. I currently have a build script that runs
conan install
before configuring cmake. I can create a build task that runs the script, but that doesn't work with the cmake widgets down at the bottom of the vscode window.I assume I could add an custom target to cmake to run conan, but that seems tedious to do for multiple repos and I've tried hard to keep my cmake agnostic to conan.
Feature request:
It would be nice to be able to run a task (either a shell executable or I guess build task) before cmake configures. See above discussion. It kind of works if you check the CMake:Build Task option and then set a default task and hit the "build" button, again as described in the discussion. The only thing that's a little clumsy is that if cmake hasn't run yet then this fails because the task (in my case
conan install
) really needs to be run before cmake configures not before the build....from a clean build folder, you can:I can add another task that runs cmake and make the default task depend on that, and that works, but....it's very....circumlocutious and since it's the build button you're clicking, seems wrong. It would be much better to just be able to configure a task to run to run before cmake configures.
I'm willing to help out if you can point me in the right direction. I'm a pretty strong C++ developer, but have never used typescript (I do have a little experience making changes to Javascript, but nothing I would brag about).
The text was updated successfully, but these errors were encountered: