Skip to content

Commit 2138fbb

Browse files
committed
build: rename CMake project and targets to errors
1 parent 8947d0d commit 2138fbb

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
cmake_minimum_required(VERSION 3.0)
22

3-
project(error)
3+
project(errors)
44

55
# Import dependencies
66
include(cmake/CPM.cmake)
77
cpmaddpackage("gh:fmtlib/fmt#10.0.0")
88

99
# Build the main library
10-
add_library(error src/error.cpp)
11-
target_include_directories(error PUBLIC include)
12-
target_link_libraries(error PUBLIC fmt)
13-
target_compile_features(error PRIVATE cxx_std_20)
10+
add_library(errors src/error.cpp)
11+
target_include_directories(errors PUBLIC include)
12+
target_link_libraries(errors PUBLIC fmt)
13+
target_compile_features(errors PRIVATE cxx_std_20)
1414

1515
# Check if this project is the main project
1616
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
@@ -22,7 +22,7 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
2222
# Import Format.cmake to format source code
2323
if(CHECK_FORMAT)
2424
cpmaddpackage("gh:threeal/Format.cmake#auto-install-cmake-format")
25-
add_dependencies(error fix-format)
25+
add_dependencies(errors fix-format)
2626
endif()
2727

2828
if(BUILD_TESTING)
@@ -33,9 +33,9 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
3333
include("${Catch2_SOURCE_DIR}/extras/Catch.cmake")
3434

3535
# Build tests for the main library
36-
add_executable(error_test test/error_test.cpp)
37-
target_link_libraries(error_test PRIVATE error Catch2::Catch2WithMain)
38-
catch_discover_tests(error_test)
36+
add_executable(errors_test test/error_test.cpp)
37+
target_link_libraries(errors_test PRIVATE errors Catch2::Catch2WithMain)
38+
catch_discover_tests(errors_test)
3939
endif()
4040

4141
# Get all targets in this directory

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
subprocess.call('cmake .. -B ../build -D BUILD_DOCS=ON', shell=True)
1010
subprocess.call('cmake --build ../build --target docs', shell=True)
1111

12-
breathe_projects = {"error": "../build/docs"}
13-
breathe_default_project = "error"
12+
breathe_projects = {"errors": "../build/docs"}
13+
breathe_default_project = "errors"
1414

1515
html_theme = 'furo'
1616
html_static_path = ['_static']

0 commit comments

Comments
 (0)