summaryrefslogtreecommitdiffstats
path: root/Modules/CMakePrintHelpers.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-03-11 13:55:05 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2021-03-11 13:55:05 (GMT)
commitbb9a701a2b90f002c87c01b4a9f8019f2c7f8385 (patch)
tree8d1838c6e2d8df077f264414a405e3d4dc298123 /Modules/CMakePrintHelpers.cmake
parent2da1a8f92d621ac698c0c5610cea46958b43ea48 (diff)
downloadCMake-bb9a701a2b90f002c87c01b4a9f8019f2c7f8385.zip
CMake-bb9a701a2b90f002c87c01b4a9f8019f2c7f8385.tar.gz
CMake-bb9a701a2b90f002c87c01b4a9f8019f2c7f8385.tar.bz2
CMakePrintHelpers: Work around CACHE argument of set()
Fixes: #21919
Diffstat (limited to 'Modules/CMakePrintHelpers.cmake')
-rw-r--r--Modules/CMakePrintHelpers.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CMakePrintHelpers.cmake b/Modules/CMakePrintHelpers.cmake
index d652ffa..8c25a73 100644
--- a/Modules/CMakePrintHelpers.cmake
+++ b/Modules/CMakePrintHelpers.cmake
@@ -101,7 +101,10 @@ function(cmake_print_properties)
if(CPP_CACHE_ENTRIES)
set(items ${CPP_CACHE_ENTRIES})
set(mode ${mode} CACHE_ENTRIES)
- set(keyword CACHE)
+ # This is a workaround for the fact that passing `CACHE` as an argument to
+ # set() causes a cache variable to be set.
+ set(keyword "")
+ string(APPEND keyword CACHE)
endif()
if(NOT mode)