Export CMake compile commands for clangd

cpp
Elnu 2 years ago
parent 38c0eaf462
commit d03b0b804e

1
.gitignore vendored

@ -0,0 +1 @@
.cache

@ -12,3 +12,7 @@ target_include_directories(${ProjectName} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc
find_package(SFML 2.5 COMPONENTS system window graphics network audio REQUIRED)
target_link_libraries(${ProjectName} sfml-graphics)
# Generates compile_commands.json in build folder, which clangd will pick up
# Without this, clangd might assume the wrong C++ version
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Loading…
Cancel
Save