From: Matthias Maier Date: Thu, 24 Nov 2022 12:02:21 +0000 (-0600) Subject: CMake: always export compile_commands.json in deal.II and user projects X-Git-Tag: v9.4.1~2^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d36fd4f87492e1075a2512f00bfb4201f3a96ce9;p=dealii.git CMake: always export compile_commands.json in deal.II and user projects --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 51d577c7fe..4319cbae34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,8 @@ MESSAGE(STATUS "") CMAKE_MINIMUM_REQUIRED(VERSION 3.3.0) +set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE) + # # We support all policy changes up to version 3.3. Thus, explicitly set all # policies CMP0001 - CMP0054 to new for version 3.3 (and later) to avoid diff --git a/cmake/macros/macro_deal_ii_invoke_autopilot.cmake b/cmake/macros/macro_deal_ii_invoke_autopilot.cmake index 62e5f853a9..068ba018b6 100644 --- a/cmake/macros/macro_deal_ii_invoke_autopilot.cmake +++ b/cmake/macros/macro_deal_ii_invoke_autopilot.cmake @@ -37,6 +37,8 @@ MACRO(DEAL_II_INVOKE_AUTOPILOT) + SET(CMAKE_EXPORT_COMPILE_COMMANDS TRUE) + # Generator specific values: IF(CMAKE_GENERATOR MATCHES "Ninja") SET(_make_command "$ ninja")