cmake-tools.nvim icon indicating copy to clipboard operation
cmake-tools.nvim copied to clipboard

Run/Debug after install

Open qbojj opened this issue 1 year ago • 3 comments

Describe the problem or limitation you are having I am making a program that compiles assets with cmake (compiling assets), and I don't want to dirty my source dir, so I copy all assets to install dir for running. The problem is that cmake-tools.nvim does not allow (?) for running targets in installation dir.

Describe the solution you'd like A new (sub-)command/option in Run and Debug to first run install target and then, run the target from the installation dir.

Describe alternatives you've considered Manually install and then run/debug without help of cmake-tools.nvim.

qbojj avatar Sep 20 '24 23:09 qbojj

Are the assets part of your project? If so, you could use cmake to copy / symlink them into your build directory.

Otherwise you could manually copy the assets into your build directory.

lceWolf avatar Sep 22 '24 12:09 lceWolf

Are the assets part of your project? If so, you could use cmake to copy / symlink them into your build directory.

Otherwise you could manually copy the assets into your build directory.

I think it's not an ideal solution to use cmake for copying/symlinking, for example if you have a very large asset folder. In other IDEs like Visual Studio or XCode, you can set the working directory. Though to be honest i don't know how this works under the hood, and how that behavior can be emulated in neovim.

i am currently using the second workaround - manually copying the assets into the executable directory

dragonlobster avatar Jan 07 '25 07:01 dragonlobster

Maybe set working directory: https://github.com/Civitasv/cmake-tools.nvim/blob/master/docs/settings.md#working_directory

Civitasv avatar May 17 '25 15:05 Civitasv