2022-07-19 17:34:21 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
|
|
|
|
# Set up Catch2 testing
|
2022-11-26 13:22:36 +00:00
|
|
|
list(APPEND CMAKE_MODULE_PATH "cmake")
|
2022-07-19 17:34:21 +00:00
|
|
|
enable_testing()
|
|
|
|
|
|
|
|
# Set up asset sourceset
|
2023-03-10 15:54:29 +00:00
|
|
|
FILE(GLOB_RECURSE SOURCES src/**.cpp src/**.h)
|
2022-07-19 17:34:21 +00:00
|
|
|
FILE(GLOB_RECURSE TESTS test/*.cpp)
|
|
|
|
|
2023-03-10 15:54:29 +00:00
|
|
|
include_directories(src/)
|
2022-07-19 17:34:21 +00:00
|
|
|
add_library(shadow-asset ${SOURCES})
|
|
|
|
|
|
|
|
# Set up test executable
|
|
|
|
add_executable(shadow-asset-test ${TESTS})
|
|
|
|
target_link_libraries(shadow-asset-test PRIVATE Catch2::Catch2 shadow-utils)
|
|
|
|
|
|
|
|
# Enable testing on the executable
|
2023-03-10 15:54:29 +00:00
|
|
|
#include(CTest)
|
|
|
|
#include(Catch2)
|
|
|
|
#catch_discover_tests(shadow-asset-test)
|