summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-16 17:10:08 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2021-11-16 17:10:08 -0500
commit86685f8f1d586b0201ab51d8e5923379967f4e74 (patch)
treee08ab8d6b3b0465e2276906b5caabd25aae64b79
parent7dcc29fc4652caeb09de39827cfd1a80726b5995 (diff)
downloadlibgit2-86685f8f1d586b0201ab51d8e5923379967f4e74.tar.gz
cmake: better explain why headertests exists
-rw-r--r--tests/CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index d42c6ad5b..b42359a63 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -80,14 +80,19 @@ 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
+#
+# 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)
+ target_compile_options(headertest PUBLIC /W4 /WX)
else()
- target_compile_options(headertest PUBLIC -Wall -Wextra -pedantic -Werror)
+ target_compile_options(headertest PUBLIC -Wall -Wextra -pedantic -Werror)
endif()