Skip to content

Commit

Permalink
Use include(CTest) which automatically invokes enable_testing()
Browse files Browse the repository at this point in the history
  • Loading branch information
rootkea committed Oct 13, 2023
1 parent 72ff97e commit 0af06ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ RemoteSystemsTempFiles/
CPack*
_CPack_Packages/
CTestTestfile.cmake
DartConfiguration.tcl
Testing/
install_manifest_Runtime.txt
*.deb
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ set_source_files_properties(${CMAKE_SOURCE_DIR}/src/cdogs/sys_config.h PROPERTIE
include_directories(src src/cdogs)

# Tests
enable_testing()
include(CTest)

add_subdirectory(src)

Expand Down
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ if(BUILD_EDITOR)
endif()
add_subdirectory(json)
add_subdirectory(proto)
add_subdirectory(tests)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()

set(CDOGS_SDL_SOURCES
ammo_menu.c
Expand Down

0 comments on commit 0af06ca

Please sign in to comment.