- Regex: '^<ccache/'
Priority: 2
# Dependency headers:
- - Regex: '^<(doctest/.*|fmt/.*|hiredis/.*|httplib\.h|zstd\.h)>$'
+ - Regex: '^<(doctest/.*|fmt/.*|hiredis/.*|httplib\.h|nonstd/.*|zstd\.h)>$'
Priority: 3
# System headers:
- Regex: '\.h.*>$'
----
-=== src/third_party/nonstd/span.hpp
+=== src/third_party/nonstd-span/nonstd/span.hpp
This is the single header version of
https://github.com/martinmoene/span-lite[span-lite] 0.10.3 with the
find_package(CppHttplib 0.10.6 MODULE REQUIRED)
find_package(Fmt 8.0.0 MODULE REQUIRED)
+find_package(NonstdSpan 0.10.3 MODULE REQUIRED)
find_package(Zstd 1.3.4 MODULE REQUIRED)
if(ENABLE_TESTING)
--- /dev/null
+mark_as_advanced(NONSTDSPAN_INCLUDE_DIR)
+
+if(DEP_NONSTDSPAN STREQUAL "BUNDLED")
+ message(STATUS "Using bundled NonstdSpan as requested")
+else()
+ find_path(NONSTDSPAN_INCLUDE_DIR nonstd/span.hpp)
+ if(NONSTDSPAN_INCLUDE_DIR)
+ file(READ "${NONSTDSPAN_INCLUDE_DIR}/nonstd/span.hpp" _nonstdspan_h)
+ string(REGEX MATCH "#define span_lite_MAJOR ([0-9]+).*#define span_lite_MINOR ([0-9]+).*#define span_lite_PATCH ([0-9]+)" _ "${_nonstdspan_h}")
+ set(_nonstdspan_version_string "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
+ if(NOT "${CMAKE_MATCH_0}" STREQUAL "" AND "${_nonstdspan_version_string}" VERSION_GREATER_EQUAL "${NonstdSpan_FIND_VERSION}")
+ message(STATUS "Using system NonstdSpan (${NONSTDSPAN_INCLUDE_DIR}/nonstd/span.hpp)")
+ add_library(dep_nonstdspan INTERFACE IMPORTED)
+ target_include_directories(dep_nonstdspan INTERFACE "${NONSTDSPAN_INCLUDE_DIR}")
+ register_dependency(NonstdSpan "SYSTEM (${NONSTDSPAN_INCLUDE_DIR}/nonstd/span.hpp)" ${_nonstdspan_version_string})
+ endif()
+ endif()
+ if(NOT TARGET dep_nonstdspan)
+ message(STATUS "Using bundled NonstdSpan since NonstdSpan>=${NonstdSpan_FIND_VERSION} was not found locally")
+ endif()
+endif()
- [fmt](https://fmt.dev)[^2]
- [hiredis](https://github.com/redis/hiredis)[^2] (optional, disable with `-D
REDIS_STORAGE_BACKEND=OFF`)
+- [span-lite](https://github.com/martinmoene/span-lite)[^1]
- [Zstandard](https://github.com/facebook/zstd)[^2]
[^1]: A bundled version will be used if missing locally.
ccache_framework
PUBLIC
dep_fmt
+ dep_nonstdspan
third_party
PRIVATE
dep_cpphttplib
#pragma once
-#include <blake3/blake3.h>
#include <nonstd/span.hpp>
+
+#include <blake3/blake3.h>
#include <tl/expected.hpp>
#include <array>
#include <ccache/util/Bytes.hpp>
#include <nonstd/span.hpp>
+
#include <tl/expected.hpp>
#include <url.hpp>
#include <ccache/util/types.hpp>
#include <nonstd/span.hpp>
+
#include <tl/expected.hpp>
#include <cstddef>
#include <ccache/util/conversion.hpp>
#include <nonstd/span.hpp>
+
#include <sys/stat.h> // for mode_t
#include <tl/expected.hpp>
#include <ccache/util/Bytes.hpp>
#include <nonstd/span.hpp>
+
#include <tl/expected.hpp>
#include <cstddef>
if(NOT TARGET dep_cpphttplib)
add_subdirectory(cpp-httplib)
endif()
+if(NOT TARGET dep_nonstdspan)
+ add_subdirectory(nonstd-span)
+endif()
--- /dev/null
+register_dependency(NonstdSpan BUNDLED 0.10.3)
+add_header_only_library(nonstdspan DIR "${CMAKE_CURRENT_SOURCE_DIR}")
#include <ccache/util/Bytes.hpp>
#include <doctest/doctest.h>
-
#include <nonstd/span.hpp>
#include <vector>