Skip to content

Commit 5fcfada

Browse files
committed
cmake: document CMakeLists.txt hierarchy
1 parent c3b7ace commit 5fcfada

File tree

6 files changed

+14
-1
lines changed

6 files changed

+14
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# CMake build script for the libgit2 project
1+
# libgit2: the cross-platform, linkable library implementation of git.
22
# See `README.md` for build instructions.
3+
#
4+
# This top-level CMakeLists.txt sets up configuration options and
5+
# determines which subprojects to build.
36

47
cmake_minimum_required(VERSION 3.5.1)
58

examples/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# examples: code usage examples of libgit2
2+
13
file(GLOB SRC_EXAMPLES *.c *.h)
24

35
add_executable(lg2 ${SRC_EXAMPLES})

fuzzers/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# fuzzers: libFuzzer and standalone fuzzing utilities
2+
13
if(BUILD_FUZZERS AND NOT USE_STANDALONE_FUZZERS)
24
set(CMAKE_REQUIRED_FLAGS "-fsanitize=fuzzer-no-link")
35
add_c_flag(-fsanitize=fuzzer)

src/libgit2/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# libgit2: the shared library: this CMakeLists.txt compiles the core
2+
# git library functionality.
3+
14
add_library(git2internal OBJECT)
25
set_target_properties(git2internal PROPERTIES C_STANDARD 90)
36
set_target_properties(git2internal PROPERTIES C_EXTENSIONS OFF)

src/util/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ list(SORT UTIL_SRC_HASH)
5454
#
5555

5656
target_sources(util PRIVATE ${UTIL_SRC} ${UTIL_SRC_OS} ${UTIL_SRC_HASH})
57+
ide_split_sources(util)
5758

5859
target_include_directories(util PRIVATE ${UTIL_INCLUDES} ${LIBGIT2_DEPENDENCY_INCLUDES} PUBLIC ${libgit2_SOURCE_DIR}/include)
5960
target_include_directories(util SYSTEM PRIVATE ${LIBGIT2_SYSTEM_INCLUDES})

tests/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# tests: the unit and integration tests for libgit2
2+
13
set(Python_ADDITIONAL_VERSIONS 3 2.7)
24
find_package(PythonInterp)
35

0 commit comments

Comments
 (0)