31 lines
670 B
CMake
31 lines
670 B
CMake
set(CMAKE_CXX_STANDARD 17)
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
googletest
|
|
URL https://github.com/google/googletest/archive/refs/tags/v1.15.0.zip
|
|
DOWNLOAD_EXTRACT_TIMESTAMP true
|
|
)
|
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
|
FetchContent_MakeAvailable(googletest)
|
|
|
|
enable_testing()
|
|
|
|
file(GLOB SRC
|
|
"SaveMapTest.cpp"
|
|
"ObjectPtrTest.cpp"
|
|
|
|
"${PROJECT_SOURCE_DIR}/Core/Game/SaveMap/SaveMap.cpp"
|
|
"${PROJECT_SOURCE_DIR}/Core/Types/object_ptr.cpp"
|
|
)
|
|
|
|
add_executable(Tests ${SRC})
|
|
target_link_libraries(Tests PRIVATE
|
|
GTest::gtest_main
|
|
)
|
|
target_include_directories(Tests PRIVATE
|
|
${PROJECT_SOURCE_DIR}/Core
|
|
)
|
|
|
|
|
|
include(GoogleTest)
|
|
gtest_discover_tests(Tests) |