aboutsummaryrefslogtreecommitdiff
path: root/cmake/tuklib_cpucores.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>2022-07-12 18:11:36 +0300
commit13c58ac13e1a84c30de24191931af425286d0550 (patch)
treebb8c55d18be1d62fb3b6913742bc773253f30a52 /cmake/tuklib_cpucores.cmake
parentUpdate THANKS. (diff)
downloadxz-13c58ac13e1a84c30de24191931af425286d0550.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/tuklib_cpucores.cmake')
-rw-r--r--cmake/tuklib_cpucores.cmake4
1 files changed, 2 insertions, 2 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 "")