summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAotrix <[email protected]>2025-02-26 03:12:44 +0100
committerAotrix <[email protected]>2025-02-26 03:12:44 +0100
commit7f149350c5eb90c3fc6cb020e3758a999a462070 (patch)
treec4763e9640396be42fb492700166a562f27ce282
parent0dffa596c8315f449a7a7871ad1473f4e7d910b8 (diff)
added rg command to retrieve executable names from cmake build dir
-rw-r--r--lua/aotrix/cmake_autorun.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/lua/aotrix/cmake_autorun.lua b/lua/aotrix/cmake_autorun.lua
index 9d5747e..833869c 100644
--- a/lua/aotrix/cmake_autorun.lua
+++ b/lua/aotrix/cmake_autorun.lua
@@ -1,3 +1,8 @@
-- use :!cmake --build PATH_TO_BUILD_FOLDER
-- && Telescope to choose executable in PATH_TO_BUILD_FOLDER/EXECUTABLE_FOLDER/*
--- Then launch executable in a normal terminal - not nvim one
+-- Find these lines (in cmake.build) : agougou is the "bin" folder, program is the exe name
+-- CMakeFiles/program.dir/build: agougou/program
+-- rg 'CMakeFiles\/(.*).dir\/build:(?!.*Lib*)' build/CMakeFiles/ --no-filename -Por '$1'
+vim.keymap.set("n", "mt",
+ "<CMD>terminal cmake --build build && ./build/bin/* <CR>",
+ {noremap = true, silent = true})