File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,15 @@ include(CMakeDependentOption)
4747include (CMakePackageConfigHelpers )
4848include (FeatureSummary )
4949
50+ # We need to enable C++ before trying to check for coverage
51+ option (WITH_GTEST "Build gtest_zlib" ON )
52+ option (WITH_FUZZERS "Build test/fuzz" OFF )
53+ option (WITH_BENCHMARKS "Build test/benchmarks" OFF )
54+
55+ if (WITH_GTEST OR WITH_BENCHMARKS OR WITH_FUZZERS)
56+ enable_language (CXX )
57+ endif ()
58+
5059include (cmake/detect-arch.cmake )
5160include (cmake/detect-install-dirs.cmake )
5261include (cmake/detect-coverage.cmake )
@@ -79,9 +88,6 @@ option(WITH_GZFILEOP "Compile with support for gzFile related functions" ON)
7988option (ZLIB_COMPAT "Compile with zlib compatible API" OFF )
8089option (ZLIB_ENABLE_TESTS "Build test binaries" ON )
8190option (ZLIBNG_ENABLE_TESTS "Test zlib-ng specific API" ON )
82- option (WITH_GTEST "Build gtest_zlib" ON )
83- option (WITH_FUZZERS "Build test/fuzz" OFF )
84- option (WITH_BENCHMARKS "Build test/benchmarks" OFF )
8591option (WITH_BENCHMARK_APPS "Build application benchmarks" OFF )
8692option (WITH_OPTIM "Build with optimisation" ON )
8793option (WITH_REDUCED_MEM "Reduced memory usage for special cases (reduces performance)" OFF )
You can’t perform that action at this time.
0 commit comments