mirror of
https://github.com/neovim/neovim.git
synced 2025-10-13 13:26:06 +00:00

Problem: When building with gcc 4.9.2, tree-sitter throws warning: "for loop initial declarations are only allowed in C99 or C11 mode" Solution: set CMAKE_C_STANDARD option to 99
17 lines
423 B
CMake
17 lines
423 B
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(tree-sitter C)
|
|
set(CMAKE_C_STANDARD 99)
|
|
add_library(tree-sitter lib/src/lib.c)
|
|
target_include_directories(tree-sitter
|
|
PRIVATE lib/src lib/include)
|
|
|
|
install(FILES
|
|
lib/include/tree_sitter/api.h
|
|
lib/include/tree_sitter/parser.h
|
|
DESTINATION include/tree_sitter)
|
|
|
|
include(GNUInstallDirs)
|
|
install(TARGETS tree-sitter DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
# vim: set ft=cmake:
|