mirror of
https://github.com/slendidev/smath.git
synced 2025-12-14 13:19:51 +02:00
@@ -67,13 +67,17 @@ endif()
|
||||
if(BUILD_TESTS)
|
||||
enable_testing()
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
googletest
|
||||
URL https://github.com/google/googletest/archive/refs/tags/v1.15.2.zip
|
||||
)
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
FetchContent_MakeAvailable(googletest)
|
||||
find_package(GTest QUIET)
|
||||
|
||||
if(NOT GTest_FOUND)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
googletest
|
||||
URL https://github.com/google/googletest/archive/refs/tags/v1.15.2.zip
|
||||
)
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
FetchContent_MakeAvailable(googletest)
|
||||
endif()
|
||||
|
||||
file(GLOB TEST_SOURCES "${CMAKE_SOURCE_DIR}/tests/*.cpp")
|
||||
|
||||
@@ -86,3 +90,4 @@ if(BUILD_TESTS)
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(smath_tests)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user