diff options
author | John Levon <john.levon@nutanix.com> | 2022-04-19 10:18:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-19 10:18:15 +0100 |
commit | cdf824cf0229f0cad6679967293eb03aa48919fd (patch) | |
tree | 216ef266d4ec0853f2e95a9cd91f792ba6140e71 | |
parent | c08f20634159d977df8f551d07617a8c6b2fea64 (diff) | |
download | libvfio-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.txt | 3 |
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) |