From 210299b309c1e430f2bc32cc56a50627354fad3b Mon Sep 17 00:00:00 2001 From: barak diker Date: Sun, 30 Apr 2023 03:12:54 +0300 Subject: [PATCH] Added compile_commands.json For using clangd we need the compile database of compile_commands.json --- CMakeLists.txt | 2 ++ test/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c2d81e0..2ee3e39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,8 @@ project( LANGUAGES CXX ) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + # ---- Include guards ---- if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 74cd08d..702a8c2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.14...3.22) project(GreeterTests LANGUAGES CXX) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + # ---- Options ---- option(ENABLE_TEST_COVERAGE "Enable test coverage" OFF)