mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
refactor: move headertest into separate test folder
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# The main libgit2 tests tree: this CMakeLists.txt includes the
|
||||
# subprojects that make up core libgit2 support.
|
||||
|
||||
add_subdirectory(headertest)
|
||||
add_subdirectory(libgit2)
|
||||
|
||||
@@ -4,6 +4,9 @@ These are the unit and integration tests for the libgit2 projects.
|
||||
|
||||
* `clar`
|
||||
This is [clar](https://github.com/clar-test/clar) the common test framework.
|
||||
* `headertest`
|
||||
This is a simple project that ensures that our public headers are
|
||||
compatible with extremely strict compilation options.
|
||||
* `libgit2`
|
||||
These tests exercise the core git functionality in libgit2 itself.
|
||||
* `resources`
|
||||
|
||||
14
tests/headertest/CMakeLists.txt
Normal file
14
tests/headertest/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
# Header file validation project: ensure that we do not publish any sloppy
|
||||
# definitions in our headers and that a consumer can include <git2.dll>
|
||||
# even when they have aggressive C90 warnings enabled.
|
||||
|
||||
add_executable(headertest headertest.c)
|
||||
set_target_properties(headertest PROPERTIES C_STANDARD 90)
|
||||
set_target_properties(headertest PROPERTIES C_EXTENSIONS OFF)
|
||||
target_include_directories(headertest PRIVATE ${LIBGIT2_INCLUDES})
|
||||
|
||||
if (MSVC)
|
||||
target_compile_options(headertest PUBLIC /W4 /WX)
|
||||
else()
|
||||
target_compile_options(headertest PUBLIC -Wall -Wextra -pedantic -Werror)
|
||||
endif()
|
||||
@@ -80,20 +80,3 @@ add_clar_test(ssh -v -sonline::push -sonline::clone::ssh_cert -s
|
||||
add_clar_test(proxy -v -sonline::clone::proxy)
|
||||
add_clar_test(auth_clone -v -sonline::clone::cred)
|
||||
add_clar_test(auth_clone_and_push -v -sonline::clone::push -sonline::push)
|
||||
|
||||
#
|
||||
# Header file validation project: ensure that we do not publish any sloppy
|
||||
# definitions in our headers and that a consumer can include <git2.dll>
|
||||
# even when they have aggressive C90 warnings enabled.
|
||||
#
|
||||
|
||||
add_executable(headertest headertest.c)
|
||||
set_target_properties(headertest PROPERTIES C_STANDARD 90)
|
||||
set_target_properties(headertest PROPERTIES C_EXTENSIONS OFF)
|
||||
target_include_directories(headertest PRIVATE ${LIBGIT2_INCLUDES})
|
||||
|
||||
if (MSVC)
|
||||
target_compile_options(headertest PUBLIC /W4 /WX)
|
||||
else()
|
||||
target_compile_options(headertest PUBLIC -Wall -Wextra -pedantic -Werror)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user