Skip to content

Commit 4b5f5af

Browse files
committed
feat: add compile_commands.json output to make debug build
1 parent 2e76376 commit 4b5f5af

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ if(NO_XWAYLAND)
180180
add_compile_definitions(NO_XWAYLAND)
181181
else()
182182
message(STATUS "XWAYLAND Enabled (NO_XWAYLAND not defined) checking deps...")
183-
pkg_check_modules(xdeps REQUIRED IMPORTED_TARGET xcb xwayland xcb-util xcb-render xcb-xfixes xcb-icccm xcb-composite xcb-res xcb-ewmh)
183+
pkg_check_modules(xdeps REQUIRED IMPORTED_TARGET xcb xcb-render xcb-xfixes xcb-icccm xcb-composite xcb-res xcb-ewmh)
184184
pkg_check_modules(xcb_errors IMPORTED_TARGET xcb-errors)
185185
target_link_libraries(Hyprland PkgConfig::xdeps)
186186
if(xcb_errors_FOUND)

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ release:
1616
chmod -R 777 ./build
1717

1818
debug:
19-
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} -S . -B ./build -G Ninja
19+
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -S . -B ./build -G Ninja
2020
cmake --build ./build --config Debug --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
2121
chmod -R 777 ./build
22+
ln -s build/compile_commands.json compile_commands.json || true
2223

2324
nopch:
2425
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON -S . -B ./build -G Ninja

src/includes.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
#pragma once
22

3-
// because C/C++ VS Code intellisense is stupid with includes, we will suppress them here.
4-
// This suppresses all "include file not found" errors.
5-
#ifdef __INTELLISENSE__
6-
#pragma diag_suppress 1696
7-
#endif
8-
93
#include <getopt.h>
104
#include <libinput.h>
115
#include <linux/input-event-codes.h>

0 commit comments

Comments
 (0)