From bc23835e45136162a5020cc806bc1a551096c077 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Fri, 10 Jul 2026 09:18:21 +0700 Subject: [PATCH] rapidhash: Make vendored header available to CMake sources --- Source/Modules/CMakeBuildUtilities.cmake | 6 ++++++ Utilities/cm3p/rapidhash.h | 6 ++++++ Utilities/cmrapidhash/CMakeLists.txt | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 Utilities/cm3p/rapidhash.h create mode 100644 Utilities/cmrapidhash/CMakeLists.txt diff --git a/Source/Modules/CMakeBuildUtilities.cmake b/Source/Modules/CMakeBuildUtilities.cmake index 15bc35bc1f..a6578eb95b 100644 --- a/Source/Modules/CMakeBuildUtilities.cmake +++ b/Source/Modules/CMakeBuildUtilities.cmake @@ -102,6 +102,12 @@ else() CMAKE_SET_TARGET_FOLDER(cmlibrhash "Utilities/3rdParty") endif() +#--------------------------------------------------------------------- +# rapidhash is a header-only hashing library used to speed up +# string-keyed hash tables (e.g. cmDefinitions). No system option is +# provided because it has no conventional system package. +add_subdirectory(Utilities/cmrapidhash) + #--------------------------------------------------------------------- # Build zlib library for Curl, CMake, and CTest. if(CMAKE_USE_SYSTEM_ZLIB) diff --git a/Utilities/cm3p/rapidhash.h b/Utilities/cm3p/rapidhash.h new file mode 100644 index 0000000000..99356d42b2 --- /dev/null +++ b/Utilities/cm3p/rapidhash.h @@ -0,0 +1,6 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file LICENSE.rst or https://cmake.org/licensing for details. */ +#pragma once + +/* Use the rapidhash library bundled with CMake. */ +#include // IWYU pragma: export diff --git a/Utilities/cmrapidhash/CMakeLists.txt b/Utilities/cmrapidhash/CMakeLists.txt new file mode 100644 index 0000000000..4c1283155c --- /dev/null +++ b/Utilities/cmrapidhash/CMakeLists.txt @@ -0,0 +1,6 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file LICENSE.rst or https://cmake.org/licensing for details. + +# rapidhash is a header-only library, so there is no library target to build. + +install(FILES LICENSE DESTINATION ${CMake_INSTALL_DOC_DIR}/cmrapidhash)