From b6cb6f4c213d9a8d58f996552d2652baa5ee550d Mon Sep 17 00:00:00 2001 From: Vollstrecker Date: Sun, 1 Dec 2024 17:48:11 +0100 Subject: CMake: Rename examples to testing to reflect their intent. --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 54b3f24..3cd986b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(zlib LANGUAGES C VERSION 1.3.1.1) -option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" ON) +option(ZLIB_BUILD_TESTING "Enable Zlib Examples as tests" ON) option(ZLIB_BUILD_SHARED "Enable building zlib shared library" ON) option(ZLIB_BUILD_STATIC "Enable building zlib static library" ON) option(ZLIB_INSTALL_LIBRARIES "Enable installation of zlib" ON) @@ -193,7 +193,8 @@ endif(ZLIB_INSTALL_LIBRARIES) #============================================================================ # Example binaries #============================================================================ -if(ZLIB_BUILD_EXAMPLES) +if(ZLIB_BUILD_TESTING) + enable_testing() add_executable(zlib_example test/example.c) target_link_libraries(zlib_example zlib) add_test(zlib_example zlib_example) @@ -211,4 +212,4 @@ if(ZLIB_BUILD_EXAMPLES) target_compile_definitions(minigzip64 PRIVATE LARGEFILE64_SOURCE=1) target_link_libraries(minigzip64 zlib) endif(HAVE_OFF64_T) -endif(ZLIB_BUILD_EXAMPLES) +endif(ZLIB_BUILD_TESTING) -- cgit v1.2.3-55-g6feb