aboutsummaryrefslogtreecommitdiff
path: root/cmake
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 /cmake
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 'cmake')
-rw-r--r--cmake/tuklib_cpucores.cmake4
-rw-r--r--cmake/tuklib_physmem.cmake4
2 files changed, 4 insertions, 4 deletions
diff --git a/cmake/tuklib_cpucores.cmake b/cmake/tuklib_cpucores.cmake
index 5844e4b2..743d56b3 100644
--- a/cmake/tuklib_cpucores.cmake
+++ b/cmake/tuklib_cpucores.cmake
@@ -154,12 +154,12 @@ function(tuklib_cpucores_internal_check)
endfunction()
function(tuklib_cpucores TARGET_OR_ALL)
- if(NOT DEFINED CACHE{TUKLIB_CPUCORES_FOUND})
+ if(NOT DEFINED TUKLIB_CPUCORES_FOUND)
message(STATUS
"Checking how to detect the number of available CPU cores")
tuklib_cpucores_internal_check()
- if(DEFINED CACHE{TUKLIB_CPUCORES_DEFINITIONS})
+ if(DEFINED TUKLIB_CPUCORES_DEFINITIONS)
set(TUKLIB_CPUCORES_FOUND 1 CACHE INTERNAL "")
else()
set(TUKLIB_CPUCORES_FOUND 0 CACHE INTERNAL "")
diff --git a/cmake/tuklib_physmem.cmake b/cmake/tuklib_physmem.cmake
index ea5bcc46..f5ed8889 100644
--- a/cmake/tuklib_physmem.cmake
+++ b/cmake/tuklib_physmem.cmake
@@ -130,11 +130,11 @@ function(tuklib_physmem_internal_check)
endfunction()
function(tuklib_physmem TARGET_OR_ALL)
- if(NOT DEFINED CACHE{TUKLIB_PHYSMEM_FOUND})
+ if(NOT DEFINED TUKLIB_PHYSMEM_FOUND)
message(STATUS "Checking how to detect the amount of physical memory")
tuklib_physmem_internal_check()
- if(DEFINED CACHE{TUKLIB_PHYSMEM_DEFINITIONS})
+ if(DEFINED TUKLIB_PHYSMEM_DEFINITIONS)
set(TUKLIB_PHYSMEM_FOUND 1 CACHE INTERNAL "")
else()
set(TUKLIB_PHYSMEM_FOUND 0 CACHE INTERNAL "")