Added option to override config with local file.#301
Added option to override config with local file.#301sebu06 wants to merge 1 commit intoCivitasv:masterfrom
Conversation
| local osys = require("cmake-tools.osys") | ||
| local utils = require("cmake-tools.utils") | ||
|
|
||
| local function findFileInDirOrParent(dir, fname) |
There was a problem hiding this comment.
Change it to find_file_in_dir_or_parent.
There was a problem hiding this comment.
And I think it's better to just search .cmake-tools.lua from current working directory. Current approach may lead to recursion bug. Sometimes we better restrict our power.
There was a problem hiding this comment.
Change it to
find_file_in_dir_or_parent.
done
And I think it's better to just search
.cmake-tools.luafrom current working directory. Current approach may lead to recursion bug. Sometimes we better restrict our power.
I find it rather useful, since it allows me to set good presets for all my repos in the parent folder and fine tune them in the individual ones if needed...
There was a problem hiding this comment.
I too think this search should be limited (similar how CMakeLists.txt is found)
|
Currently, it seems will still create cache file even .cmake-tools.lua file exists, which I don't think quite good. |
8a226bb to
b431667
Compare
You are right, this should be fixed now |
|
@sebu06 sorry for the late reply. Mind resolving the merge conflicts? |
Since I often use cmake-tools on different machines, I would like to have an option to store my settings in the repo rather than in the session store, that is only locally available. This commit adds the option to add a file ".cmake-tools.lua" to the repo and override the cmake-tools settings in it.