mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 04:55:20 +01:00
Make project used forked doctest
This commit is contained in:
parent
8dcb69aa2c
commit
04edf1e532
@ -5,7 +5,7 @@ BUILD_TYPE=Debug
|
|||||||
|
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
git clone https://github.com/onqtam/doctest -b 2.4.4 --depth 1
|
git clone https://github.com/red0124/doctest -b master --depth 1
|
||||||
|
|
||||||
cmake -S doctest -B doctest/build \
|
cmake -S doctest -B doctest/build \
|
||||||
-D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
-D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
[wrap-git]
|
[wrap-git]
|
||||||
url = https://github.com/onqtam/doctest
|
url = https://github.com/red0124/doctest
|
||||||
revision = v2.4.9
|
revision = master
|
||||||
|
@ -4,11 +4,6 @@ project(ssp_tests CXX)
|
|||||||
|
|
||||||
# ---- Dependencies ----
|
# ---- Dependencies ----
|
||||||
|
|
||||||
set(SSP_INCLUDE_WITHOUT_SYSTEM YES
|
|
||||||
CACHE INTERNAL
|
|
||||||
"Turn the warning guard off to have errors appear in test builds"
|
|
||||||
)
|
|
||||||
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
fetchcontent_declare(ssp SOURCE_DIR "${PROJECT_SOURCE_DIR}/..")
|
fetchcontent_declare(ssp SOURCE_DIR "${PROJECT_SOURCE_DIR}/..")
|
||||||
fetchcontent_makeavailable(ssp)
|
fetchcontent_makeavailable(ssp)
|
||||||
@ -17,9 +12,16 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|||||||
target_compile_options(ssp INTERFACE -Wall -Wextra)
|
target_compile_options(ssp INTERFACE -Wall -Wextra)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(doctest 2.4.4 CONFIG REQUIRED)
|
include(FetchContent)
|
||||||
# for doctest_discover_tests
|
fetchcontent_declare(
|
||||||
include(doctest)
|
DOCTEST
|
||||||
|
GIT_REPOSITORY https://github.com/red0124/doctest
|
||||||
|
GIT_TAG origin/master
|
||||||
|
GIT_SHALLOW TRUE
|
||||||
|
)
|
||||||
|
|
||||||
|
fetchcontent_makeavailable(DOCTEST)
|
||||||
|
set(DOCTEST "${FETCHCONTENT_BASE_DIR}/doctest-src")
|
||||||
|
|
||||||
# ---- Test ----
|
# ---- Test ----
|
||||||
|
|
||||||
@ -35,5 +37,5 @@ foreach(name IN ITEMS test_splitter test_parser test_converter test_extractions)
|
|||||||
"${name}"
|
"${name}"
|
||||||
PRIVATE DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN CMAKE_GITHUB_CI
|
PRIVATE DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN CMAKE_GITHUB_CI
|
||||||
)
|
)
|
||||||
doctest_discover_tests("${name}")
|
add_test(NAME "${name}" COMMAND "${name}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
Loading…
Reference in New Issue
Block a user