eive-obsw/unittest/rebootLogic/CMakeLists.txt
Robin Mueller 8e6d8a6fa8
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
use catch2 main
2022-02-28 16:05:32 +01:00

41 lines
925 B
CMake

cmake_minimum_required(VERSION 3.0.0)
project(reboot-logic VERSION 0.1.0)
include(CTest)
find_package(Catch2 3)
if(NOT Catch2_FOUND)
include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.0-preview4
)
FetchContent_MakeAvailable(Catch2)
#fixes regression -preview4, to be confirmed in later releases
set_target_properties(Catch2 PROPERTIES DEBUG_POSTFIX "")
endif()
enable_testing()
add_executable(reboot-logic main.cpp)
target_sources(reboot-logic PRIVATE
main.cpp
CoreController.cpp
SdCardManager.cpp
event.cpp
libxiphos.cpp
)
target_link_libraries(reboot-logic PRIVATE Catch2::Catch2WithMain)
target_include_directories(reboot-logic PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)