Skip to content

Commit

Permalink
Merge pull request #2 from camio/case-rename
Browse files Browse the repository at this point in the history
Renamed files, directories, and targets to match beman standard
  • Loading branch information
camio authored Sep 17, 2024
2 parents 69deed7 + e61d058 commit 9d2d138
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 38 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

cmake_minimum_required(VERSION 3.23)
project(
InplaceVector
beman.inplace_vector
VERSION 1.0.0
DESCRIPTION "A dynamically-resizable vector with fixed capacity and embedded storage"
LANGUAGES CXX
)

include(CTest)
add_subdirectory(src/Beman/InplaceVector)
add_subdirectory(src/beman/inplace_vector)

if (BUILD_TESTING)
add_subdirectory(src/Beman/InplaceVector/tests)
endif ()
add_subdirectory(src/beman/inplace_vector/tests)
endif ()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Beman.InplaceVector: A dynamically-resizable vector with fixed capacity and embedded storage
# beman.inplace\_vector: A dynamically-resizable vector with fixed capacity and embedded storage

<!--
SPDX-License-Identifier: <SPDX License Expression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <ranges>
#include <type_traits>

namespace Beman::InplaceVector {
namespace beman::inplace_vector {
namespace detail {
// Exposition-only container-compatible-range
template <typename T>
Expand Down Expand Up @@ -752,4 +752,4 @@ class inplace_vector : public inplace_vector_base<T, Capacity> {
x.swap(y);
}
};
} // namespace Beman::InplaceVector
} // namespace beman::inplace_vector
19 changes: 0 additions & 19 deletions src/Beman/InplaceVector/tests/CMakeLists.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# cmake-format: off
# src/Beman/InplaceVector/CMakeLists.txt -*-makefile-*-
# src/beman/inplace_vector/CMakeLists.txt -*-makefile-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on
# Add the InplaceVector library
add_library(Beman.InplaceVector STATIC inplace_vector.cpp)
# Add the beman.inplace_vector library
add_library(beman.inplace_vector STATIC inplace_vector.cpp)

# Include GNU install directories module
include(GNUInstallDirs)
Expand All @@ -13,14 +13,14 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})

# Set the target Include directories for the InplaceVector library
target_include_directories(
Beman.InplaceVector
beman.inplace_vector
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../../Include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../../include>
)

# Install the InplaceVector library to the appropriate destination
install(
TARGETS Beman.InplaceVector
TARGETS beman.inplace_vector
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
Expand All @@ -33,8 +33,8 @@ install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${CMAKE_LOWER_PROJECT_NAME}
FILES_MATCHING
PATTERN "../../../Include/Beman/InplaceVector/inplace_vector.hpp"
PATTERN "../../../include/beman/inplace_vector/inplace_vector.hpp"
)

# Link libraries to the InplaceVector target
target_link_libraries(Beman.InplaceVector)
# Link libraries to the beman.inplace_vector target
target_link_libraries(beman.inplace_vector)
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include <Beman/InplaceVector/inplace_vector.hpp>
#include <beman/inplace_vector/inplace_vector.hpp>
17 changes: 17 additions & 0 deletions src/beman/inplace_vector/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# cmake-format: off
# src/beman/inplace_vector/tests/CMakeLists.txt -*-makefile-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

# Tests
add_executable(
beman.inplace_vector.test inplace_vector.test.cpp)

target_link_libraries(beman.inplace_vector.test PRIVATE
beman.inplace_vector)


add_test(
NAME beman.inplace_vector.test
COMMAND beman.inplace_vector.test
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include <Beman/InplaceVector/inplace_vector.hpp>
#include <beman/inplace_vector/inplace_vector.hpp>

using namespace Beman::InplaceVector;
using namespace beman::inplace_vector;

template <typename T> constexpr void test() {
using vec = inplace_vector<T, 42>;
Expand Down

0 comments on commit 9d2d138

Please sign in to comment.