Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ buckaroo_macros.bzl

# CMake
.build/
build/
build/
_codeql_build_dir/
_codeql_detected_source_root
34 changes: 3 additions & 31 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include(FetchContent)
project(Array VERSION 1.0)

# Set the C++ standard
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# Include directories
Expand Down Expand Up @@ -47,6 +47,7 @@ target_include_directories(array INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_compile_features(array INTERFACE cxx_std_23)
target_link_libraries(array INTERFACE fmt::fmt)

# Add the executable target for the main application (for testing purposes)
Expand All @@ -63,33 +64,4 @@ include(Catch)
catch_discover_tests(test_runner)

# Install the library headers
install(DIRECTORY include/ DESTINATION include)

# Export the targets
install(TARGETS array EXPORT ArrayTargets)

# Generate and install the CMake configuration files
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/ArrayConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion
)

configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/ArrayConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/ArrayConfig.cmake"
INSTALL_DESTINATION lib/cmake/Array
)

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/ArrayConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/ArrayConfigVersion.cmake"
DESTINATION lib/cmake/Array
)

install(EXPORT ArrayTargets
FILE ArrayTargets.cmake
NAMESPACE Array::
DESTINATION lib/cmake/Array
)
install(DIRECTORY include/ DESTINATION include)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This project uses CMake as its build system. A Makefile is provided for convenie

### Prerequisites

- C++ compiler with C++20 support
- C++ compiler with C++23 support
- CMake (version 3.10 or higher)
- Make (optional, for using the provided Makefile)

Expand Down
Loading
Loading