mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-15 18:38:23 +01:00
build: only fetch doctest if it is not present yet
This commit is contained in:
parent
25855da6b2
commit
3d80b7e02a
@ -1,17 +1,20 @@
|
|||||||
include(FetchContent)
|
find_library(DOCTEST_LIB doctest)
|
||||||
|
|
||||||
FetchContent_Declare(
|
if(NOT DOCTEST_LIB)
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
DocTest
|
DocTest
|
||||||
GIT_REPOSITORY https://github.com/doctest/doctest.git
|
GIT_REPOSITORY https://github.com/doctest/doctest.git
|
||||||
GIT_TAG v2.4.9
|
GIT_TAG v2.4.9)
|
||||||
)
|
|
||||||
|
|
||||||
FetchContent_MakeAvailable(DocTest)
|
FetchContent_MakeAvailable(DocTest)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(testTug setup.cpp testBoundaryCondition.cpp testDiffusion.cpp)
|
add_executable(testTug setup.cpp testBoundaryCondition.cpp testDiffusion.cpp)
|
||||||
target_link_libraries(testTug doctest tug)
|
target_link_libraries(testTug doctest tug)
|
||||||
|
|
||||||
add_custom_target(check
|
add_custom_target(
|
||||||
COMMAND $<TARGET_FILE:testTug>
|
check
|
||||||
DEPENDS testTug
|
COMMAND $<TARGET_FILE:testTug>
|
||||||
)
|
DEPENDS testTug)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user