File: simdjson-user-cmakecache.cmake

package info (click to toggle)
simdjson 4.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,936 kB
  • sloc: cpp: 171,612; ansic: 19,122; sh: 1,126; python: 842; makefile: 47; ruby: 25; javascript: 13
file content (19 lines) | stat: -rw-r--r-- 628 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# ${USER_CMAKECACHE} contains the *user-specified* simdjson options so you can
# call cmake on another branch or repository with the same options.
#

file(READ "${BINARY_DIR}/CMakeCache.txt" cache)
# Escape semicolons, so the lines can be safely iterated in CMake
string(REPLACE ";" "\\;" cache "${cache}")
# Turn the contents into a list
string(REPLACE "\n" ";" cache "${cache}")

message(STATUS "${USER_CMAKECACHE}")

file(REMOVE "${USER_CMAKECACHE}")
foreach(line IN LISTS cache)
  if(line MATCHES "^SIMDJSON_" AND NOT line MATCHES "^SIMDJSON_LIB_")
    file(APPEND "${USER_CMAKECACHE}" "${line}\n")
  endif()
endforeach()