Skip to content

Commit

Permalink
Always export compile_commands.json
Browse files Browse the repository at this point in the history
My current workflow with the Helix editor uses it, and I never want to
*not* have that generated anymore.
  • Loading branch information
vkoskiv committed Nov 4, 2023
1 parent 8c40781 commit f249297
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ project (c-ray C)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin/)

if (DEFINED ENV{CRAY_EXPORT_CMDS})
message(STATUS "Exporting compile commands")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

message(STATUS "The C compiler is: ${CMAKE_C_COMPILER}")

Expand Down
2 changes: 1 addition & 1 deletion rebuild/debug
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
CRAY_EXPORT_CMDS=1 cmake . -DCMAKE_BUILD_TYPE=Debug && make -j"$(nproc)"
cmake . -DCMAKE_BUILD_TYPE=Debug && make -j"$(nproc)"
2 changes: 1 addition & 1 deletion rebuild/release
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
CRAY_EXPORT_CMDS=1 cmake . -DCMAKE_BUILD_TYPE=Release && make -j"$(nproc)"
cmake . -DCMAKE_BUILD_TYPE=Release && make -j"$(nproc)"

0 comments on commit f249297

Please sign in to comment.