Skip to content

Commit

Permalink
Fix test discovery (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Dec 16, 2024
1 parent 801ebc8 commit e5e2f10
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ if(BUILD_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/test/include
)
target_link_libraries(SleipnirTest PRIVATE Sleipnir Catch2::Catch2WithMain)
if(NOT CMAKE_TOOLCHAIN_FILE)
catch_discover_tests(SleipnirTest)
endif()
endif()

# Build examples and example tests
Expand Down Expand Up @@ -251,6 +254,9 @@ if(BUILD_EXAMPLES)
${example}Test
PRIVATE Sleipnir Catch2::Catch2WithMain
)
if(NOT CMAKE_TOOLCHAIN_FILE)
catch_discover_tests(${example}Test)
endif()
endif()
endforeach()
endif()
Expand Down

0 comments on commit e5e2f10

Please sign in to comment.