about summary refs log tree commit diff
path: root/third_party/glog/cmake/GetCacheVariables.cmake
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-02-07T19·15+0300
committertazjin <tazjin@tvl.su>2022-02-07T22·25+0000
commit5ed7ef8089a6914a81b7592d2b6db93c5d87a1e2 (patch)
treed1b86294fd613ed62f131a4ba67bc6e3adf2fc61 /third_party/glog/cmake/GetCacheVariables.cmake
parent18c8c41b5c2de5a08530b5185cefef86f6ffaff5 (diff)
chore(3p/glog): Unvendor glog r/3784
... and build //third_party/nix with the one from nixpkgs.

Change-Id: Iae7f1772a31286f2c22955cdc1fe61ee82d112aa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3016
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'third_party/glog/cmake/GetCacheVariables.cmake')
-rw-r--r--third_party/glog/cmake/GetCacheVariables.cmake63
1 files changed, 0 insertions, 63 deletions
diff --git a/third_party/glog/cmake/GetCacheVariables.cmake b/third_party/glog/cmake/GetCacheVariables.cmake
deleted file mode 100644
index 20485a8c8f8f..000000000000
--- a/third_party/glog/cmake/GetCacheVariables.cmake
+++ /dev/null
@@ -1,63 +0,0 @@
-cmake_policy (PUSH)
-cmake_policy (VERSION 3.3)
-
-include (CMakeParseArguments)
-
-function (get_cache_variables _CACHEVARS)
-  set (_SINGLE)
-  set (_MULTI EXCLUDE)
-  set (_OPTIONS)
-
-  cmake_parse_arguments (_ARGS "${_OPTIONS}" "${_SINGLE}" "${_MULTI}" ${ARGS} ${ARGN})
-
-  get_cmake_property (_VARIABLES VARIABLES)
-
-  set (CACHEVARS)
-
-  foreach (_VAR ${_VARIABLES})
-    if (DEFINED _ARGS_EXCLUDE)
-      if ("${_VAR}" IN_LIST _ARGS_EXCLUDE)
-        continue ()
-      endif ("${_VAR}" IN_LIST _ARGS_EXCLUDE)
-    endif (DEFINED _ARGS_EXCLUDE)
-
-    get_property (_CACHEVARTYPE CACHE ${_VAR} PROPERTY TYPE)
-
-    if ("${_CACHEVARTYPE}" STREQUAL INTERNAL OR
-        "${_CACHEVARTYPE}" STREQUAL STATIC OR
-        "${_CACHEVARTYPE}" STREQUAL UNINITIALIZED)
-        continue ()
-    endif ("${_CACHEVARTYPE}" STREQUAL INTERNAL OR
-        "${_CACHEVARTYPE}" STREQUAL STATIC OR
-        "${_CACHEVARTYPE}" STREQUAL UNINITIALIZED)
-
-    get_property (_CACHEVARVAL CACHE ${_VAR} PROPERTY VALUE)
-
-    if ("${_CACHEVARVAL}" STREQUAL "")
-      continue ()
-    endif ("${_CACHEVARVAL}" STREQUAL "")
-
-    get_property (_CACHEVARDOC CACHE ${_VAR} PROPERTY HELPSTRING)
-
-    # Escape " in values
-    string (REPLACE "\"" "\\\"" _CACHEVARVAL "${_CACHEVARVAL}")
-    # Escape " in help strings
-    string (REPLACE "\"" "\\\"" _CACHEVARDOC "${_CACHEVARDOC}")
-    # Escape ; in values
-    string (REPLACE ";" "\\\;" _CACHEVARVAL "${_CACHEVARVAL}")
-    # Escape backslash in values
-    string (REGEX REPLACE "\\\\([^\"])" "\\\\\\1" _CACHEVARVAL "${_CACHEVARVAL}")
-
-    if (NOT "${_CACHEVARTYPE}" STREQUAL BOOL)
-      set (_CACHEVARVAL "\"${_CACHEVARVAL}\"")
-    endif (NOT "${_CACHEVARTYPE}" STREQUAL BOOL)
-
-    if (NOT "${_CACHEVARTYPE}" STREQUAL "" AND NOT "${_CACHEVARVAL}" STREQUAL "")
-      set (CACHEVARS "${CACHEVARS}set (${_VAR} ${_CACHEVARVAL} CACHE ${_CACHEVARTYPE} \"${_CACHEVARDOC}\")\n")
-    endif (NOT "${_CACHEVARTYPE}" STREQUAL "" AND NOT "${_CACHEVARVAL}" STREQUAL "")
-  endforeach (_VAR)
-
-  set (${_CACHEVARS} ${CACHEVARS} PARENT_SCOPE)
-endfunction (get_cache_variables)
-
-cmake_policy (POP)