From 91ddc7603d2fa2b59299375adc8a245558a9e811 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 29 May 2020 22:31:07 +0100 Subject: [PATCH] feat(3p/nix): Configure CMake to generate compile commands --- third_party/nix/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third_party/nix/CMakeLists.txt b/third_party/nix/CMakeLists.txt index 88a23cd88..012a63bcb 100644 --- a/third_party/nix/CMakeLists.txt +++ b/third_party/nix/CMakeLists.txt @@ -3,6 +3,10 @@ cmake_minimum_required(VERSION 3.16) project(nix CXX) set(CMAKE_CXX_STANDARD 17) +# Export compile_commands.json which can be used by tools such as +# clangd and clang-tidy. +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + # The following lines import CMake-native dependencies which may # contain useful definitions. Other dependencies are not treated # specially by CMake and are only linked into the resulting binary.