29 lines
636 B
CMake
29 lines
636 B
CMake
# Catch 2 is already loaded from the main CMakeLists.txt as a subdirectory
|
|
|
|
add_executable(testtests experiments/example-test.cpp)
|
|
target_link_libraries(testtests PRIVATE Catch2::Catch2WithMain)
|
|
|
|
|
|
# Firmware modules tests
|
|
file(GLOB_RECURSE FWMODULES_SOURCES
|
|
"${CMAKE_SOURCE_DIR}/floatpump/Modules/*.cpp"
|
|
)
|
|
|
|
add_executable(fwmodules
|
|
${FWMODULES_SOURCES}
|
|
modules.cpp
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(fwmodules PUBLIC
|
|
${CMAKE_SOURCE_DIR}/floatpump/Modules
|
|
)
|
|
|
|
target_link_libraries(fwmodules PRIVATE Catch2::Catch2WithMain)
|
|
|
|
# General catch configuration
|
|
include(CTest)
|
|
include(Catch)
|
|
|
|
catch_discover_tests(testtests) |