summaryrefslogtreecommitdiffstats
path: root/config.tests
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-04-15 16:41:02 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-04-16 16:49:28 +0200
commitf4417bf7e8f843438345f496cf5d6a9b6fa33709 (patch)
tree502ea3d41257505a9c899ebab75d13ab9a97cfcf /config.tests
parent5656a60dd067a69f9e864a33068ec300124d4e05 (diff)
Check whether CMake was built with zstd support
CMake 3.18 introduced the file(ARCHIVE_CREATE) API that we use with COMPRESSION Zstd for compressing corelib's mimedatabase. It's possible to build CMake without proper zstd support, and we have encountered such builds in the wild where the file(ARCHIVE_CREATE) call crashes. Add a configure test to determine whether CMake properly supports the Zstd compression method. Fixes: QTBUG-89108 Change-Id: I37e389c878845162b6f18457984d4f73a265b604 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'config.tests')
-rw-r--r--config.tests/cmake_zstd/check_zstd.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/config.tests/cmake_zstd/check_zstd.cmake b/config.tests/cmake_zstd/check_zstd.cmake
new file mode 100644
index 0000000000..267494f90b
--- /dev/null
+++ b/config.tests/cmake_zstd/check_zstd.cmake
@@ -0,0 +1,5 @@
+file(ARCHIVE_CREATE
+ OUTPUT cmake_zstd.zstd
+ PATHS "${CMAKE_CURRENT_LIST_FILE}"
+ FORMAT raw
+ COMPRESSION Zstd)