aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2020-11-17 20:51:48 +0200
committerLasse Collin <lasse.collin@tukaani.org>2020-11-17 21:09:39 +0200
commit2f108abb3d82e4e2313b438dae9c0c7c7a6366f2 (patch)
treed4e8a0dbb079bc49c2a83fb096cf0b52f540dcbf /CMakeLists.txt
parentUpdate THANKS. (diff)
downloadxz-2f108abb3d82e4e2313b438dae9c0c7c7a6366f2.tar.xz
CMake: Fix compatibility with CMake 3.13.
The syntax "if(DEFINED CACHE{FOO})" requires CMake 3.14. In some other places the code treats the cache variables like normal variables already (${FOO} or if(FOO) is used, not ${CACHE{FOO}). Thanks to ygrek for reporting the bug on IRC.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d3aa6270..c21ab567 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -127,7 +127,7 @@ tuklib_integer(ALL)
# Check for clock_gettime(). Do this before checking for threading so
# that we know there if CLOCK_MONOTONIC is available.
-if(NOT WIN32 AND NOT DEFINED CACHE{HAVE_CLOCK_GETTIME})
+if(NOT WIN32 AND NOT DEFINED HAVE_CLOCK_GETTIME)
check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME)
if(NOT HAVE_CLOCK_GETTIME)
# With glibc <= 2.17 or Solaris 10 this needs librt.