diff --git a/CMakeLists.txt b/CMakeLists.txt index f154ba25d..597cb3e57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,19 +1,10 @@ cmake_minimum_required(VERSION 3.12) -if (NOT CMAKE_PROJECT_NAME) - # Pull in SDK (must be before project) - include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake) - include(${CMAKE_CURRENT_LIST_DIR}/pico_extras_import_optional.cmake) +# Pull in SDK (must be before project) +include(pico_sdk_import.cmake) +include(pico_extras_import_optional.cmake) - pico_is_top_level_project(PICO_EXAMPLES_TOP_LEVEL_PROJECT) - - if (PICO_EXAMPLES_TOP_LEVEL_PROJECT) - project(pico_examples C CXX ASM) - else() - # Go back to individual example for project - return() - endif() -endif() +project(pico_examples C CXX ASM) set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) @@ -22,7 +13,7 @@ if (PICO_SDK_VERSION_STRING VERSION_LESS "2.1.0") message(FATAL_ERROR "Raspberry Pi Pico SDK version 2.1.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}") endif() -set(PICO_EXAMPLES_PATH ${CMAKE_CURRENT_LIST_DIR}) +set(PICO_EXAMPLES_PATH ${PROJECT_SOURCE_DIR}) # If you want debug output from USB (pass -DPICO_STDIO_USB=1) this ensures you don't lose any debug output while USB is set up if (NOT DEFINED PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS) @@ -32,7 +23,7 @@ endif() # Initialize the SDK pico_sdk_init() -include(${CMAKE_CURRENT_LIST_DIR}/example_auto_set_url.cmake) +include(example_auto_set_url.cmake) function(add_subdirectory_exclude_platforms NAME) if (ARGN) @@ -51,6 +42,13 @@ function(add_subdirectory_exclude_platforms NAME) add_subdirectory(${NAME}) endfunction() +# Add blink example +add_subdirectory_exclude_platforms(blink) +add_subdirectory_exclude_platforms(blink_simple) + +# Add hello world example +add_subdirectory_exclude_platforms(hello_world) + add_compile_options(-Wall -Wno-format # int != int32_t as far as the compiler is concerned because gcc has int32_t as long int -Wno-unused-function # we have some for the docs that aren't called @@ -59,43 +57,34 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU") add_compile_options(-Wno-maybe-uninitialized) endif() -if (PICO_EXAMPLES_TOP_LEVEL_PROJECT) - # Add blink example - add_subdirectory_exclude_platforms(blink) - add_subdirectory_exclude_platforms(blink_simple) - - # Add hello world example - add_subdirectory_exclude_platforms(hello_world) - - # Hardware-specific examples in subdirectories: - add_subdirectory(adc) - add_subdirectory(binary_info) - add_subdirectory(bootloaders) - add_subdirectory(clocks) - add_subdirectory(cmake) - add_subdirectory(dcp) - add_subdirectory(divider) - add_subdirectory(dma) - add_subdirectory(flash) - add_subdirectory(gpio) - add_subdirectory(hstx) - add_subdirectory(i2c) - add_subdirectory(interp) - add_subdirectory(multicore) - add_subdirectory(otp) - add_subdirectory(picoboard) - add_subdirectory(pico_w) - add_subdirectory(pio) - add_subdirectory(pwm) - add_subdirectory(reset) - add_subdirectory(rtc) - add_subdirectory(spi) - add_subdirectory(system) - add_subdirectory(timer) - add_subdirectory(uart) - add_subdirectory(universal) - add_subdirectory(usb) - add_subdirectory(watchdog) - add_subdirectory(sha) - add_subdirectory(freertos) -endif() +# Hardware-specific examples in subdirectories: +add_subdirectory(adc) +add_subdirectory(binary_info) +add_subdirectory(bootloaders) +add_subdirectory(clocks) +add_subdirectory(cmake) +add_subdirectory(dcp) +add_subdirectory(divider) +add_subdirectory(dma) +add_subdirectory(flash) +add_subdirectory(gpio) +add_subdirectory(hstx) +add_subdirectory(i2c) +add_subdirectory(interp) +add_subdirectory(multicore) +add_subdirectory(otp) +add_subdirectory(picoboard) +add_subdirectory(pico_w) +add_subdirectory(pio) +add_subdirectory(pwm) +add_subdirectory(reset) +add_subdirectory(rtc) +add_subdirectory(spi) +add_subdirectory(system) +add_subdirectory(timer) +add_subdirectory(uart) +add_subdirectory(universal) +add_subdirectory(usb) +add_subdirectory(watchdog) +add_subdirectory(sha) +add_subdirectory(freertos) diff --git a/adc/adc_console/CMakeLists.txt b/adc/adc_console/CMakeLists.txt index cad5a27db..944a93d2d 100644 --- a/adc/adc_console/CMakeLists.txt +++ b/adc/adc_console/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(adc_console C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(adc_console adc_console.c ) diff --git a/adc/dma_capture/CMakeLists.txt b/adc/dma_capture/CMakeLists.txt index 58573832b..ff965e9db 100644 --- a/adc/dma_capture/CMakeLists.txt +++ b/adc/dma_capture/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(dma_capture C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(adc_dma_capture dma_capture.c ) diff --git a/adc/hello_adc/CMakeLists.txt b/adc/hello_adc/CMakeLists.txt index 47b898fe4..186318246 100644 --- a/adc/hello_adc/CMakeLists.txt +++ b/adc/hello_adc/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_adc C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_adc hello_adc.c ) diff --git a/adc/joystick_display/CMakeLists.txt b/adc/joystick_display/CMakeLists.txt index ff7aa37eb..96bb475ad 100644 --- a/adc/joystick_display/CMakeLists.txt +++ b/adc/joystick_display/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(joystick_display C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(joystick_display joystick_display.c ) diff --git a/adc/microphone_adc/CMakeLists.txt b/adc/microphone_adc/CMakeLists.txt index 6f7282515..87f2c4029 100644 --- a/adc/microphone_adc/CMakeLists.txt +++ b/adc/microphone_adc/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(microphone_adc C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(microphone_adc microphone_adc.c ) diff --git a/adc/onboard_temperature/CMakeLists.txt b/adc/onboard_temperature/CMakeLists.txt index 464dd0c48..1557ed234 100644 --- a/adc/onboard_temperature/CMakeLists.txt +++ b/adc/onboard_temperature/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(onboard_temperature C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(onboard_temperature onboard_temperature.c) target_link_libraries(onboard_temperature pico_stdlib hardware_adc) diff --git a/adc/read_vsys/CMakeLists.txt b/adc/read_vsys/CMakeLists.txt index 404d701e2..67535bd72 100644 --- a/adc/read_vsys/CMakeLists.txt +++ b/adc/read_vsys/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(read_vsys C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_library(power_status_adc INTERFACE) target_sources(power_status_adc INTERFACE ${CMAKE_CURRENT_LIST_DIR}/power_status.c diff --git a/binary_info/blink_any/CMakeLists.txt b/binary_info/blink_any/CMakeLists.txt index df21f0747..de0401993 100644 --- a/binary_info/blink_any/CMakeLists.txt +++ b/binary_info/blink_any/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(blink_any C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (NOT PICO_CYW43_SUPPORTED) message("Only building blink_any for non W boards as PICO_CYW43_SUPPORTED is not set") endif() diff --git a/binary_info/hello_anything/CMakeLists.txt b/binary_info/hello_anything/CMakeLists.txt index 91d49f54b..13aa84380 100644 --- a/binary_info/hello_anything/CMakeLists.txt +++ b/binary_info/hello_anything/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_anything C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (TARGET tinyusb_device) add_executable(hello_anything hello_anything.c diff --git a/blink/CMakeLists.txt b/blink/CMakeLists.txt index dba6bd516..6308572d4 100644 --- a/blink/CMakeLists.txt +++ b/blink/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../CMakeLists.txt) - project(blink C CXX ASM) - include(../CMakeLists.txt) -endif() - add_executable(blink blink.c ) diff --git a/blink_simple/CMakeLists.txt b/blink_simple/CMakeLists.txt index a26946099..0d7c0cb44 100644 --- a/blink_simple/CMakeLists.txt +++ b/blink_simple/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../CMakeLists.txt) - project(blink_simple C CXX ASM) - include(../CMakeLists.txt) -endif() - add_executable(blink_simple blink_simple.c ) diff --git a/bootloaders/encrypted/CMakeLists.txt b/bootloaders/encrypted/CMakeLists.txt index ce4b8a4c8..f29f0efe2 100644 --- a/bootloaders/encrypted/CMakeLists.txt +++ b/bootloaders/encrypted/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(encrypted C CXX ASM) - include(../../CMakeLists.txt) -endif() - # Encrypted Bootloader add_executable(enc_bootloader enc_bootloader.c diff --git a/clocks/detached_clk_peri/CMakeLists.txt b/clocks/detached_clk_peri/CMakeLists.txt index 1f5389af2..d3dc75e01 100644 --- a/clocks/detached_clk_peri/CMakeLists.txt +++ b/clocks/detached_clk_peri/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(detached_clk_peri C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(clocks_detached_clk_peri detached_clk_peri.c ) diff --git a/clocks/hello_48MHz/CMakeLists.txt b/clocks/hello_48MHz/CMakeLists.txt index d51edd770..3ca96fc52 100644 --- a/clocks/hello_48MHz/CMakeLists.txt +++ b/clocks/hello_48MHz/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_48MHz C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_48MHz hello_48MHz.c ) diff --git a/clocks/hello_gpout/CMakeLists.txt b/clocks/hello_gpout/CMakeLists.txt index 36297bf0d..057ec3c5f 100644 --- a/clocks/hello_gpout/CMakeLists.txt +++ b/clocks/hello_gpout/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_gpout C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_gpout hello_gpout.c ) diff --git a/clocks/hello_resus/CMakeLists.txt b/clocks/hello_resus/CMakeLists.txt index 57ab28f78..9d4522e94 100644 --- a/clocks/hello_resus/CMakeLists.txt +++ b/clocks/hello_resus/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_resus C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_resus hello_resus.c ) diff --git a/cmake/build_variants/CMakeLists.txt b/cmake/build_variants/CMakeLists.txt index fb5b7132d..f40f80625 100644 --- a/cmake/build_variants/CMakeLists.txt +++ b/cmake/build_variants/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(build_variants C CXX ASM) - include(../../CMakeLists.txt) -endif() - # 1 Create an INTERFACE library aggregating all the common parts of the application add_library(common_stuff INTERFACE) diff --git a/dcp/hello_dcp/CMakeLists.txt b/dcp/hello_dcp/CMakeLists.txt index 6e5167bda..2235fb271 100644 --- a/dcp/hello_dcp/CMakeLists.txt +++ b/dcp/hello_dcp/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_dcp C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_dcp hello_dcp.c dcp_examples.S diff --git a/divider/CMakeLists.txt b/divider/CMakeLists.txt index fd6a44b7b..d5ad0ac8e 100644 --- a/divider/CMakeLists.txt +++ b/divider/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../CMakeLists.txt) - project(divider C CXX ASM) - include(../CMakeLists.txt) -endif() - if (TARGET hardware_divider) add_executable(hello_divider hello_divider.c diff --git a/dma/channel_irq/CMakeLists.txt b/dma/channel_irq/CMakeLists.txt index 36b481fbf..25dc64e20 100644 --- a/dma/channel_irq/CMakeLists.txt +++ b/dma/channel_irq/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(channel_irq C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(dma_channel_irq channel_irq.c ) diff --git a/dma/control_blocks/CMakeLists.txt b/dma/control_blocks/CMakeLists.txt index a39ccf5e4..b551c7bfe 100644 --- a/dma/control_blocks/CMakeLists.txt +++ b/dma/control_blocks/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(control_blocks C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(dma_control_blocks control_blocks.c ) diff --git a/dma/hello_dma/CMakeLists.txt b/dma/hello_dma/CMakeLists.txt index 8950dbab5..b513a2eb8 100644 --- a/dma/hello_dma/CMakeLists.txt +++ b/dma/hello_dma/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_dma C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_dma hello_dma.c ) diff --git a/dma/sniff_crc/CMakeLists.txt b/dma/sniff_crc/CMakeLists.txt index 8da26fa47..6f72b5100 100644 --- a/dma/sniff_crc/CMakeLists.txt +++ b/dma/sniff_crc/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(sniff_crc C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(sniff_crc sniff_crc.c ) diff --git a/flash/cache_perfctr/CMakeLists.txt b/flash/cache_perfctr/CMakeLists.txt index ab18b694e..2d065a28e 100644 --- a/flash/cache_perfctr/CMakeLists.txt +++ b/flash/cache_perfctr/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(cache_perfctr C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(flash_cache_perfctr flash_cache_perfctr.c ) diff --git a/flash/nuke/CMakeLists.txt b/flash/nuke/CMakeLists.txt index 0c84368de..c8ae47a94 100644 --- a/flash/nuke/CMakeLists.txt +++ b/flash/nuke/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(nuke C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(flash_nuke nuke.c ) diff --git a/flash/program/CMakeLists.txt b/flash/program/CMakeLists.txt index 00b7e41c4..a17bb0ec0 100644 --- a/flash/program/CMakeLists.txt +++ b/flash/program/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(program C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(flash_program flash_program.c ) diff --git a/flash/runtime_flash_permissions/CMakeLists.txt b/flash/runtime_flash_permissions/CMakeLists.txt index 1b27ff336..3eb6bdd94 100644 --- a/flash/runtime_flash_permissions/CMakeLists.txt +++ b/flash/runtime_flash_permissions/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(runtime_flash_permissions C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(runtime_flash_permissions runtime_flash_permissions.c ) diff --git a/flash/ssi_dma/CMakeLists.txt b/flash/ssi_dma/CMakeLists.txt index c2d3d98d7..965cc6098 100644 --- a/flash/ssi_dma/CMakeLists.txt +++ b/flash/ssi_dma/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(ssi_dma C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(flash_ssi_dma flash_ssi_dma.c ) diff --git a/flash/xip_stream/CMakeLists.txt b/flash/xip_stream/CMakeLists.txt index ff7e5b6d2..bd8b6dd03 100644 --- a/flash/xip_stream/CMakeLists.txt +++ b/flash/xip_stream/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(xip_stream C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(flash_xip_stream flash_xip_stream.c ) diff --git a/freertos/hello_freertos/CMakeLists.txt b/freertos/hello_freertos/CMakeLists.txt index d1f7e556a..1da0ce773 100644 --- a/freertos/hello_freertos/CMakeLists.txt +++ b/freertos/hello_freertos/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_freertos C CXX ASM) - include(../../CMakeLists.txt) -endif() - set(TARGET_NAME hello_freertos1) add_executable(${TARGET_NAME} hello_freertos.c diff --git a/gpio/dht_sensor/CMakeLists.txt b/gpio/dht_sensor/CMakeLists.txt index 302469cfd..33c72ea99 100644 --- a/gpio/dht_sensor/CMakeLists.txt +++ b/gpio/dht_sensor/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(dht_sensor C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(dht dht.c ) diff --git a/gpio/hello_7segment/CMakeLists.txt b/gpio/hello_7segment/CMakeLists.txt index e24fd9d70..d0ce3aecf 100644 --- a/gpio/hello_7segment/CMakeLists.txt +++ b/gpio/hello_7segment/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_7segment C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_7segment hello_7segment.c ) diff --git a/gpio/hello_gpio_irq/CMakeLists.txt b/gpio/hello_gpio_irq/CMakeLists.txt index 5bd7ffe16..e514cfbea 100644 --- a/gpio/hello_gpio_irq/CMakeLists.txt +++ b/gpio/hello_gpio_irq/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_gpio_irq C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_gpio_irq hello_gpio_irq.c ) diff --git a/hello_world/serial/CMakeLists.txt b/hello_world/serial/CMakeLists.txt index ca99bd5a2..7be690122 100644 --- a/hello_world/serial/CMakeLists.txt +++ b/hello_world/serial/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(serial C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_serial hello_serial.c ) diff --git a/hello_world/usb/CMakeLists.txt b/hello_world/usb/CMakeLists.txt index 3a0c43126..aa176eb93 100644 --- a/hello_world/usb/CMakeLists.txt +++ b/hello_world/usb/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(usb C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (TARGET tinyusb_device) add_executable(hello_usb hello_usb.c diff --git a/hstx/dvi_out_hstx_encoder/CMakeLists.txt b/hstx/dvi_out_hstx_encoder/CMakeLists.txt index a6875b455..4c9b3a345 100644 --- a/hstx/dvi_out_hstx_encoder/CMakeLists.txt +++ b/hstx/dvi_out_hstx_encoder/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(dvi_out_hstx_encoder C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(dvi_out_hstx_encoder dvi_out_hstx_encoder.c ) diff --git a/hstx/spi_lcd/CMakeLists.txt b/hstx/spi_lcd/CMakeLists.txt index 5f76b5330..7d8551ac0 100644 --- a/hstx/spi_lcd/CMakeLists.txt +++ b/hstx/spi_lcd/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(spi_lcd C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hstx_spi_lcd hstx_spi_lcd.c ) diff --git a/i2c/bmp280_i2c/CMakeLists.txt b/i2c/bmp280_i2c/CMakeLists.txt index 4ac64f2b8..c63a7baba 100644 --- a/i2c/bmp280_i2c/CMakeLists.txt +++ b/i2c/bmp280_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(bmp280_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(bmp280_i2c bmp280_i2c.c ) diff --git a/i2c/bus_scan/CMakeLists.txt b/i2c/bus_scan/CMakeLists.txt index a808e0a34..662cfe61b 100644 --- a/i2c/bus_scan/CMakeLists.txt +++ b/i2c/bus_scan/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(bus_scan C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(i2c_bus_scan bus_scan.c ) diff --git a/i2c/ht16k33_i2c/CMakeLists.txt b/i2c/ht16k33_i2c/CMakeLists.txt index 567bdebab..b9b1110fb 100644 --- a/i2c/ht16k33_i2c/CMakeLists.txt +++ b/i2c/ht16k33_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(ht16k33_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(ht16k33_i2c ht16k33_i2c.c ) diff --git a/i2c/lcd_1602_i2c/CMakeLists.txt b/i2c/lcd_1602_i2c/CMakeLists.txt index 5a2f0318c..c6aad7ae1 100644 --- a/i2c/lcd_1602_i2c/CMakeLists.txt +++ b/i2c/lcd_1602_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(lcd_1602_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(lcd_1602_i2c lcd_1602_i2c.c ) diff --git a/i2c/lis3dh_i2c/CMakeLists.txt b/i2c/lis3dh_i2c/CMakeLists.txt index b60d4d5d4..0b23c9043 100644 --- a/i2c/lis3dh_i2c/CMakeLists.txt +++ b/i2c/lis3dh_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(lis3dh_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(lis3dh_i2c lis3dh_i2c.c ) diff --git a/i2c/mcp9808_i2c/CMakeLists.txt b/i2c/mcp9808_i2c/CMakeLists.txt index 754c4226c..4ee1b4975 100644 --- a/i2c/mcp9808_i2c/CMakeLists.txt +++ b/i2c/mcp9808_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mcp9808_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(mcp9808_i2c mcp9808_i2c.c ) diff --git a/i2c/mma8451_i2c/CMakeLists.txt b/i2c/mma8451_i2c/CMakeLists.txt index e570d9567..e3c1084d1 100644 --- a/i2c/mma8451_i2c/CMakeLists.txt +++ b/i2c/mma8451_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mma8451_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(mma8451_i2c mma8451_i2c.c ) diff --git a/i2c/mpl3115a2_i2c/CMakeLists.txt b/i2c/mpl3115a2_i2c/CMakeLists.txt index 62a54af2a..db9a5d7b6 100644 --- a/i2c/mpl3115a2_i2c/CMakeLists.txt +++ b/i2c/mpl3115a2_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mpl3115a2_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(mpl3115a2_i2c mpl3115a2_i2c.c ) diff --git a/i2c/mpu6050_i2c/CMakeLists.txt b/i2c/mpu6050_i2c/CMakeLists.txt index 0f981b1b6..83be3d51e 100644 --- a/i2c/mpu6050_i2c/CMakeLists.txt +++ b/i2c/mpu6050_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mpu6050_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(mpu6050_i2c mpu6050_i2c.c ) diff --git a/i2c/pa1010d_i2c/CMakeLists.txt b/i2c/pa1010d_i2c/CMakeLists.txt index 60e6555b0..b04fac23f 100644 --- a/i2c/pa1010d_i2c/CMakeLists.txt +++ b/i2c/pa1010d_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(pa1010d_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pa1010d_i2c pa1010d_i2c.c ) diff --git a/i2c/pcf8523_i2c/CMakeLists.txt b/i2c/pcf8523_i2c/CMakeLists.txt index 4279fa82f..8d47635b3 100644 --- a/i2c/pcf8523_i2c/CMakeLists.txt +++ b/i2c/pcf8523_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(pcf8523_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pcf8523_i2c pcf8523_i2c.c ) diff --git a/i2c/slave_mem_i2c/CMakeLists.txt b/i2c/slave_mem_i2c/CMakeLists.txt index c8ea02cb1..449744447 100644 --- a/i2c/slave_mem_i2c/CMakeLists.txt +++ b/i2c/slave_mem_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(slave_mem_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(slave_mem_i2c slave_mem_i2c.c ) diff --git a/i2c/ssd1306_i2c/CMakeLists.txt b/i2c/ssd1306_i2c/CMakeLists.txt index fde9d06d5..25fabace1 100644 --- a/i2c/ssd1306_i2c/CMakeLists.txt +++ b/i2c/ssd1306_i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(ssd1306_i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(ssd1306_i2c ssd1306_i2c.c ) diff --git a/interp/hello_interp/CMakeLists.txt b/interp/hello_interp/CMakeLists.txt index 5eff3426b..05b176da7 100644 --- a/interp/hello_interp/CMakeLists.txt +++ b/interp/hello_interp/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_interp C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (TARGET hardware_interp) add_executable(hello_interp hello_interp.c diff --git a/multicore/hello_multicore/CMakeLists.txt b/multicore/hello_multicore/CMakeLists.txt index a124eb5b1..540d67948 100644 --- a/multicore/hello_multicore/CMakeLists.txt +++ b/multicore/hello_multicore/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_multicore C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_multicore multicore.c ) diff --git a/multicore/multicore_doorbell/CMakeLists.txt b/multicore/multicore_doorbell/CMakeLists.txt index 5f3147cbd..8e2493e18 100644 --- a/multicore/multicore_doorbell/CMakeLists.txt +++ b/multicore/multicore_doorbell/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(multicore_doorbell C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(multicore_doorbell multicore_doorbell.c ) diff --git a/multicore/multicore_fifo_irqs/CMakeLists.txt b/multicore/multicore_fifo_irqs/CMakeLists.txt index fc2d1e22b..aa1097e14 100644 --- a/multicore/multicore_fifo_irqs/CMakeLists.txt +++ b/multicore/multicore_fifo_irqs/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(multicore_fifo_irqs C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(multicore_fifo_irqs multicore_fifo_irqs.c ) diff --git a/multicore/multicore_runner/CMakeLists.txt b/multicore/multicore_runner/CMakeLists.txt index d36df9010..a96db31e0 100644 --- a/multicore/multicore_runner/CMakeLists.txt +++ b/multicore/multicore_runner/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(multicore_runner C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(multicore_runner multicore_runner.c ) diff --git a/multicore/multicore_runner_queue/CMakeLists.txt b/multicore/multicore_runner_queue/CMakeLists.txt index cde9bcfb3..c35368a78 100644 --- a/multicore/multicore_runner_queue/CMakeLists.txt +++ b/multicore/multicore_runner_queue/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(multicore_runner_queue C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(multicore_runner_queue multicore_runner_queue.c ) diff --git a/otp/hello_otp/CMakeLists.txt b/otp/hello_otp/CMakeLists.txt index b52be6a81..43397cd3e 100644 --- a/otp/hello_otp/CMakeLists.txt +++ b/otp/hello_otp/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_otp C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_otp hello_otp.c ) diff --git a/pico_w/bt/CMakeLists.txt b/pico_w/bt/CMakeLists.txt index 954080892..e14345398 100644 --- a/pico_w/bt/CMakeLists.txt +++ b/pico_w/bt/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(bt C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_subdirectory(standalone) set(BTSTACK_ROOT ${PICO_SDK_PATH}/lib/btstack) diff --git a/pico_w/bt/standalone/CMakeLists.txt b/pico_w/bt/standalone/CMakeLists.txt index 87f278362..28d20b687 100644 --- a/pico_w/bt/standalone/CMakeLists.txt +++ b/pico_w/bt/standalone/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(standalone C CXX ASM) - include(../../../CMakeLists.txt) -endif() - # Standalone example that reads from the on board temperature sensor and sends notifications via BLE # Flashes slowly each second to show it's running add_executable(picow_ble_temp_sensor diff --git a/pico_w/wifi/access_point/CMakeLists.txt b/pico_w/wifi/access_point/CMakeLists.txt index 77d1676ce..6bc0a2eb4 100644 --- a/pico_w/wifi/access_point/CMakeLists.txt +++ b/pico_w/wifi/access_point/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(access_point C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_access_point_background picow_access_point.c dhcpserver/dhcpserver.c diff --git a/pico_w/wifi/blink/CMakeLists.txt b/pico_w/wifi/blink/CMakeLists.txt index 60661477e..2b1e6bfd3 100644 --- a/pico_w/wifi/blink/CMakeLists.txt +++ b/pico_w/wifi/blink/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(blink C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_blink picow_blink.c ) diff --git a/pico_w/wifi/freertos/http_client/CMakeLists.txt b/pico_w/wifi/freertos/http_client/CMakeLists.txt index aa18264dc..2010621a9 100644 --- a/pico_w/wifi/freertos/http_client/CMakeLists.txt +++ b/pico_w/wifi/freertos/http_client/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../../CMakeLists.txt) - project(http_client C CXX ASM) - include(../../../../CMakeLists.txt) -endif() - # This example is disabled as mbedtls uses too much stack, and Freertos SMP is problematic with # pico_cyw43_arch_lwip_threadsafe_background (nosys), where WiFi and LwIP activity is performed in an IRQ. # Prefer to use pico_cyw43_arch_lwip_sys_freertos instead, where WiFi and LwIP activity is performed in a thread. diff --git a/pico_w/wifi/freertos/httpd/CMakeLists.txt b/pico_w/wifi/freertos/httpd/CMakeLists.txt index 2f34f4362..35dd4eb35 100644 --- a/pico_w/wifi/freertos/httpd/CMakeLists.txt +++ b/pico_w/wifi/freertos/httpd/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../../CMakeLists.txt) - project(httpd C CXX ASM) - include(../../../../CMakeLists.txt) -endif() - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}) add_executable(pico_freertos_httpd_nosys diff --git a/pico_w/wifi/freertos/iperf/CMakeLists.txt b/pico_w/wifi/freertos/iperf/CMakeLists.txt index 7e4259de5..2cc17c560 100644 --- a/pico_w/wifi/freertos/iperf/CMakeLists.txt +++ b/pico_w/wifi/freertos/iperf/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../../CMakeLists.txt) - project(iperf C CXX ASM) - include(../../../../CMakeLists.txt) -endif() - add_executable(picow_freertos_iperf_server_nosys picow_freertos_iperf.c ) diff --git a/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt b/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt index 5a0a0a394..3cb02d5f1 100644 --- a/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt +++ b/pico_w/wifi/freertos/ntp_client_socket/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../../CMakeLists.txt) - project(ntp_client_socket C CXX ASM) - include(../../../../CMakeLists.txt) -endif() - add_executable(picow_freertos_ntp_client_socket picow_freertos_ntp_client_socket.c ) diff --git a/pico_w/wifi/freertos/ping/CMakeLists.txt b/pico_w/wifi/freertos/ping/CMakeLists.txt index debcdba16..1296e09bf 100644 --- a/pico_w/wifi/freertos/ping/CMakeLists.txt +++ b/pico_w/wifi/freertos/ping/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../../CMakeLists.txt) - project(ping C CXX ASM) - include(../../../../CMakeLists.txt) -endif() - if (EXISTS ${PICO_LWIP_CONTRIB_PATH}/apps/ping/ping.c) add_executable(picow_freertos_ping_nosys picow_freertos_ping.c diff --git a/pico_w/wifi/http_client/CMakeLists.txt b/pico_w/wifi/http_client/CMakeLists.txt index 50f73f36c..a1be39398 100644 --- a/pico_w/wifi/http_client/CMakeLists.txt +++ b/pico_w/wifi/http_client/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(http_client C CXX ASM) - include(../../../CMakeLists.txt) -endif() - pico_add_library(example_lwip_http_util NOFLAG) target_sources(example_lwip_http_util INTERFACE ${CMAKE_CURRENT_LIST_DIR}/example_http_client_util.c diff --git a/pico_w/wifi/httpd/CMakeLists.txt b/pico_w/wifi/httpd/CMakeLists.txt index 4c4401114..f028ef6dd 100644 --- a/pico_w/wifi/httpd/CMakeLists.txt +++ b/pico_w/wifi/httpd/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(httpd C CXX ASM) - include(../../../CMakeLists.txt) -endif() - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}) add_executable(picow_httpd_background diff --git a/pico_w/wifi/iperf/CMakeLists.txt b/pico_w/wifi/iperf/CMakeLists.txt index bc1f86b89..56a6a1b0a 100644 --- a/pico_w/wifi/iperf/CMakeLists.txt +++ b/pico_w/wifi/iperf/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(iperf C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_iperf_server_background picow_iperf.c ) diff --git a/pico_w/wifi/ntp_client/CMakeLists.txt b/pico_w/wifi/ntp_client/CMakeLists.txt index 0067a6be7..22a2e6354 100644 --- a/pico_w/wifi/ntp_client/CMakeLists.txt +++ b/pico_w/wifi/ntp_client/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(ntp_client C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_ntp_client_background picow_ntp_client.c ) diff --git a/pico_w/wifi/tcp_client/CMakeLists.txt b/pico_w/wifi/tcp_client/CMakeLists.txt index cc4bec906..0bb498a5c 100644 --- a/pico_w/wifi/tcp_client/CMakeLists.txt +++ b/pico_w/wifi/tcp_client/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(tcp_client C CXX ASM) - include(../../../CMakeLists.txt) -endif() - if (NOT TEST_TCP_SERVER_IP) message("Skipping tcp_client example as TEST_TCP_SERVER_IP is not defined") else() diff --git a/pico_w/wifi/tcp_server/CMakeLists.txt b/pico_w/wifi/tcp_server/CMakeLists.txt index b90e192f4..3e8a48471 100644 --- a/pico_w/wifi/tcp_server/CMakeLists.txt +++ b/pico_w/wifi/tcp_server/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(tcp_server C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_tcpip_server_background picow_tcp_server.c ) diff --git a/pico_w/wifi/tls_client/CMakeLists.txt b/pico_w/wifi/tls_client/CMakeLists.txt index 9f65fffe7..fdbe6c056 100644 --- a/pico_w/wifi/tls_client/CMakeLists.txt +++ b/pico_w/wifi/tls_client/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(tls_client C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_tls_client_background picow_tls_client.c tls_common.c diff --git a/pico_w/wifi/udp_beacon/CMakeLists.txt b/pico_w/wifi/udp_beacon/CMakeLists.txt index 5fc913943..59300eee4 100644 --- a/pico_w/wifi/udp_beacon/CMakeLists.txt +++ b/pico_w/wifi/udp_beacon/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(udp_beacon C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_udp_beacon_background picow_udp_beacon.c ) diff --git a/pico_w/wifi/wifi_scan/CMakeLists.txt b/pico_w/wifi/wifi_scan/CMakeLists.txt index ab755413d..ba0cd4f97 100644 --- a/pico_w/wifi/wifi_scan/CMakeLists.txt +++ b/pico_w/wifi/wifi_scan/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(wifi_scan C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(picow_wifi_scan_background picow_wifi_scan.c ) diff --git a/picoboard/blinky/CMakeLists.txt b/picoboard/blinky/CMakeLists.txt index 51f0915d4..e3e57abc7 100644 --- a/picoboard/blinky/CMakeLists.txt +++ b/picoboard/blinky/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(blinky C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(picoboard_blinky blinky.c ) diff --git a/picoboard/button/CMakeLists.txt b/picoboard/button/CMakeLists.txt index 66ee07fef..c3ef5d726 100644 --- a/picoboard/button/CMakeLists.txt +++ b/picoboard/button/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(button C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(picoboard_button button.c ) diff --git a/pio/addition/CMakeLists.txt b/pio/addition/CMakeLists.txt index f01bcdaad..9ff90779e 100644 --- a/pio/addition/CMakeLists.txt +++ b/pio/addition/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(addition C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_addition) pico_generate_pio_header(pio_addition ${CMAKE_CURRENT_LIST_DIR}/addition.pio) diff --git a/pio/apa102/CMakeLists.txt b/pio/apa102/CMakeLists.txt index 4721e40ba..1522f5564 100644 --- a/pio/apa102/CMakeLists.txt +++ b/pio/apa102/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(apa102 C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_apa102) pico_generate_pio_header(pio_apa102 ${CMAKE_CURRENT_LIST_DIR}/apa102.pio) diff --git a/pio/clocked_input/CMakeLists.txt b/pio/clocked_input/CMakeLists.txt index 9a0b7b2da..cd71408a3 100644 --- a/pio/clocked_input/CMakeLists.txt +++ b/pio/clocked_input/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(clocked_input C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_clocked_input) pico_generate_pio_header(pio_clocked_input ${CMAKE_CURRENT_LIST_DIR}/clocked_input.pio) diff --git a/pio/differential_manchester/CMakeLists.txt b/pio/differential_manchester/CMakeLists.txt index 0725bcbef..6276f09f5 100644 --- a/pio/differential_manchester/CMakeLists.txt +++ b/pio/differential_manchester/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(differential_manchester C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_differential_manchester) pico_generate_pio_header(pio_differential_manchester ${CMAKE_CURRENT_LIST_DIR}/differential_manchester.pio) diff --git a/pio/hello_pio/CMakeLists.txt b/pio/hello_pio/CMakeLists.txt index e10bf1a29..1c1d67496 100644 --- a/pio/hello_pio/CMakeLists.txt +++ b/pio/hello_pio/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_pio C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_pio) pico_generate_pio_header(hello_pio ${CMAKE_CURRENT_LIST_DIR}/hello.pio) diff --git a/pio/hub75/CMakeLists.txt b/pio/hub75/CMakeLists.txt index 0cd6d7643..a976f4eab 100644 --- a/pio/hub75/CMakeLists.txt +++ b/pio/hub75/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hub75 C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_hub75) pico_generate_pio_header(pio_hub75 ${CMAKE_CURRENT_LIST_DIR}/hub75.pio) diff --git a/pio/i2c/CMakeLists.txt b/pio/i2c/CMakeLists.txt index 05e7a423f..d49b22482 100644 --- a/pio/i2c/CMakeLists.txt +++ b/pio/i2c/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(i2c C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_i2c_bus_scan) pico_generate_pio_header(pio_i2c_bus_scan ${CMAKE_CURRENT_LIST_DIR}/i2c.pio) diff --git a/pio/ir_nec/ir_loopback/CMakeLists.txt b/pio/ir_nec/ir_loopback/CMakeLists.txt index c84ef8d99..8c7d8f4b7 100644 --- a/pio/ir_nec/ir_loopback/CMakeLists.txt +++ b/pio/ir_nec/ir_loopback/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(ir_loopback C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable (pio_ir_loopback ir_loopback.c) # link the executable using the IR transmit and receive libraries diff --git a/pio/logic_analyser/CMakeLists.txt b/pio/logic_analyser/CMakeLists.txt index 1e78df9ae..8a65198a9 100644 --- a/pio/logic_analyser/CMakeLists.txt +++ b/pio/logic_analyser/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(logic_analyser C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_logic_analyser) target_sources(pio_logic_analyser PRIVATE logic_analyser.c) diff --git a/pio/manchester_encoding/CMakeLists.txt b/pio/manchester_encoding/CMakeLists.txt index 4c165cfa2..70b88283a 100644 --- a/pio/manchester_encoding/CMakeLists.txt +++ b/pio/manchester_encoding/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(manchester_encoding C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_manchester_encoding) pico_generate_pio_header(pio_manchester_encoding ${CMAKE_CURRENT_LIST_DIR}/manchester_encoding.pio) diff --git a/pio/onewire/CMakeLists.txt b/pio/onewire/CMakeLists.txt index aca566dc2..4090cb36c 100644 --- a/pio/onewire/CMakeLists.txt +++ b/pio/onewire/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(onewire C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_onewire) target_sources(pio_onewire PRIVATE onewire.c) diff --git a/pio/pio_blink/CMakeLists.txt b/pio/pio_blink/CMakeLists.txt index f9c961fa3..88b5584fd 100644 --- a/pio/pio_blink/CMakeLists.txt +++ b/pio/pio_blink/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(pio_blink C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_blink) # by default the header is generated into the build dir diff --git a/pio/pwm/CMakeLists.txt b/pio/pwm/CMakeLists.txt index 506f32670..7c6f2fc01 100644 --- a/pio/pwm/CMakeLists.txt +++ b/pio/pwm/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(pwm C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_pwm) pico_generate_pio_header(pio_pwm ${CMAKE_CURRENT_LIST_DIR}/pwm.pio) diff --git a/pio/quadrature_encoder/CMakeLists.txt b/pio/quadrature_encoder/CMakeLists.txt index 6b59240cf..b118f3c27 100644 --- a/pio/quadrature_encoder/CMakeLists.txt +++ b/pio/quadrature_encoder/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(quadrature_encoder C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_quadrature_encoder) pico_generate_pio_header(pio_quadrature_encoder ${CMAKE_CURRENT_LIST_DIR}/quadrature_encoder.pio) diff --git a/pio/quadrature_encoder_substep/CMakeLists.txt b/pio/quadrature_encoder_substep/CMakeLists.txt index abebad841..7bc7f6a0a 100644 --- a/pio/quadrature_encoder_substep/CMakeLists.txt +++ b/pio/quadrature_encoder_substep/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(quadrature_encoder_substep C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_quadrature_encoder_substep) pico_generate_pio_header(pio_quadrature_encoder_substep ${CMAKE_CURRENT_LIST_DIR}/quadrature_encoder_substep.pio) diff --git a/pio/spi/CMakeLists.txt b/pio/spi/CMakeLists.txt index d413abb51..44c561a85 100644 --- a/pio/spi/CMakeLists.txt +++ b/pio/spi/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(spi C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_spi_flash) pico_generate_pio_header(pio_spi_flash ${CMAKE_CURRENT_LIST_DIR}/spi.pio) diff --git a/pio/squarewave/CMakeLists.txt b/pio/squarewave/CMakeLists.txt index 6e4795c14..fe503bb1d 100644 --- a/pio/squarewave/CMakeLists.txt +++ b/pio/squarewave/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(squarewave C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_squarewave) pico_generate_pio_header(pio_squarewave ${CMAKE_CURRENT_LIST_DIR}/squarewave.pio) diff --git a/pio/st7789_lcd/CMakeLists.txt b/pio/st7789_lcd/CMakeLists.txt index 996b92274..a6243e646 100644 --- a/pio/st7789_lcd/CMakeLists.txt +++ b/pio/st7789_lcd/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(st7789_lcd C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_st7789_lcd) pico_generate_pio_header(pio_st7789_lcd ${CMAKE_CURRENT_LIST_DIR}/st7789_lcd.pio) diff --git a/pio/uart_rx/CMakeLists.txt b/pio/uart_rx/CMakeLists.txt index a9069ad6b..5f985e1bb 100644 --- a/pio/uart_rx/CMakeLists.txt +++ b/pio/uart_rx/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(uart_rx C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_uart_rx) pico_generate_pio_header(pio_uart_rx ${CMAKE_CURRENT_LIST_DIR}/uart_rx.pio) diff --git a/pio/uart_tx/CMakeLists.txt b/pio/uart_tx/CMakeLists.txt index c54a6b543..5e3cf2a82 100644 --- a/pio/uart_tx/CMakeLists.txt +++ b/pio/uart_tx/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(uart_tx C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_uart_tx) pico_generate_pio_header(pio_uart_tx ${CMAKE_CURRENT_LIST_DIR}/uart_tx.pio) diff --git a/pio/ws2812/CMakeLists.txt b/pio/ws2812/CMakeLists.txt index 94baddf4f..3e887b908 100644 --- a/pio/ws2812/CMakeLists.txt +++ b/pio/ws2812/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(ws2812 C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pio_ws2812) file(MAKE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/generated) diff --git a/pwm/hello_pwm/CMakeLists.txt b/pwm/hello_pwm/CMakeLists.txt index 6a9796517..e2df80ceb 100644 --- a/pwm/hello_pwm/CMakeLists.txt +++ b/pwm/hello_pwm/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_pwm C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_pwm hello_pwm.c ) diff --git a/pwm/led_fade/CMakeLists.txt b/pwm/led_fade/CMakeLists.txt index 874aaa918..a9f5eea56 100644 --- a/pwm/led_fade/CMakeLists.txt +++ b/pwm/led_fade/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(led_fade C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pwm_led_fade pwm_led_fade.c ) diff --git a/pwm/measure_duty_cycle/CMakeLists.txt b/pwm/measure_duty_cycle/CMakeLists.txt index 8be5b92f7..45bd4d623 100644 --- a/pwm/measure_duty_cycle/CMakeLists.txt +++ b/pwm/measure_duty_cycle/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(measure_duty_cycle C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(pwm_measure_duty_cycle measure_duty_cycle.c ) diff --git a/reset/hello_reset/CMakeLists.txt b/reset/hello_reset/CMakeLists.txt index 192bf0ed5..fc0854377 100644 --- a/reset/hello_reset/CMakeLists.txt +++ b/reset/hello_reset/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_reset C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (TARGET hardware_resets) add_executable(hello_reset hello_reset.c diff --git a/rtc/hello_rtc/CMakeLists.txt b/rtc/hello_rtc/CMakeLists.txt index a7f106a48..b3cc1a25c 100644 --- a/rtc/hello_rtc/CMakeLists.txt +++ b/rtc/hello_rtc/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_rtc C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_rtc hello_rtc.c ) diff --git a/rtc/rtc_alarm/CMakeLists.txt b/rtc/rtc_alarm/CMakeLists.txt index b5952b5ab..8f0dfa2cb 100644 --- a/rtc/rtc_alarm/CMakeLists.txt +++ b/rtc/rtc_alarm/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(rtc_alarm C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(rtc_alarm rtc_alarm.c ) diff --git a/rtc/rtc_alarm_repeat/CMakeLists.txt b/rtc/rtc_alarm_repeat/CMakeLists.txt index abaa12f05..bd3c9e3e0 100644 --- a/rtc/rtc_alarm_repeat/CMakeLists.txt +++ b/rtc/rtc_alarm_repeat/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(rtc_alarm_repeat C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(rtc_alarm_repeat rtc_alarm_repeat.c ) diff --git a/sha/mbedtls_sha256/CMakeLists.txt b/sha/mbedtls_sha256/CMakeLists.txt index 96f1ababa..a9bec5d18 100644 --- a/sha/mbedtls_sha256/CMakeLists.txt +++ b/sha/mbedtls_sha256/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mbedtls_sha256 C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (NOT TARGET hardware_sha256) return() endif() diff --git a/sha/sha256/CMakeLists.txt b/sha/sha256/CMakeLists.txt index 55d5108aa..5835fe863 100644 --- a/sha/sha256/CMakeLists.txt +++ b/sha/sha256/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(sha256 C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (NOT TARGET hardware_sha256) return() endif() diff --git a/spi/bme280_spi/CMakeLists.txt b/spi/bme280_spi/CMakeLists.txt index d0646afc5..117d01a51 100644 --- a/spi/bme280_spi/CMakeLists.txt +++ b/spi/bme280_spi/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(bme280_spi C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(bme280_spi bme280_spi.c ) diff --git a/spi/max7219_32x8_spi/CMakeLists.txt b/spi/max7219_32x8_spi/CMakeLists.txt index 2bb83127b..415eb33f3 100644 --- a/spi/max7219_32x8_spi/CMakeLists.txt +++ b/spi/max7219_32x8_spi/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(max7219_32x8_spi C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(max7219_32x8_spi max7219_32x8_spi.c ) diff --git a/spi/max7219_8x7seg_spi/CMakeLists.txt b/spi/max7219_8x7seg_spi/CMakeLists.txt index c3255dad4..ab0b08c12 100644 --- a/spi/max7219_8x7seg_spi/CMakeLists.txt +++ b/spi/max7219_8x7seg_spi/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(max7219_8x7seg_spi C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(max7219_8x7seg_spi max7219_8x7seg_spi.c ) diff --git a/spi/mpu9250_spi/CMakeLists.txt b/spi/mpu9250_spi/CMakeLists.txt index cc907c35c..5e0a6120a 100644 --- a/spi/mpu9250_spi/CMakeLists.txt +++ b/spi/mpu9250_spi/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(mpu9250_spi C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(mpu9250_spi mpu9250_spi.c ) diff --git a/spi/spi_dma/CMakeLists.txt b/spi/spi_dma/CMakeLists.txt index a4a1bef5e..3adfdda60 100644 --- a/spi/spi_dma/CMakeLists.txt +++ b/spi/spi_dma/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(spi_dma C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(spi_dma spi_dma.c ) diff --git a/spi/spi_flash/CMakeLists.txt b/spi/spi_flash/CMakeLists.txt index a5e534293..2a0ddcc35 100644 --- a/spi/spi_flash/CMakeLists.txt +++ b/spi/spi_flash/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(spi_flash C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(spi_flash spi_flash.c ) diff --git a/spi/spi_master_slave/spi_master/CMakeLists.txt b/spi/spi_master_slave/spi_master/CMakeLists.txt index 8a74737f5..534e78fd6 100644 --- a/spi/spi_master_slave/spi_master/CMakeLists.txt +++ b/spi/spi_master_slave/spi_master/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(spi_master C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(spi_master spi_master.c ) diff --git a/spi/spi_master_slave/spi_slave/CMakeLists.txt b/spi/spi_master_slave/spi_slave/CMakeLists.txt index b1ed04089..8e0564506 100644 --- a/spi/spi_master_slave/spi_slave/CMakeLists.txt +++ b/spi/spi_master_slave/spi_slave/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(spi_slave C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(spi_slave spi_slave.c ) diff --git a/system/boot_info/CMakeLists.txt b/system/boot_info/CMakeLists.txt index 752472c07..ec166f968 100644 --- a/system/boot_info/CMakeLists.txt +++ b/system/boot_info/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(boot_info C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(boot_info boot_info.c ) diff --git a/system/hello_double_tap/CMakeLists.txt b/system/hello_double_tap/CMakeLists.txt index eeed3b78f..30a9e12f7 100644 --- a/system/hello_double_tap/CMakeLists.txt +++ b/system/hello_double_tap/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_double_tap C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_double_tap hello_double_tap.c ) diff --git a/system/narrow_io_write/CMakeLists.txt b/system/narrow_io_write/CMakeLists.txt index a13cce156..5e57819d7 100644 --- a/system/narrow_io_write/CMakeLists.txt +++ b/system/narrow_io_write/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(narrow_io_write C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(narrow_io_write narrow_io_write.c ) diff --git a/system/rand/CMakeLists.txt b/system/rand/CMakeLists.txt index dc9334780..f874c9f78 100644 --- a/system/rand/CMakeLists.txt +++ b/system/rand/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(rand C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(rand rand.c ) diff --git a/system/unique_board_id/CMakeLists.txt b/system/unique_board_id/CMakeLists.txt index e80648f17..1a5b1f989 100644 --- a/system/unique_board_id/CMakeLists.txt +++ b/system/unique_board_id/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(unique_board_id C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(unique_board_id unique_board_id.c ) diff --git a/timer/hello_timer/CMakeLists.txt b/timer/hello_timer/CMakeLists.txt index 30eacc0ad..806cf699f 100644 --- a/timer/hello_timer/CMakeLists.txt +++ b/timer/hello_timer/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_timer C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_timer hello_timer.c ) diff --git a/timer/periodic_sampler/CMakeLists.txt b/timer/periodic_sampler/CMakeLists.txt index d5f8af67a..284780fb3 100644 --- a/timer/periodic_sampler/CMakeLists.txt +++ b/timer/periodic_sampler/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(periodic_sampler C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (NOT PICO_TIME_NO_ALARM_SUPPORT) add_executable(periodic_sampler periodic_sampler.c diff --git a/timer/timer_lowlevel/CMakeLists.txt b/timer/timer_lowlevel/CMakeLists.txt index 3cee215dd..55d4e82aa 100644 --- a/timer/timer_lowlevel/CMakeLists.txt +++ b/timer/timer_lowlevel/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(timer_lowlevel C CXX ASM) - include(../../CMakeLists.txt) -endif() - if (PICO_ON_DEVICE) add_executable(timer_lowlevel timer_lowlevel.c) diff --git a/uart/hello_uart/CMakeLists.txt b/uart/hello_uart/CMakeLists.txt index d072dd550..0931f384d 100644 --- a/uart/hello_uart/CMakeLists.txt +++ b/uart/hello_uart/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_uart C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_uart hello_uart.c ) diff --git a/uart/lcd_uart/CMakeLists.txt b/uart/lcd_uart/CMakeLists.txt index a82f9a472..64098821f 100644 --- a/uart/lcd_uart/CMakeLists.txt +++ b/uart/lcd_uart/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(lcd_uart C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(lcd_uart lcd_uart.c ) diff --git a/uart/uart_advanced/CMakeLists.txt b/uart/uart_advanced/CMakeLists.txt index fdf1cb569..a7cf5638e 100644 --- a/uart/uart_advanced/CMakeLists.txt +++ b/uart/uart_advanced/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(uart_advanced C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(uart_advanced uart_advanced.c ) diff --git a/universal/hello_universal/CMakeLists.txt b/universal/hello_universal/CMakeLists.txt index 00dbde3e6..51269beac 100644 --- a/universal/hello_universal/CMakeLists.txt +++ b/universal/hello_universal/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_universal C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_universal hello_universal.c ) diff --git a/usb/device/dev_hid_composite/CMakeLists.txt b/usb/device/dev_hid_composite/CMakeLists.txt index e0abfc849..cd035d9a5 100644 --- a/usb/device/dev_hid_composite/CMakeLists.txt +++ b/usb/device/dev_hid_composite/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(dev_hid_composite C CXX ASM) - include(../../../CMakeLists.txt) -endif() - cmake_minimum_required(VERSION 3.13) add_executable(dev_hid_composite) diff --git a/usb/device/dev_lowlevel/CMakeLists.txt b/usb/device/dev_lowlevel/CMakeLists.txt index d751400c1..906c84e5f 100644 --- a/usb/device/dev_lowlevel/CMakeLists.txt +++ b/usb/device/dev_lowlevel/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(dev_lowlevel C CXX ASM) - include(../../../CMakeLists.txt) -endif() - add_executable(dev_lowlevel dev_lowlevel.c ) diff --git a/usb/host/host_cdc_msc_hid/CMakeLists.txt b/usb/host/host_cdc_msc_hid/CMakeLists.txt index 385201219..55f5a4a98 100644 --- a/usb/host/host_cdc_msc_hid/CMakeLists.txt +++ b/usb/host/host_cdc_msc_hid/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../../CMakeLists.txt) - project(host_cdc_msc_hid C CXX ASM) - include(../../../CMakeLists.txt) -endif() - cmake_minimum_required(VERSION 3.13) add_executable(host_cdc_msc_hid) diff --git a/watchdog/hello_watchdog/CMakeLists.txt b/watchdog/hello_watchdog/CMakeLists.txt index c6340863a..9e1e5d006 100644 --- a/watchdog/hello_watchdog/CMakeLists.txt +++ b/watchdog/hello_watchdog/CMakeLists.txt @@ -1,11 +1,3 @@ -cmake_minimum_required(VERSION 3.12) - -if (NOT CMAKE_PROJECT_NAME) - include(../../CMakeLists.txt) - project(hello_watchdog C CXX ASM) - include(../../CMakeLists.txt) -endif() - add_executable(hello_watchdog hello_watchdog.c )