34 lines
542 B
CMake
34 lines
542 B
CMake
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
add_library(utility STATIC
|
|
Src/utility_itmlogger.cpp
|
|
)
|
|
|
|
add_library(skullc::utility ALIAS utility)
|
|
|
|
target_include_directories(utility
|
|
PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Inc
|
|
)
|
|
|
|
if(WITH_TESTS)
|
|
|
|
find_package(Catch2 REQUIRED)
|
|
|
|
add_executable(utility-tests
|
|
Tests/main.cpp
|
|
Tests/ringbuffer.cpp
|
|
)
|
|
|
|
target_link_libraries(utility-tests
|
|
PUBLIC
|
|
skullc::utility
|
|
Catch2::Catch2
|
|
)
|
|
|
|
include(CTest)
|
|
include(Catch)
|
|
catch_discover_tests(utility-tests)
|
|
|
|
endif()
|