aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 46c07eb..0d2844d 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -16,6 +16,7 @@ endfunction()
16if(ZLIB_BUILD_SHARED) 16if(ZLIB_BUILD_SHARED)
17 add_executable(zlib_example example.c) 17 add_executable(zlib_example example.c)
18 target_link_libraries(zlib_example ZLIB::ZLIB) 18 target_link_libraries(zlib_example ZLIB::ZLIB)
19 target_compile_definitions(zlib_example PRIVATE ZLIB_BUILD)
19 add_test(NAME zlib_example COMMAND zlib_example) 20 add_test(NAME zlib_example COMMAND zlib_example)
20 21
21 add_executable(minigzip minigzip.c) 22 add_executable(minigzip minigzip.c)
@@ -38,7 +39,7 @@ if(ZLIB_BUILD_SHARED)
38 add_executable(zlib_example64 example.c) 39 add_executable(zlib_example64 example.c)
39 target_compile_definitions( 40 target_compile_definitions(
40 zlib_example64 41 zlib_example64
41 PRIVATE LARGEFILE64_SOURCE=1 42 PRIVATE ZLIB_BUILD
42 $<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>) 43 $<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>)
43 target_link_libraries(zlib_example64 ZLIB::ZLIB) 44 target_link_libraries(zlib_example64 ZLIB::ZLIB)
44 add_test(NAME zlib_example64 COMMAND zlib_example64) 45 add_test(NAME zlib_example64 COMMAND zlib_example64)
@@ -61,7 +62,8 @@ if(ZLIB_BUILD_STATIC)
61 target_link_libraries(zlib_static_example ZLIB::ZLIBSTATIC) 62 target_link_libraries(zlib_static_example ZLIB::ZLIBSTATIC)
62 target_compile_definitions( 63 target_compile_definitions(
63 zlib_static_example 64 zlib_static_example
64 PRIVATE $<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>) 65 PRIVATE ZLIB_BUILD
66 $<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>)
65 add_test(NAME zlib_static_example COMMAND zlib_static_example) 67 add_test(NAME zlib_static_example COMMAND zlib_static_example)
66 68
67 add_executable(static_minigzip minigzip.c) 69 add_executable(static_minigzip minigzip.c)
@@ -116,7 +118,7 @@ if(ZLIB_BUILD_STATIC)
116 add_executable(zlib_static_example64 example.c) 118 add_executable(zlib_static_example64 example.c)
117 target_compile_definitions( 119 target_compile_definitions(
118 zlib_static_example64 120 zlib_static_example64
119 PRIVATE LARGEFILE64_SOURCE=1 121 PRIVATE ZLIB_BUILD
120 $<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>) 122 $<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>)
121 target_link_libraries(zlib_static_example64 ZLIB::ZLIBSTATIC) 123 target_link_libraries(zlib_static_example64 ZLIB::ZLIBSTATIC)
122 add_test(NAME zlib_static_example64 COMMAND zlib_static_example64) 124 add_test(NAME zlib_static_example64 COMMAND zlib_static_example64)