Skip to content

Commit aad6fa2

Browse files
committed
Removing submodule of Catch2. Opting for Cmake FetchContent
1 parent 91eab57 commit aad6fa2

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "third_party/Catch2"]
2-
path = third_party/Catch2
3-
url = https://github.com/catchorg/Catch2.git

test/CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
project(tests VERSION 0.1.0)
22

3+
# Download and build Catch2 test framework
4+
Include(FetchContent)
5+
FetchContent_Declare(
6+
Catch2
7+
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
8+
GIT_TAG v3.2.1
9+
)
10+
FetchContent_MakeAvailable(Catch2)
11+
312
list(APPEND TEST_SOURCES main.cpp
413
test_dbc.cpp
514
test_utils.cpp)
615

7-
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third_party/Catch2/single_include)
8-
916
add_executable(tests ${TEST_SOURCES} ${SOURCE})
17+
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain)
1018

1119
add_custom_target(test
1220
COMMAND ${PROJECT_NAME}

third_party/Catch2

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)