From ab9cb1a1d4928cdcf2877d8e0c6ad9fc2c79fbc9 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 2 May 2023 15:41:53 +0200 Subject: [PATCH] Fix building without fuzzers/ and perftests/ directory --- CMakeLists.txt | 13 ++++++++----- mkgdaldist.sh | 3 ++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4095e75d3de5..7fe1a41b8117 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -252,11 +252,14 @@ if (BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/autotest") add_subdirectory(autotest) endif() endif () -# Google OSS-Fuzz project utilities -add_subdirectory(fuzzers) -if (BUILD_TESTING) +if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/fuzzers") + # Google OSS-Fuzz project utilities + add_subdirectory(fuzzers) + if (BUILD_TESTING) + add_subdirectory(fuzzers/tests) + endif() +endif() +if (BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/perftests") add_subdirectory(perftests) - # Google OSS-Fuzz tests - add_subdirectory(fuzzers/tests) endif () # vim: ts=4 sw=4 sts=4 et diff --git a/mkgdaldist.sh b/mkgdaldist.sh index 28c5ad310565..7fb2a13b93a3 100755 --- a/mkgdaldist.sh +++ b/mkgdaldist.sh @@ -153,8 +153,9 @@ fi cd "$CWD" -echo "* Cleaning doc/ and perftests/ under $CWD..." +echo "* Cleaning doc/, fuzzers/ and perftests/ under $CWD..." rm -rf doc +rm -rf fuzzers rm -rf perftests #