Skip to content

Commit

Permalink
copy ompile_commands.json to soruce dir
Browse files Browse the repository at this point in the history
  • Loading branch information
shenxianpeng committed Aug 16, 2024
1 parent c376c64 commit 9f5fee0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ project(main C CXX)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

add_executable(main_app
${CMAKE_BINARY_SOURCE_DIR}main.c
add_executable(main
${CMAKE_CURRENT_SOURCE_DIR}/main.c
)
target_include_directories(main_app PUBLIC ${CMAKE_BINARY_SOURCE_DIR})
target_include_directories(main PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

file(COPY ${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}")

0 comments on commit 9f5fee0

Please sign in to comment.