Files
recastnavigation/Tests/CMakeLists.txt
Graham Pentheny 996553fc5a Added unit tests file to match RecastRasterization.cpp. Moved rcAddSpan tests there.
Also added a bunch of new tests that should cover most cases.  The test that checks invalid spans is currently failing
2026-02-08 15:44:44 -05:00

31 lines
736 B
CMake

add_executable(Tests)
set_target_properties(Tests PROPERTIES
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF # Disable compiler-specific extensions
)
# Remove warnings-as-errors
if(MSVC)
target_compile_options(Tests PRIVATE /W3 /WX-)
else()
target_compile_options(Tests PRIVATE -Wno-error)
endif()
target_include_directories(Tests PRIVATE ./Contrib)
target_sources(Tests PRIVATE
Contrib/catch2/catch_amalgamated.cpp
Detour/Tests_Detour.cpp
DetourCrowd/Tests_DetourPathCorridor.cpp
Recast/Tests_Alloc.cpp
Recast/Tests_Recast.cpp
Recast/Tests_RecastFilter.cpp
Recast/Tests_RecastRasterization.cpp
)
target_link_libraries(Tests PRIVATE Recast Detour DetourCrowd)
add_test(NAME Tests COMMAND Tests)