Closed TSUHA0 closed 1 year ago
Hi, thanks for asking this.
Autocommands should be used to run synchronous command, i.e. command that block the execution until they complete. :CMakeGenerate
is an asynchronous command, it starts a job in the background and it does not block execution.
At the moment, if there's a (asynchronous) :CMake
command running, attempting to run another :CMake
command will throw the error you're seeing. I could implement something to fix this, e.g. pipeline commands and run them when nothing else is running, but I'd have to think whether this is a good idea.
Anyway, is there a good reason why you want to run :CMakeGenerate
before :CMakeBuild
? In general it should not be necessary, see for instance When should I rerun cmake? - Stack Overflow
I am a beginner of cmake, the information you provided is very useful. As you said it is not necessary. Thanks for your reply.
You're very welcome!
Hi, i want to know how to auto run CMakeGenerate before CMakeBuild, I try to set:
but it failed.