Skip to content

Commit

Permalink
[cmake] Always generate compile_commands.json
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ldrumm committed Mar 5, 2024
1 parent b183740 commit 9874f36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ set(UR_CONFORMANCE_TARGET_TRIPLES "" CACHE STRING
"List of sycl targets to build CTS device binaries for")
set(UR_CONFORMANCE_AMD_ARCH "" CACHE STRING "AMD device target ID to build CTS binaries for")

# There's little reason not to generate the compile_commands.json
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

include(Assertions)

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
Expand Down

0 comments on commit 9874f36

Please sign in to comment.