Move compile_commands.json to build directory

This commit is contained in:
Kovid Goyal 2023-01-26 13:43:12 +05:30
parent 084671b26e
commit b408abe304
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 4 additions and 5 deletions

3
.gitignore vendored
View File

@ -9,8 +9,6 @@
/build/
/linux-package/
/kitty.app/
/compile_commands.json
/link_commands.json
/glad/out/
/kitty/launcher/kitt*
/tools/cmd/at/*_generated.go
@ -22,5 +20,6 @@ __pycache__/
/docs/generated/
/.mypy_cache
.DS_Store
.cache
bypy/b
bypy/virtual-machines.conf

View File

@ -40,7 +40,7 @@
#include <xlocale.h>
static PyObject*
user_cache_dir() {
user_cache_dir(void) {
static char buf[1024];
if (!confstr(_CS_DARWIN_USER_CACHE_DIR, buf, sizeof(buf) - 1)) return PyErr_SetFromErrno(PyExc_OSError);
return PyUnicode_FromString(buf);

View File

@ -60,7 +60,7 @@ cache_size(const GraphicsManager *self) { return disk_cache_total_size(self->dis
GraphicsManager*
grman_alloc() {
grman_alloc(void) {
GraphicsManager *self = (GraphicsManager *)GraphicsManager_Type.tp_alloc(&GraphicsManager_Type, 0);
self->images_capacity = self->capacity = 64;
self->images = calloc(self->images_capacity, sizeof(Image));

View File

@ -667,7 +667,7 @@ def cmd_changed(self, compile_cmd: Command) -> bool:
def __enter__(self) -> 'CompilationDatabase':
self.all_keys: Set[CompileKey] = set()
self.dbpath = os.path.abspath('compile_commands.json')
self.dbpath = os.path.abspath(os.path.join('build', 'compile_commands.json'))
self.linkdbpath = os.path.join(os.path.dirname(self.dbpath), 'link_commands.json')
try:
with open(self.dbpath) as f: