mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
cmake: document CMakeLists.txt hierarchy
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# CMake build script for the libgit2 project
|
||||
# libgit2: the cross-platform, linkable library implementation of git.
|
||||
# See `README.md` for build instructions.
|
||||
#
|
||||
# This top-level CMakeLists.txt sets up configuration options and
|
||||
# determines which subprojects to build.
|
||||
|
||||
cmake_minimum_required(VERSION 3.5.1)
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# examples: code usage examples of libgit2
|
||||
|
||||
file(GLOB SRC_EXAMPLES *.c *.h)
|
||||
|
||||
add_executable(lg2 ${SRC_EXAMPLES})
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# fuzzers: libFuzzer and standalone fuzzing utilities
|
||||
|
||||
if(BUILD_FUZZERS AND NOT USE_STANDALONE_FUZZERS)
|
||||
set(CMAKE_REQUIRED_FLAGS "-fsanitize=fuzzer-no-link")
|
||||
add_c_flag(-fsanitize=fuzzer)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# libgit2: the shared library: this CMakeLists.txt compiles the core
|
||||
# git library functionality.
|
||||
|
||||
add_library(git2internal OBJECT)
|
||||
set_target_properties(git2internal PROPERTIES C_STANDARD 90)
|
||||
set_target_properties(git2internal PROPERTIES C_EXTENSIONS OFF)
|
||||
|
||||
@@ -54,6 +54,7 @@ list(SORT UTIL_SRC_HASH)
|
||||
#
|
||||
|
||||
target_sources(util PRIVATE ${UTIL_SRC} ${UTIL_SRC_OS} ${UTIL_SRC_HASH})
|
||||
ide_split_sources(util)
|
||||
|
||||
target_include_directories(util PRIVATE ${UTIL_INCLUDES} ${LIBGIT2_DEPENDENCY_INCLUDES} PUBLIC ${libgit2_SOURCE_DIR}/include)
|
||||
target_include_directories(util SYSTEM PRIVATE ${LIBGIT2_SYSTEM_INCLUDES})
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# tests: the unit and integration tests for libgit2
|
||||
|
||||
set(Python_ADDITIONAL_VERSIONS 3 2.7)
|
||||
find_package(PythonInterp)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user