mirror of
https://github.com/neovim/neovim.git
synced 2025-10-12 21:06:13 +00:00
build: only generate compilation database for the nvim target (#20449)
Some tools like clang-tidy get confused and repeat unnecessary work if there are multiple entries with the same name. This will only generate a compilation database for cmake version 3.20 and above. Generating a compilation database is only necessary for development, so we don't need to maintain compatibility with the minimum required version. Closes https://github.com/neovim/neovim/issues/10632
This commit is contained in:
@@ -446,6 +446,11 @@ set(NVIM_EXEC_LINK_LIBRARIES ${NVIM_LINK_LIBRARIES} ${LUA_PREFERRED_LIBRARIES})
|
||||
add_executable(nvim ${NVIM_GENERATED_FOR_SOURCES} ${NVIM_GENERATED_FOR_HEADERS}
|
||||
${NVIM_GENERATED_SOURCES} ${NVIM_SOURCES} ${NVIM_HEADERS}
|
||||
${EXTERNAL_SOURCES} ${EXTERNAL_HEADERS})
|
||||
|
||||
set_target_properties(nvim
|
||||
PROPERTIES
|
||||
EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
target_link_libraries(nvim ${NVIM_EXEC_LINK_LIBRARIES})
|
||||
install_helper(TARGETS nvim)
|
||||
if(MSVC)
|
||||
|
Reference in New Issue
Block a user