|
|
@@ -65,14 +65,53 @@ This module provides the following command:
|
|
|
|
|
|
Specify a compression algorithm for the
|
|
|
``TARBALL`` data file. Using this option reduces the size of the data file
|
|
|
- before it is submitted to CDash. ``<compression>`` must be one of ``GZIP``,
|
|
|
- ``BZIP2``, ``XZ``, ``ZSTD``, ``FROM_EXT``, or an expression that CMake
|
|
|
- evaluates as ``FALSE``. The default value is ``BZIP2``.
|
|
|
+ before it is submitted to CDash.
|
|
|
+ ``<compression>`` should be one of the following:
|
|
|
+
|
|
|
+ * ``GZIP``
|
|
|
+ * ``BZIP2``
|
|
|
+ * ``LZMA``
|
|
|
+
|
|
|
+ .. versionadded:: 4.3
|
|
|
+
|
|
|
+ * ``LZMA2``
|
|
|
+
|
|
|
+ .. versionadded:: 4.3
|
|
|
+
|
|
|
+ This is an alias for ``XZ``.
|
|
|
+
|
|
|
+ * ``XZ``
|
|
|
+ * ``ZSTD``
|
|
|
+ * ``FROM_EXT``
|
|
|
+ * An expression that CMake evaluates as ``FALSE``
|
|
|
+
|
|
|
+ The default value is ``BZIP2``.
|
|
|
|
|
|
If ``FROM_EXT`` is specified, the resulting file will be compressed based on
|
|
|
the file extension of the ``<tar-file>`` (i.e. ``.tar.gz`` will use ``GZIP``
|
|
|
- compression). File extensions that will produce compressed output include
|
|
|
- ``.tar.gz``, ``.tgz``, ``.tar.bzip2``, ``.tbz``, ``.tar.xz``, and ``.txz``.
|
|
|
+ compression). File extensions that will produce compressed output include:
|
|
|
+
|
|
|
+ * ``.tar.gz``
|
|
|
+ * ``.tgz``
|
|
|
+ * ``.tar.bzip2``
|
|
|
+ * ``.tbz``
|
|
|
+ * ``.tar.xz``
|
|
|
+ * ``.txz``
|
|
|
+ * ``.tar.lzma``
|
|
|
+
|
|
|
+ .. versionadded:: 4.3
|
|
|
+
|
|
|
+ * ``.tlzma``
|
|
|
+
|
|
|
+ .. versionadded:: 4.3
|
|
|
+
|
|
|
+ * ``.tar.zst``
|
|
|
+
|
|
|
+ .. versionadded:: 4.3
|
|
|
+
|
|
|
+ * ``.tzst``
|
|
|
+
|
|
|
+ .. versionadded:: 4.3
|
|
|
|
|
|
``SOURCE <source-dir>``
|
|
|
Specify the top-level source directory for the build.
|
|
|
@@ -152,12 +191,12 @@ function(ctest_coverage_collect_gcov)
|
|
|
else()
|
|
|
set(gcov_command "${GCOV_GCOV_COMMAND}")
|
|
|
endif()
|
|
|
+ set(supported_compressions "GZIP" "BZIP2" "LZMA" "LZMA2" "XZ" "ZSTD" "FROM_EXT")
|
|
|
if(NOT DEFINED GCOV_TARBALL_COMPRESSION)
|
|
|
set(GCOV_TARBALL_COMPRESSION "BZIP2")
|
|
|
elseif( GCOV_TARBALL_COMPRESSION AND
|
|
|
- NOT GCOV_TARBALL_COMPRESSION MATCHES "^(GZIP|BZIP2|XZ|ZSTD|FROM_EXT)$")
|
|
|
- message(FATAL_ERROR "TARBALL_COMPRESSION must be one of OFF, GZIP, "
|
|
|
- "BZIP2, XZ, ZSTD, or FROM_EXT for ctest_coverage_collect_gcov")
|
|
|
+ NOT GCOV_TARBALL_COMPRESSION IN_LIST supported_compressions)
|
|
|
+ message(FATAL_ERROR "TARBALL_COMPRESSION must be OFF or one of ${supported_compressions} for ctest_coverage_collect_gcov")
|
|
|
endif()
|
|
|
# run gcov on each gcda file in the binary tree
|
|
|
set(gcda_files)
|
|
|
@@ -341,6 +380,7 @@ ${uncovered_files_for_tar}
|
|
|
# Prepare tar command line arguments
|
|
|
|
|
|
set(tar_opts "")
|
|
|
+ set(zstd_tar_opt "")
|
|
|
# Select data compression mode
|
|
|
if( GCOV_TARBALL_COMPRESSION STREQUAL "FROM_EXT")
|
|
|
if( GCOV_TARBALL MATCHES [[\.(tgz|tar.gz)$]] )
|
|
|
@@ -349,15 +389,21 @@ ${uncovered_files_for_tar}
|
|
|
string(APPEND tar_opts "J")
|
|
|
elseif( GCOV_TARBALL MATCHES [[\.(tbz|tar.bz)$]] )
|
|
|
string(APPEND tar_opts "j")
|
|
|
+ elseif( GCOV_TARBALL MATCHES [[\.(tlzma|tar.lzma)$]] )
|
|
|
+ set(zstd_tar_opt "--lzma")
|
|
|
+ elseif( GCOV_TARBALL MATCHES [[\.(tzst|tar.zst)$]] )
|
|
|
+ set(zstd_tar_opt "--zstd")
|
|
|
endif()
|
|
|
elseif(GCOV_TARBALL_COMPRESSION STREQUAL "GZIP")
|
|
|
string(APPEND tar_opts "z")
|
|
|
- elseif(GCOV_TARBALL_COMPRESSION STREQUAL "XZ")
|
|
|
+ elseif((GCOV_TARBALL_COMPRESSION STREQUAL "XZ") OR (GCOV_TARBALL_COMPRESSION STREQUAL "LZMA2"))
|
|
|
string(APPEND tar_opts "J")
|
|
|
elseif(GCOV_TARBALL_COMPRESSION STREQUAL "BZIP2")
|
|
|
string(APPEND tar_opts "j")
|
|
|
elseif(GCOV_TARBALL_COMPRESSION STREQUAL "ZSTD")
|
|
|
set(zstd_tar_opt "--zstd")
|
|
|
+ elseif(GCOV_TARBALL_COMPRESSION STREQUAL "LZMA")
|
|
|
+ set(zstd_tar_opt "--lzma")
|
|
|
endif()
|
|
|
# Verbosity options
|
|
|
if(NOT GCOV_QUIET AND NOT tar_opts MATCHES v)
|