Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
5221e185
Commit
5221e185
authored
Oct 02, 2021
by
Peter Pettersson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add target for testing libgit2 headers
parent
23c5c315
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletions
+26
-1
tests/CMakeLists.txt
+13
-1
tests/headertest.c
+13
-0
No files found.
tests/CMakeLists.txt
View file @
5221e185
...
...
@@ -51,7 +51,7 @@ ide_split_sources(libgit2_tests)
# this on newer compilers to avoid unnecessary recompilation.
#
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
add_definitions(-include
\"
clar_suite.h
\
"
)
target_compile_options(libgit2_tests PRIVATE -include "
clar_suite.h
")
endif()
if(MSVC_IDE)
...
...
@@ -79,3 +79,15 @@ 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
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()
tests/headertest.c
0 → 100644
View file @
5221e185
/*
* Dummy project to validate header files
*
* This project is not intended to be executed, it should only include all
* header files to make sure that they can be used with stricter compiler
* settings than the libgit2 source files generally supports.
*/
#include "git2.h"
int
main
(
void
)
{
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment