diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:47:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:47:08 +0000 |
commit | 29b5ab554790bb57337a3b6ab9dcd963cf69d22e (patch) | |
tree | be1456d2bc6c1fb078695fad7bc8f6b212062d3c /tests/headertest/CMakeLists.txt | |
parent | Initial commit. (diff) | |
download | libgit2-upstream/1.7.2+ds.tar.xz libgit2-upstream/1.7.2+ds.zip |
Adding upstream version 1.7.2+ds.upstream/1.7.2+ds
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/headertest/CMakeLists.txt')
-rw-r--r-- | tests/headertest/CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/headertest/CMakeLists.txt b/tests/headertest/CMakeLists.txt new file mode 100644 index 0000000..c70ce1a --- /dev/null +++ b/tests/headertest/CMakeLists.txt @@ -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() |