Skip to content

Commit 9874f36

Browse files
committed
[cmake] Always generate compile_commands.json
I can't think of a valid reason not to generate compile_commands.json and several reasons why we should 1. I don't like typing configure options that much. 2. I like editor completion to work without me having to regenerate my build. 3. It's a good way to inspect final build flags without having to query the build system.
1 parent b183740 commit 9874f36

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ set(UR_CONFORMANCE_TARGET_TRIPLES "" CACHE STRING
5353
"List of sycl targets to build CTS device binaries for")
5454
set(UR_CONFORMANCE_AMD_ARCH "" CACHE STRING "AMD device target ID to build CTS binaries for")
5555

56+
# There's little reason not to generate the compile_commands.json
57+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
58+
5659
include(Assertions)
5760

5861
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

0 commit comments

Comments
 (0)