]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4843: build: enable exporting compile commands
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Tue, 5 Aug 2025 03:43:18 +0000 (03:43 +0000)
committerSteve Chew (stechew) <stechew@cisco.com>
Tue, 5 Aug 2025 03:43:18 +0000 (03:43 +0000)
Merge in SNORT/snort3 from ~MSTEPANE/snort3:export_compile_commands to master

Squashed commit of the following:

commit 247085b9aad6834ab92cdc504ab64edd764deb3f
Author: mstepane <mstepane@cisco.com>
Date:   Thu Jul 31 09:00:48 2025 -0400

    build: enable exporting compile commands

.gitignore
CMakeLists.txt

index def2f38af487cd2e3de27917c20f761b409efb76..67c8fc52a1c37903a133095e57d2c23033a9f32b 100644 (file)
@@ -8,9 +8,11 @@
 *.trs
 *~
 ._Xcode*
+.cache/
 .vscode/
 Cbuild/
 Xcode*/
+compile_commands.json
 doc/basic.txt
 doc/builtin.txt
 doc/codec.txt
index 110797ddf40d271066374d826dd01e28a64e6dcc..6beb2c08f83c81fa0bdfe0321768c96d50a1f2ff 100644 (file)
@@ -19,6 +19,9 @@ set (CMAKE_C_STANDARD 99)
 set (CMAKE_C_STANDARD_REQUIRED ON)
 set (CMAKE_C_EXTENSIONS ON)
 
+# dump compile_commands.json to make it easier to use clangd with IDEs
+set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
 set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
 # Pull in definitions of various install directories
 include (GNUInstallDirs)