Skip to content

Commit 9f5fee0

Browse files
committed
copy ompile_commands.json to soruce dir
1 parent c376c64 commit 9f5fee0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: testing/CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ project(main C CXX)
55

66
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
77

8-
add_executable(main_app
9-
${CMAKE_BINARY_SOURCE_DIR}main.c
8+
add_executable(main
9+
${CMAKE_CURRENT_SOURCE_DIR}/main.c
1010
)
11-
target_include_directories(main_app PUBLIC ${CMAKE_BINARY_SOURCE_DIR})
11+
target_include_directories(main PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
12+
13+
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}")

0 commit comments

Comments
 (0)