diff --git a/CMakeLists.txt b/CMakeLists.txt index c259861..797b71e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,4 +38,11 @@ target_link_libraries(${PROJECT_NAME} PUBLIC # should be private when all SDL fu if(CMAKE_BUILD_TYPE MATCHES "Debug") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address -fno-omit-frame-pointer") target_link_libraries(${PROJECT_NAME} PRIVATE "-fsanitize=address") -endif() \ No newline at end of file +endif() + +# link/copy compile commands to root dir +file(CREATE_LINK + ${PROJECT_BINARY_DIR}/compile_commands.json + ${PROJECT_SOURCE_DIR}/compile_commands.json + COPY_ON_ERROR SYMBOLIC +) \ No newline at end of file