From ad72158ee0a8aac7c4b35b91626361b1c066bba4 Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Wed, 11 Nov 2020 15:59:06 -0700 Subject: [PATCH] CMake: compile_commands.json output Problem: - CMake is not outputting `compile_commands.json`. - `compile_commands.json` is used by build integration tooling such as `clang-tidy`. Solution: - Enable `CMAKE_EXPORT_COMPILE_COMMANDS` option so that the file is output. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab6a2e445e0..6aab69fbb31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,8 @@ set(CMAKE_INSTALL_MESSAGE NEVER) enable_testing() +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + add_custom_target(run COMMAND ${CMAKE_SOURCE_DIR}/Meta/run.sh USES_TERMINAL