diff options
| author | Vollstrecker <werner@vollstreckernet.de> | 2024-12-01 17:48:11 +0100 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2025-01-31 19:59:10 -0800 |
| commit | b6cb6f4c213d9a8d58f996552d2652baa5ee550d (patch) | |
| tree | 5148f8b937403c1913224cca312df275fdda7601 | |
| parent | c18815b63074960573af9598c93fa968babb52ed (diff) | |
| download | zlib-b6cb6f4c213d9a8d58f996552d2652baa5ee550d.tar.gz zlib-b6cb6f4c213d9a8d58f996552d2652baa5ee550d.tar.bz2 zlib-b6cb6f4c213d9a8d58f996552d2652baa5ee550d.zip | |
CMake: Rename examples to testing to reflect their intent.
| -rw-r--r-- | CMakeLists.txt | 7 |
1 files 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 | |||
| 4 | LANGUAGES C | 4 | LANGUAGES C |
| 5 | VERSION 1.3.1.1) | 5 | VERSION 1.3.1.1) |
| 6 | 6 | ||
| 7 | option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" ON) | 7 | option(ZLIB_BUILD_TESTING "Enable Zlib Examples as tests" ON) |
| 8 | option(ZLIB_BUILD_SHARED "Enable building zlib shared library" ON) | 8 | option(ZLIB_BUILD_SHARED "Enable building zlib shared library" ON) |
| 9 | option(ZLIB_BUILD_STATIC "Enable building zlib static library" ON) | 9 | option(ZLIB_BUILD_STATIC "Enable building zlib static library" ON) |
| 10 | option(ZLIB_INSTALL_LIBRARIES "Enable installation of zlib" ON) | 10 | option(ZLIB_INSTALL_LIBRARIES "Enable installation of zlib" ON) |
| @@ -193,7 +193,8 @@ endif(ZLIB_INSTALL_LIBRARIES) | |||
| 193 | #============================================================================ | 193 | #============================================================================ |
| 194 | # Example binaries | 194 | # Example binaries |
| 195 | #============================================================================ | 195 | #============================================================================ |
| 196 | if(ZLIB_BUILD_EXAMPLES) | 196 | if(ZLIB_BUILD_TESTING) |
| 197 | enable_testing() | ||
| 197 | add_executable(zlib_example test/example.c) | 198 | add_executable(zlib_example test/example.c) |
| 198 | target_link_libraries(zlib_example zlib) | 199 | target_link_libraries(zlib_example zlib) |
| 199 | add_test(zlib_example zlib_example) | 200 | add_test(zlib_example zlib_example) |
| @@ -211,4 +212,4 @@ if(ZLIB_BUILD_EXAMPLES) | |||
| 211 | target_compile_definitions(minigzip64 PRIVATE LARGEFILE64_SOURCE=1) | 212 | target_compile_definitions(minigzip64 PRIVATE LARGEFILE64_SOURCE=1) |
| 212 | target_link_libraries(minigzip64 zlib) | 213 | target_link_libraries(minigzip64 zlib) |
| 213 | endif(HAVE_OFF64_T) | 214 | endif(HAVE_OFF64_T) |
| 214 | endif(ZLIB_BUILD_EXAMPLES) | 215 | endif(ZLIB_BUILD_TESTING) |
