Home Explore Blog CI



neovim

1st chunk of `cmake.deps/cmake/TreesitterParserCMakeLists.txt`
7c51a0e14e4dff20dedca37650d2a0652404c965da47c586000000010000016a
cmake_minimum_required(VERSION 3.16)
project(parser C)

add_compile_options(-w)

file(GLOB source_files src/*.c)

add_library(parser
  MODULE
  ${source_files}
)
set_target_properties(
  parser
  PROPERTIES
    OUTPUT_NAME ${PARSERLANG}
    PREFIX ""
)

include_directories(src)

install(TARGETS parser LIBRARY DESTINATION lib/nvim/parser)

# vim: set ft=cmake:

Title: CMake Configuration for a Parser Library
Summary
This CMake file configures the build process for a parser library written in C. It sets the minimum CMake version, defines the project name, adds compiler options to suppress warnings, specifies source files, creates a shared library named 'parser' (with a language-specific name based on the PARSERLANG variable), sets library properties (output name, prefix), includes source directories, and defines an installation target to place the library in the 'lib/nvim/parser' directory.