17 lines
490 B
CMake
17 lines
490 B
CMake
cmake_minimum_required(VERSION 3.20)
|
|
project(pico-cpp LANGUAGES C CXX ASM)
|
|
if (DEFINED PICO_SDK_VERSION_STRING)
|
|
pico_sdk_init()
|
|
endif()
|
|
|
|
add_library(warnings INTERFACE)
|
|
target_compile_options(warnings INTERFACE "-Wall" "-Wextra" "-Wno-psabi")
|
|
|
|
add_executable(main "main.cpp")
|
|
target_compile_features(main PRIVATE cxx_std_23)
|
|
target_link_libraries(main PRIVATE warnings pico_stdlib hardware_adc)
|
|
pico_enable_stdio_usb(main 1)
|
|
pico_enable_stdio_uart(main 0)
|
|
pico_add_extra_outputs(main)
|
|
|