CMake: Indicate a clear signature in add_test.

pull/953/merge
Vollstrecker 2 months ago committed by Mark Adler
parent cff14d5dc3
commit adb40de349
  1. 14
      CMakeLists.txt

@ -282,7 +282,7 @@ if(ZLIB_INSTALL_LIBRARIES)
endif(ZLIB_INSTALL_LIBRARIES)
#============================================================================
# Example binaries
# Tests
#============================================================================
if(ZLIB_BUILD_TESTING)
enable_testing()
@ -290,7 +290,8 @@ if(ZLIB_BUILD_TESTING)
if(ZLIB_BUILD_SHARED)
add_executable(zlib_example test/example.c)
target_link_libraries(zlib_example ZLIB::ZLIB)
add_test(zlib_example zlib_example)
add_test(NAME zlib_example
COMMAND zlib_example)
add_executable(minigzip test/minigzip.c)
target_compile_definitions(zlib
@ -305,7 +306,8 @@ if(ZLIB_BUILD_TESTING)
LARGEFILE64_SOURCE=1
$<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>)
target_link_libraries(zlib_example64 ZLIB::ZLIB)
add_test(zlib_example64 zlib_example64)
add_test(NAME zlib_example64
COMMAND zlib_example64)
endif(HAVE_OFF64_T)
endif(ZLIB_BUILD_SHARED)
@ -315,7 +317,8 @@ if(ZLIB_BUILD_TESTING)
target_compile_definitions(zlib_static_example
PRIVATE
$<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>)
add_test(zlib_static_example zlib_static_example)
add_test(NAME zlib_static_example
COMMAND zlib_static_example)
add_executable(static_minigzip test/minigzip.c)
target_link_libraries(static_minigzip ZLIB::ZLIBSTATIC)
@ -327,7 +330,8 @@ if(ZLIB_BUILD_TESTING)
LARGEFILE64_SOURCE=1
$<$<BOOL:${HAVE___ATTR__VIS_HIDDEN}>:HAVE_HIDDEN>)
target_link_libraries(zlib_static_example64 ZLIB::ZLIBSTATIC)
add_test(zlib_static_example64 zlib_static_example64)
add_test(NAME zlib_static_example64
COMMAND zlib_static_example64)
endif(HAVE_OFF64_T)
endif(ZLIB_BUILD_STATIC)

Loading…
Cancel
Save