File tree Expand file tree Collapse file tree 5 files changed +18
-17
lines changed
Expand file tree Collapse file tree 5 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 11# The main libgit2 tests tree: this CMakeLists.txt includes the
22# subprojects that make up core libgit2 support.
33
4+ add_subdirectory (headertest)
45add_subdirectory (libgit2)
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ These are the unit and integration tests for the libgit2 projects.
44
55* ` clar `
66 This is [ clar] ( https://github.com/clar-test/clar ) the common test framework.
7+ * ` headertest `
8+ This is a simple project that ensures that our public headers are
9+ compatible with extremely strict compilation options.
710* ` libgit2 `
811 These tests exercise the core git functionality in libgit2 itself.
912* ` resources `
Original file line number Diff line number Diff line change 1+ # Header file validation project: ensure that we do not publish any sloppy
2+ # definitions in our headers and that a consumer can include <git2.dll>
3+ # even when they have aggressive C90 warnings enabled.
4+
5+ add_executable (headertest headertest.c)
6+ set_target_properties (headertest PROPERTIES C_STANDARD 90)
7+ set_target_properties (headertest PROPERTIES C_EXTENSIONS OFF )
8+ target_include_directories (headertest PRIVATE ${LIBGIT2_INCLUDES} )
9+
10+ if (MSVC )
11+ target_compile_options (headertest PUBLIC /W4 /WX)
12+ else ()
13+ target_compile_options (headertest PUBLIC -Wall -Wextra -pedantic -Werror)
14+ endif ()
File renamed without changes.
Original file line number Diff line number Diff line change @@ -80,20 +80,3 @@ add_clar_test(ssh -v -sonline::push -sonline::clone::ssh_cert -s
8080add_clar_test(proxy -v -sonline::clone::proxy)
8181add_clar_test(auth_clone -v -sonline::clone::cred)
8282add_clar_test(auth_clone_and_push -v -sonline::clone::push -sonline::push)
83-
84- #
85- # Header file validation project: ensure that we do not publish any sloppy
86- # definitions in our headers and that a consumer can include <git2.dll>
87- # even when they have aggressive C90 warnings enabled.
88- #
89-
90- add_executable (headertest headertest.c)
91- set_target_properties (headertest PROPERTIES C_STANDARD 90)
92- set_target_properties (headertest PROPERTIES C_EXTENSIONS OFF )
93- target_include_directories (headertest PRIVATE ${LIBGIT2_INCLUDES} )
94-
95- if (MSVC )
96- target_compile_options (headertest PUBLIC /W4 /WX)
97- else ()
98- target_compile_options (headertest PUBLIC -Wall -Wextra -pedantic -Werror)
99- endif ()
You can’t perform that action at this time.
0 commit comments