1
1
cmake_minimum_required (VERSION 3.0 )
2
2
3
- project (error )
3
+ project (errors )
4
4
5
5
# Import dependencies
6
6
include (cmake/CPM.cmake )
7
7
cpmaddpackage ("gh:fmtlib/fmt#10.0.0" )
8
8
9
9
# 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 )
14
14
15
15
# Check if this project is the main project
16
16
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR )
@@ -22,7 +22,7 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
22
22
# Import Format.cmake to format source code
23
23
if (CHECK_FORMAT )
24
24
cpmaddpackage ("gh:threeal/Format.cmake#auto-install-cmake-format" )
25
- add_dependencies (error fix-format )
25
+ add_dependencies (errors fix-format )
26
26
endif ()
27
27
28
28
if (BUILD_TESTING )
@@ -33,9 +33,9 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
33
33
include ("${Catch2_SOURCE_DIR} /extras/Catch.cmake" )
34
34
35
35
# 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 )
39
39
endif ()
40
40
41
41
# Get all targets in this directory
0 commit comments