From 3c1dc3ca1694093d7d53453df5f74bb4ff5cff10 Mon Sep 17 00:00:00 2001 From: Guido Draheim Date: Sun, 19 Apr 2020 11:53:20 +0200 Subject: [PATCH] allow for cmake -DZZIP_TESTCVE=OFF to skip downloads #24 --- test/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4c80dc8..211778c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -13,6 +13,7 @@ option(BUILD_SHARED_LIBS "Build a shared library" ON) option(BUILD_STATIC_LIBS "Build the static library" OFF) option(BUILD_TESTS "Build test programs" OFF) option(MSVC_STATIC_RUNTIME "Build with static runtime libs (/MT)" ON) +option(ZZIP_TESTCVE "Run old CVE in zziptests.py testsuite" ON) # Zlib library needed find_package ( ZLIB REQUIRED ) @@ -29,12 +30,14 @@ set(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) set(topdir ${CMAKE_SOURCE_DIR}) # downloads ######################################################## +if(ZZIP_TESTCVE) include(ExternalProject) ExternalProject_Add(zziptestdownloads DOWNLOAD_COMMAND ${PY} ${srcdir}/zziptests.py --downloadonly -vv CONFIGURE_COMMAND "" BUILD_COMMAND ${CMAKE_COMMAND} -E create_symlink "${outdir}/zziptestdownloads-prefix/src/tmp.download" "${outdir}/tmp.download" INSTALL_COMMAND "") +endif(ZZIP_TESTCVE) # targets ######################################################## add_executable(zzipself zzipself.c) -- 2.40.0