From 677f16cfabfbd39559e23efd4e166cf844e57621 Mon Sep 17 00:00:00 2001 From: Suyash Dongre Date: Sun, 21 Jul 2024 18:14:02 +0530 Subject: [PATCH] CMAKE compile_commands flag addition The DCMAKE_EXPORT_COMPILE_COMMANDS flag generates the `compile_commands.json` file which contains the exact compiler calls for all translation units of the project in machine-readable form. This file is used by many code analysis tools, IDE(s), refactoring tools, etc. There is no harm in having the `compile_commands.json` file. We want to integrate clang-tidy into the Ceph CI for which the `compile_commands.json` file is necessary. Signed-off-by: Suyash Dongre --- scripts/build_utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 2a845709d..d3d13a559 100755 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -960,7 +960,7 @@ build_debs() { echo building debs for $DIST - CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS $(extra_cmake_args)" + CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS $(extra_cmake_args)" + " -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON" DEB_BUILD_OPTIONS="parallel=$(get_nr_build_jobs)" # pass only those env vars specifically noted