mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
fixup: raise TS min version
This commit is contained in:
@ -7,23 +7,3 @@ mark_as_advanced(TREESITTER_LIBRARY TREESITTER_INCLUDE_DIR)
|
||||
add_library(treesitter INTERFACE)
|
||||
target_include_directories(treesitter SYSTEM BEFORE INTERFACE ${TREESITTER_INCLUDE_DIR})
|
||||
target_link_libraries(treesitter INTERFACE ${TREESITTER_LIBRARY})
|
||||
|
||||
# TODO(lewis6991): remove when min TS version is 0.20.9
|
||||
list(APPEND CMAKE_REQUIRED_INCLUDES "${TREESITTER_INCLUDE_DIR}")
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "${TREESITTER_LIBRARY}")
|
||||
check_c_source_compiles("
|
||||
#include <tree_sitter/api.h>
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
TSQueryCursor *cursor = ts_query_cursor_new();
|
||||
ts_query_cursor_set_max_start_depth(cursor, 32);
|
||||
return 0;
|
||||
}
|
||||
" TS_HAS_SET_MAX_START_DEPTH)
|
||||
list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES "${TREESITTER_INCLUDE_DIR}")
|
||||
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "${TREESITTER_LIBRARY}")
|
||||
|
||||
if(TS_HAS_SET_MAX_START_DEPTH)
|
||||
target_compile_definitions(treesitter INTERFACE NVIM_TS_HAS_SET_MAX_START_DEPTH)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user