Skip to content

Commit 04edf1e

Browse files
committed
Make project used forked doctest
1 parent 8dcb69a commit 04edf1e

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

script/ci_install_deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BUILD_TYPE=Debug
55

66
set -eux
77

8-
git clone https://github.com/onqtam/doctest -b 2.4.4 --depth 1
8+
git clone https://github.com/red0124/doctest -b master --depth 1
99

1010
cmake -S doctest -B doctest/build \
1111
-D CMAKE_BUILD_TYPE=${BUILD_TYPE} \

subprojects/doctest.wrap

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[wrap-git]
2-
url = https://github.com/onqtam/doctest
3-
revision = v2.4.9
2+
url = https://github.com/red0124/doctest
3+
revision = master

test/CMakeLists.txt

+11-9
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ project(ssp_tests CXX)
44

55
# ---- Dependencies ----
66

7-
set(SSP_INCLUDE_WITHOUT_SYSTEM YES
8-
CACHE INTERNAL
9-
"Turn the warning guard off to have errors appear in test builds"
10-
)
11-
127
include(FetchContent)
138
fetchcontent_declare(ssp SOURCE_DIR "${PROJECT_SOURCE_DIR}/..")
149
fetchcontent_makeavailable(ssp)
@@ -17,9 +12,16 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
1712
target_compile_options(ssp INTERFACE -Wall -Wextra)
1813
endif()
1914

20-
find_package(doctest 2.4.4 CONFIG REQUIRED)
21-
# for doctest_discover_tests
22-
include(doctest)
15+
include(FetchContent)
16+
fetchcontent_declare(
17+
DOCTEST
18+
GIT_REPOSITORY https://github.com/red0124/doctest
19+
GIT_TAG origin/master
20+
GIT_SHALLOW TRUE
21+
)
22+
23+
fetchcontent_makeavailable(DOCTEST)
24+
set(DOCTEST "${FETCHCONTENT_BASE_DIR}/doctest-src")
2325

2426
# ---- Test ----
2527

@@ -35,5 +37,5 @@ foreach(name IN ITEMS test_splitter test_parser test_converter test_extractions)
3537
"${name}"
3638
PRIVATE DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN CMAKE_GITHUB_CI
3739
)
38-
doctest_discover_tests("${name}")
40+
add_test(NAME "${name}" COMMAND "${name}")
3941
endforeach()

0 commit comments

Comments
 (0)