aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2022-04-19 10:18:15 +0100
committerGitHub <noreply@github.com>2022-04-19 10:18:15 +0100
commitcdf824cf0229f0cad6679967293eb03aa48919fd (patch)
tree216ef266d4ec0853f2e95a9cd91f792ba6140e71
parentc08f20634159d977df8f551d07617a8c6b2fea64 (diff)
downloadlibvfio-user-cdf824cf0229f0cad6679967293eb03aa48919fd.zip
libvfio-user-cdf824cf0229f0cad6679967293eb03aa48919fd.tar.gz
libvfio-user-cdf824cf0229f0cad6679967293eb03aa48919fd.tar.bz2
add compile_commands.json generation (#661)
For use by LSP, generate a compile_commands.json file. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 742ecf2..4975c1b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,9 @@ include(GNUInstallDirs)
find_package(PkgConfig REQUIRED)
pkg_check_modules(JSON REQUIRED json-c)
+# for LSP
+set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
+
# for the benefit of the gcov rules
set(CMAKE_C_OUTPUT_EXTENSION_REPLACE 1)