Skip to content

Commit 6e520f7

Browse files
use CTest to discover Google Tests
1 parent 34b9e4b commit 6e520f7

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ endif()
3636

3737
list( APPEND CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib )
3838

39+
40+
include(CTest)
41+
3942
# Externals dependencies
4043
#
4144
if (NOT LAUNCHER_ONLY)

ZEngine/tests/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ set_target_properties(ZEngineTests PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREF
1717

1818
install(TARGETS ZEngineTests
1919
RUNTIME DESTINATION tests)
20+
21+
include(GoogleTest)
22+
23+
gtest_discover_tests(ZEngineTests)

dependencies.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FetchContent_Declare(
44
fmt
55
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
66
GIT_SHALLOW TRUE
7-
)
7+
)
88

99
FetchContent_Declare(
1010
imgui

0 commit comments

Comments
 (0)