Skip to content

Commit

Permalink
Run 1x doctests using cmake ctest
Browse files Browse the repository at this point in the history
  • Loading branch information
grunt-lucas committed Oct 20, 2024
1 parent f161e18 commit 4c70d2e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ cmake_minimum_required(VERSION 3.10)

project(Porytiles CXX)

# Test discovery so ctest can work
enable_testing()

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_VERBOSE_MAKEFILE on)
# set(CMAKE_VERBOSE_MAKEFILE on)

add_subdirectory(Porytiles-1.x)
2 changes: 1 addition & 1 deletion Porytiles-1.x/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project(Porytiles1x CXX)

add_subdirectory(lib)
add_subdirectory(test)
add_subdirectory(tests)
add_subdirectory(cli)
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ project(Porytiles1xTestSuite CXX)
add_executable(Porytiles1xTestSuite tests.cpp)
target_link_libraries(Porytiles1xTestSuite PRIVATE Porytiles1xLib)
target_include_directories(Porytiles1xTestSuite PRIVATE ${PROJECT_SOURCE_DIR}/../vendor/doctest-2.4.11)

# Add the test suite to a ctest configuration
add_test(NAME All1xPorytilesTests COMMAND $<TARGET_FILE:Porytiles1xTestSuite> WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
File renamed without changes.

0 comments on commit 4c70d2e

Please sign in to comment.