Skip to content

Commit e9c8103

Browse files
Enable CMake's CTest Functionality and Update FMT
- Enable the testing machinery and enumerate the tests using CMake - This enables testing using the CTest Command - CMakeLists.txt Cleanup - Change the fmt lib base branch which changed from master to main
1 parent e07ed95 commit e9c8103

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,16 @@ list( APPEND CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib )
4040
#
4141
if (NOT LAUNCHER_ONLY)
4242

43-
## Setup Dependencies
44-
include(dependencies.cmake)
43+
# Enable CMake's CTest Functionality
44+
#
45+
include(CTest)
4546

46-
## Compile Shaders
47+
# Setup Dependencies
48+
#
49+
include(dependencies.cmake)
4750

51+
# Compile Shaders
52+
#
4853
add_subdirectory (Resources)
4954

5055
# Core engine lib is here

ZEngine/tests/CMakeLists.txt

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

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

dependencies.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ FetchContent_Declare(
44
fmt
55
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
66
GIT_SHALLOW TRUE
7+
GIT_TAG main
78
)
89

910
FetchContent_Declare(

0 commit comments

Comments
 (0)