Skip to content

Commit 6027d5c

Browse files
committed
refactor: Rename project to byte-span
1 parent 376ab9b commit 6027d5c

17 files changed

Lines changed: 80 additions & 109 deletions

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"llvm-vs-code-extensions.vscode-clangd",
1515
"xaver.clang-format",
1616
"cschlosser.doxdocgen",
17-
"streetsidesoftware.code-spell-checker",
1817
"GitHub.copilot",
1918
"GitHub.copilot-chat"
2019
],

BUILDING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@ cmake --install build --config Release
6565
This project exports a CMake package to be used with the [`find_package`][3]
6666
command of CMake:
6767

68-
* Package name: `lsm-tree`
69-
* Target name: `lsm-tree::lsm-tree`
68+
* Package name: `byte-span`
69+
* Target name: `byte-span::byte-span`
7070

7171
Example usage:
7272

7373
```cmake
74-
find_package(lsm-tree REQUIRED)
74+
find_package(byte-span REQUIRED)
7575
# Declare the imported target as a build requirement using PRIVATE, where
7676
# project_target is a target created in the consuming project
7777
target_link_libraries(
7878
project_target PRIVATE
79-
lsm-tree::lsm-tree
79+
byte-span::byte-span
8080
)
8181
```
8282

CMakeLists.txt

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,33 @@ cmake_minimum_required(VERSION 3.14)
33
include(cmake/prelude.cmake)
44

55
project(
6-
lsm-tree
6+
byte-span
77
VERSION 0.1.0
8-
DESCRIPTION "LSM-tree"
9-
HOMEPAGE_URL "https://github.com/range3/lsm-tree"
10-
LANGUAGES NONE
8+
DESCRIPTION "Lightweight view class for efficient handling of byte data"
9+
HOMEPAGE_URL "https://github.com/range3/byte-span"
10+
LANGUAGES CXX
1111
)
1212

1313
include(cmake/project-is-top-level.cmake)
1414
include(cmake/variables.cmake)
1515

1616
# ---- Declare library ----
1717

18-
add_library(lsm-tree_lsm-tree INTERFACE)
19-
add_library(lsm-tree::lsm-tree ALIAS lsm-tree_lsm-tree)
18+
add_library(byte-span_byte-span INTERFACE)
19+
add_library(byte-span::byte-span ALIAS byte-span_byte-span)
2020

2121
set_property(
22-
TARGET lsm-tree_lsm-tree PROPERTY
23-
EXPORT_NAME lsm-tree
22+
TARGET byte-span_byte-span PROPERTY
23+
EXPORT_NAME byte-span
2424
)
2525

2626
target_include_directories(
27-
lsm-tree_lsm-tree ${warning_guard}
27+
byte-span_byte-span ${warning_guard}
2828
INTERFACE
2929
"\$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
3030
)
3131

32-
target_compile_features(lsm-tree_lsm-tree INTERFACE cxx_std_20)
33-
34-
find_package(fmt REQUIRED)
35-
find_package(inspector REQUIRED)
36-
target_link_libraries(lsm-tree_lsm-tree INTERFACE fmt::fmt inspector::inspector)
32+
target_compile_features(byte-span_byte-span INTERFACE cxx_std_20)
3733

3834
# ---- Install rules ----
3935

@@ -43,12 +39,12 @@ endif()
4339

4440
# ---- Developer mode ----
4541

46-
if(NOT lsm-tree_DEVELOPER_MODE)
42+
if(NOT byte-span_DEVELOPER_MODE)
4743
return()
4844
elseif(NOT PROJECT_IS_TOP_LEVEL)
4945
message(
5046
AUTHOR_WARNING
51-
"Developer mode is intended for developers of lsm-tree"
47+
"Developer mode is intended for developers of byte-span"
5248
)
5349
endif()
5450

CMakePresets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"name": "dev-mode",
1111
"hidden": true,
1212
"cacheVariables": {
13-
"lsm-tree_DEVELOPER_MODE": "ON",
13+
"byte-span_DEVELOPER_MODE": "ON",
1414
"VCPKG_MANIFEST_FEATURES": "test"
1515
}
1616
},

HACKING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ guide.
99
## Developer mode
1010

1111
Build system targets that are only useful for developers of this project are
12-
hidden if the `lsm-tree_DEVELOPER_MODE` option is disabled. Enabling this
12+
hidden if the `byte-span_DEVELOPER_MODE` option is disabled. Enabling this
1313
option makes tests and other developer targets and options available. Not
1414
enabling this option means that you are a consumer of this project and thus you
1515
have no need for these targets and options.
@@ -23,7 +23,7 @@ the project. As a developer, you are recommended to always have the [latest
2323
CMake version][2] installed to make use of the latest Quality-of-Life
2424
additions.
2525

26-
You have a few options to pass `lsm-tree_DEVELOPER_MODE` to the configure
26+
You have a few options to pass `byte-span_DEVELOPER_MODE` to the configure
2727
command, but this project prefers to use presets.
2828

2929
As a developer, you should create a `CMakeUserPresets.json` file at the root of

cmake/install-config.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ include(CMakeFindDependencyMacro)
22
find_dependency(fmt)
33

44
if(fmt_FOUND)
5-
include("${CMAKE_CURRENT_LIST_DIR}/lsm-treeTargets.cmake")
5+
include("${CMAKE_CURRENT_LIST_DIR}/byte-spanTargets.cmake")
66
endif()

cmake/install-rules.cmake

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
if(PROJECT_IS_TOP_LEVEL)
22
set(
3-
CMAKE_INSTALL_INCLUDEDIR "include/lsm-tree-${PROJECT_VERSION}"
3+
CMAKE_INSTALL_INCLUDEDIR "include/byte-span-${PROJECT_VERSION}"
44
CACHE STRING ""
55
)
66
set_property(CACHE CMAKE_INSTALL_INCLUDEDIR PROPERTY TYPE PATH)
@@ -13,17 +13,17 @@ include(CMakePackageConfigHelpers)
1313
include(GNUInstallDirs)
1414

1515
# find_package(<package>) call for consumers to find this project
16-
set(package lsm-tree)
16+
set(package byte-span)
1717

1818
install(
1919
DIRECTORY include/
2020
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
21-
COMPONENT lsm-tree_Development
21+
COMPONENT byte-span_Development
2222
)
2323

2424
install(
25-
TARGETS lsm-tree_lsm-tree
26-
EXPORT lsm-treeTargets
25+
TARGETS byte-span_byte-span
26+
EXPORT byte-spanTargets
2727
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
2828
)
2929

@@ -35,30 +35,30 @@ write_basic_package_version_file(
3535

3636
# Allow package maintainers to freely override the path for the configs
3737
set(
38-
lsm-tree_INSTALL_CMAKEDIR "${CMAKE_INSTALL_DATADIR}/${package}"
38+
byte-span_INSTALL_CMAKEDIR "${CMAKE_INSTALL_DATADIR}/${package}"
3939
CACHE STRING "CMake package config location relative to the install prefix"
4040
)
41-
set_property(CACHE lsm-tree_INSTALL_CMAKEDIR PROPERTY TYPE PATH)
42-
mark_as_advanced(lsm-tree_INSTALL_CMAKEDIR)
41+
set_property(CACHE byte-span_INSTALL_CMAKEDIR PROPERTY TYPE PATH)
42+
mark_as_advanced(byte-span_INSTALL_CMAKEDIR)
4343

4444
install(
4545
FILES cmake/install-config.cmake
46-
DESTINATION "${lsm-tree_INSTALL_CMAKEDIR}"
46+
DESTINATION "${byte-span_INSTALL_CMAKEDIR}"
4747
RENAME "${package}Config.cmake"
48-
COMPONENT lsm-tree_Development
48+
COMPONENT byte-span_Development
4949
)
5050

5151
install(
5252
FILES "${PROJECT_BINARY_DIR}/${package}ConfigVersion.cmake"
53-
DESTINATION "${lsm-tree_INSTALL_CMAKEDIR}"
54-
COMPONENT lsm-tree_Development
53+
DESTINATION "${byte-span_INSTALL_CMAKEDIR}"
54+
COMPONENT byte-span_Development
5555
)
5656

5757
install(
58-
EXPORT lsm-treeTargets
59-
NAMESPACE lsm-tree::
60-
DESTINATION "${lsm-tree_INSTALL_CMAKEDIR}"
61-
COMPONENT lsm-tree_Development
58+
EXPORT byte-spanTargets
59+
NAMESPACE byte-span::
60+
DESTINATION "${byte-span_INSTALL_CMAKEDIR}"
61+
COMPONENT byte-span_Development
6262
)
6363

6464
if(PROJECT_IS_TOP_LEVEL)

cmake/variables.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# ---- Developer mode ----
22

33
# Developer mode enables targets and code paths in the CMake scripts that are
4-
# only relevant for the developer(s) of lsm-tree
4+
# only relevant for the developer(s) of byte-span
55
# Targets necessary to build the project must be provided unconditionally, so
66
# consumers can trivially build and package the project
77
if(PROJECT_IS_TOP_LEVEL)
8-
option(lsm-tree_DEVELOPER_MODE "Enable developer mode" OFF)
8+
option(byte-span_DEVELOPER_MODE "Enable developer mode" OFF)
99
endif()
1010

1111
# ---- Warning guard ----
@@ -17,12 +17,12 @@ endif()
1717
set(warning_guard "")
1818
if(NOT PROJECT_IS_TOP_LEVEL)
1919
option(
20-
lsm-tree_INCLUDES_WITH_SYSTEM
21-
"Use SYSTEM modifier for lsm-tree's includes, disabling warnings"
20+
byte-span_INCLUDES_WITH_SYSTEM
21+
"Use SYSTEM modifier for byte-span's includes, disabling warnings"
2222
ON
2323
)
24-
mark_as_advanced(lsm-tree_INCLUDES_WITH_SYSTEM)
25-
if(lsm-tree_INCLUDES_WITH_SYSTEM)
24+
mark_as_advanced(byte-span_INCLUDES_WITH_SYSTEM)
25+
if(byte-span_INCLUDES_WITH_SYSTEM)
2626
set(warning_guard SYSTEM)
2727
endif()
2828
endif()
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <string_view>
1111
#include <type_traits>
1212

13-
namespace lsm::utils {
13+
namespace range3 {
1414

1515
using std::dynamic_extent;
1616

@@ -469,13 +469,13 @@ byte_span(Range&&)
469469
using byte_view = byte_span<std::byte>;
470470
using cbyte_view = byte_span<const std::byte>;
471471

472-
} // namespace lsm::utils
472+
} // namespace range3
473473

474474
// Opt-in to borrowed_range concept
475475
template <typename T, std::size_t N>
476-
constexpr bool std::ranges::enable_borrowed_range<lsm::utils::byte_span<T, N>> =
476+
constexpr bool std::ranges::enable_borrowed_range<range3::byte_span<T, N>> =
477477
true;
478478

479479
// Opt-in to view concept
480480
template <typename B, size_t N>
481-
constexpr bool std::ranges::enable_view<lsm::utils::byte_span<B, N>> = true;
481+
constexpr bool std::ranges::enable_view<range3::byte_span<B, N>> = true;

include/lsm-tree/lsm-tree.hpp

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)