cdelledonne / vim-cmake

Vim/Neovim plugin for working with CMake projects
MIT License
259 stars 21 forks source link

Support Pre-build/configure actions #69

Closed styx3r closed 1 year ago

styx3r commented 2 years ago

Request description

It would be nice to run a command BEFORE any cmake command. E.g. execute a bash script before the cmake configure/build run.

Desired behavior

Specified command will run before any cmake command.

Additional context

I have the need to create junctions on windows before building. Currently I'm doing it within QT Creator where I can define build steps. Would be nice to have the same functionallity within this plugin.

Proposed Solution

Adding autocmd in the beginning of the Generate and Build functions. This way I could hook into them and call my scripts

cdelledonne commented 1 year ago

Hi, thank you for opening this feature request.

I don't think I fully understand your use case. What are junctions? And would you want this command to be run in the background or in the Vim-CMake console?

Anyway, I think adding autocommands would be nice in any case, I'll do it as soon as I have some spare time.

cdelledonne commented 1 year ago

And of course feel free to submit a PR yourself :)

cdelledonne commented 1 year ago

@styx3r I added support for pre-configure and pre-build actions in #71. Feel free to reopen if anything is missing.

styx3r commented 1 year ago

@cdelledonne Thank your very much! You can read up on junctions here . TL;DR I need junctions at work because the used buildsystem relies on folders within hardcoded paths and I don't want to have my repositories located at this point.

cdelledonne commented 1 year ago

Ah I see, thanks for the pointer :)