Skip to content

Commit bda5141

Browse files
authored
cmake/compiler.cmake: provide compile_commands.json for use by tools (#4014)
`compile_commands.json` allows LSPs and other tools to better interact with the code. Signed-off-by: David Aguilar <davvid@gmail.com>
1 parent 94fc8f8 commit bda5141

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/cmake/compiler.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,10 @@ else ()
622622
endif ()
623623

624624

625+
###########################################################################
626+
# Generate compile_commands.json for use by editors and tools.
627+
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
628+
625629

626630
###########################################################################
627631
# Macro to install targets to the appropriate locations. Use this instead

0 commit comments

Comments
 (0)