cmake_minimum_required(VERSION 3.16) project(adc_sweep_shm_writer LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) add_library(adc_sweep_core src/sweep_core.cpp src/shm_stack.cpp src/device_discovery.cpp src/serial_port.cpp ) target_include_directories(adc_sweep_core PUBLIC include) target_compile_options(adc_sweep_core PRIVATE -Wall -Wextra -Wpedantic) add_executable(adc_sweep_shm_writer src/main.cpp) target_link_libraries(adc_sweep_shm_writer PRIVATE adc_sweep_core) add_executable(adc_sweep_shm_tests tests/test_sweep_core.cpp) target_link_libraries(adc_sweep_shm_tests PRIVATE adc_sweep_core) enable_testing() add_test(NAME adc_sweep_shm_tests COMMAND adc_sweep_shm_tests)