From 3fa6fd7b52260612860e79cd2796a4de5b32486a Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Fri, 16 Apr 2021 04:36:08 +0800 Subject: [PATCH] [cmake] export compile commands (#6451) This commit adds the option CMAKE_EXPORT_COMPILE_COMMANDS=ON to export compile commands which is helpful for editors/IDEs. --- script/cmake-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/cmake-build b/script/cmake-build index 91747a21d..2c4086cd1 100755 --- a/script/cmake-build +++ b/script/cmake-build @@ -181,7 +181,7 @@ build() mkdir -p "${builddir}" cd "${builddir}" - cmake -GNinja -DOT_COMPILE_WARNING_AS_ERROR=ON "$@" "${OT_SRCDIR}" + cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DOT_COMPILE_WARNING_AS_ERROR=ON "$@" "${OT_SRCDIR}" if [[ -n ${OT_CMAKE_NINJA_TARGET[*]} ]]; then ninja "${OT_CMAKE_NINJA_TARGET[@]}"