From 407b49b35c111042ce474785bb88760322b26f32 Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Wed, 12 Feb 2020 15:00:46 +0100 Subject: [PATCH] cmake: use find_package to locate Zephyr Using find_package to locate Zephyr. Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate code. Whenever an automatic run of CMake happend by the build system / IDE then it was required that ZEPHYR_BASE was defined. Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to cache the base variable and thus allowing subsequent invocation even if ZEPHYR_BASE is not set in the environment. It also removes the risk of strange build results if a user switchs between different Zephyr based project folders and forgetting to reset ZEPHYR_BASE before running ninja / make. Signed-off-by: Torsten Rasmussen --- .../code_relocation/CMakeLists.txt | 2 +- .../external_lib/CMakeLists.txt | 2 +- .../out_of_tree_board/CMakeLists.txt | 2 +- .../out_of_tree_driver/CMakeLists.txt | 2 +- samples/basic/blink_led/CMakeLists.txt | 2 +- samples/basic/blinky/CMakeLists.txt | 2 +- samples/basic/button/CMakeLists.txt | 2 +- samples/basic/fade_led/CMakeLists.txt | 2 +- samples/basic/minimal/CMakeLists.txt | 2 +- samples/basic/rgb_led/CMakeLists.txt | 2 +- samples/basic/servo_motor/CMakeLists.txt | 2 +- samples/basic/threads/CMakeLists.txt | 2 +- samples/bluetooth/beacon/CMakeLists.txt | 2 +- samples/bluetooth/central/CMakeLists.txt | 4 ++-- samples/bluetooth/central_hr/CMakeLists.txt | 4 ++-- samples/bluetooth/eddystone/CMakeLists.txt | 4 ++-- samples/bluetooth/handsfree/CMakeLists.txt | 4 ++-- samples/bluetooth/hci_pwr_ctrl/CMakeLists.txt | 2 +- samples/bluetooth/hci_rpmsg/CMakeLists.txt | 2 +- samples/bluetooth/hci_spi/CMakeLists.txt | 4 ++-- samples/bluetooth/hci_uart/CMakeLists.txt | 2 +- samples/bluetooth/hci_usb/CMakeLists.txt | 2 +- samples/bluetooth/ibeacon/CMakeLists.txt | 2 +- samples/bluetooth/ipsp/CMakeLists.txt | 2 +- samples/bluetooth/mesh/CMakeLists.txt | 2 +- samples/bluetooth/mesh_demo/CMakeLists.txt | 4 ++-- samples/bluetooth/mesh_provisioner/CMakeLists.txt | 2 +- samples/bluetooth/peripheral/CMakeLists.txt | 2 +- samples/bluetooth/peripheral_csc/CMakeLists.txt | 4 ++-- samples/bluetooth/peripheral_dis/CMakeLists.txt | 4 ++-- samples/bluetooth/peripheral_esp/CMakeLists.txt | 4 ++-- samples/bluetooth/peripheral_hids/CMakeLists.txt | 3 +-- samples/bluetooth/peripheral_hr/CMakeLists.txt | 4 ++-- samples/bluetooth/peripheral_ht/CMakeLists.txt | 2 +- samples/bluetooth/peripheral_sc_only/CMakeLists.txt | 4 ++-- samples/bluetooth/scan_adv/CMakeLists.txt | 4 ++-- samples/bluetooth/st_ble_sensor/CMakeLists.txt | 4 ++-- .../boards/96b_argonkey/microphone/CMakeLists.txt | 2 +- samples/boards/96b_argonkey/sensors/CMakeLists.txt | 2 +- samples/boards/arc_secure_services/CMakeLists.txt | 2 +- samples/boards/bbc_microbit/display/CMakeLists.txt | 2 +- .../bbc_microbit/line_follower_robot/CMakeLists.txt | 2 +- samples/boards/bbc_microbit/pong/CMakeLists.txt | 4 ++-- samples/boards/bbc_microbit/sound/CMakeLists.txt | 4 ++-- samples/boards/intel_s1000_crb/audio/CMakeLists.txt | 2 +- samples/boards/intel_s1000_crb/dmic/CMakeLists.txt | 2 +- samples/boards/intel_s1000_crb/i2s/CMakeLists.txt | 2 +- .../power_management/CMakeLists.txt | 2 +- samples/boards/nrf/battery/CMakeLists.txt | 2 +- samples/boards/nrf/mesh/onoff-app/CMakeLists.txt | 2 +- .../mesh/onoff_level_lighting_vnd_app/CMakeLists.txt | 2 +- samples/boards/nrf/nrfx/CMakeLists.txt | 2 +- samples/boards/nrf/system_off/CMakeLists.txt | 2 +- samples/boards/olimex_stm32_e407/ccm/CMakeLists.txt | 2 +- samples/boards/reel_board/mesh_badge/CMakeLists.txt | 2 +- samples/boards/sensortile_box/CMakeLists.txt | 2 +- .../boards/up_squared/gpio_counter/CMakeLists.txt | 4 ++-- samples/cpp_synchronization/CMakeLists.txt | 2 +- samples/display/cfb/CMakeLists.txt | 2 +- samples/display/cfb_custom_font/CMakeLists.txt | 4 ++-- samples/display/cfb_shell/CMakeLists.txt | 2 +- samples/display/grove_display/CMakeLists.txt | 2 +- samples/display/lvgl/CMakeLists.txt | 2 +- samples/drivers/CAN/CMakeLists.txt | 2 +- samples/drivers/counter/alarm/CMakeLists.txt | 2 +- samples/drivers/crypto/CMakeLists.txt | 2 +- samples/drivers/current_sensing/CMakeLists.txt | 2 +- samples/drivers/display/CMakeLists.txt | 2 +- samples/drivers/entropy/CMakeLists.txt | 2 +- samples/drivers/espi/CMakeLists.txt | 2 +- samples/drivers/flash_shell/CMakeLists.txt | 2 +- samples/drivers/ht16k33/CMakeLists.txt | 2 +- samples/drivers/i2c_fujitsu_fram/CMakeLists.txt | 2 +- samples/drivers/kscan/CMakeLists.txt | 2 +- samples/drivers/lcd_hd44780/CMakeLists.txt | 2 +- samples/drivers/led_apa102/CMakeLists.txt | 2 +- samples/drivers/led_apa102c_bitbang/CMakeLists.txt | 2 +- samples/drivers/led_lp3943/CMakeLists.txt | 2 +- samples/drivers/led_lp5562/CMakeLists.txt | 2 +- samples/drivers/led_lpd8806/CMakeLists.txt | 2 +- samples/drivers/led_pca9633/CMakeLists.txt | 2 +- samples/drivers/led_ws2812/CMakeLists.txt | 2 +- samples/drivers/lora/receive/CMakeLists.txt | 2 +- samples/drivers/lora/send/CMakeLists.txt | 2 +- samples/drivers/peci/CMakeLists.txt | 2 +- samples/drivers/ps2/CMakeLists.txt | 2 +- samples/drivers/soc_flash_nrf/CMakeLists.txt | 2 +- samples/drivers/spi_flash/CMakeLists.txt | 2 +- samples/drivers/spi_fujitsu_fram/CMakeLists.txt | 2 +- samples/drivers/watchdog/CMakeLists.txt | 2 +- samples/hello_world/CMakeLists.txt | 2 +- samples/mpu/mpu_test/CMakeLists.txt | 2 +- samples/net/cloud/google_iot_mqtt/CMakeLists.txt | 2 +- samples/net/cloud/mqtt_azure/CMakeLists.txt | 2 +- samples/net/dhcpv4_client/CMakeLists.txt | 2 +- samples/net/dns_resolve/CMakeLists.txt | 2 +- samples/net/eth_native_posix/CMakeLists.txt | 4 ++-- samples/net/gptp/CMakeLists.txt | 2 +- samples/net/gsm_modem/CMakeLists.txt | 2 +- samples/net/ipv4_autoconf/CMakeLists.txt | 2 +- samples/net/lldp/CMakeLists.txt | 2 +- samples/net/lwm2m_client/CMakeLists.txt | 4 ++-- samples/net/mdns_responder/CMakeLists.txt | 4 ++-- samples/net/mqtt_publisher/CMakeLists.txt | 2 +- samples/net/openthread/ncp/CMakeLists.txt | 4 ++-- samples/net/promiscuous_mode/CMakeLists.txt | 2 +- samples/net/sockets/big_http_download/CMakeLists.txt | 4 ++-- samples/net/sockets/can/CMakeLists.txt | 2 +- samples/net/sockets/civetweb/CMakeLists.txt | 2 +- samples/net/sockets/coap_client/CMakeLists.txt | 4 ++-- samples/net/sockets/coap_server/CMakeLists.txt | 4 ++-- samples/net/sockets/dumb_http_server/CMakeLists.txt | 4 ++-- .../net/sockets/dumb_http_server_mt/CMakeLists.txt | 2 +- samples/net/sockets/echo/CMakeLists.txt | 4 ++-- samples/net/sockets/echo_async/CMakeLists.txt | 4 ++-- samples/net/sockets/echo_async_select/CMakeLists.txt | 4 ++-- samples/net/sockets/echo_client/CMakeLists.txt | 4 ++-- samples/net/sockets/echo_server/CMakeLists.txt | 4 ++-- samples/net/sockets/http_client/CMakeLists.txt | 2 +- samples/net/sockets/http_get/CMakeLists.txt | 4 ++-- samples/net/sockets/net_mgmt/CMakeLists.txt | 4 ++-- samples/net/sockets/packet/CMakeLists.txt | 4 ++-- samples/net/sockets/sntp_client/CMakeLists.txt | 2 +- samples/net/sockets/tcp/CMakeLists.txt | 4 ++-- samples/net/sockets/websocket_client/CMakeLists.txt | 2 +- samples/net/stats/CMakeLists.txt | 4 ++-- samples/net/syslog_net/CMakeLists.txt | 2 +- samples/net/telnet/CMakeLists.txt | 2 +- samples/net/updatehub/CMakeLists.txt | 4 ++-- samples/net/vlan/CMakeLists.txt | 4 ++-- samples/net/wifi/CMakeLists.txt | 2 +- samples/net/wpan_serial/CMakeLists.txt | 4 ++-- samples/net/wpanusb/CMakeLists.txt | 8 ++++---- samples/net/zperf/CMakeLists.txt | 4 ++-- samples/nfc/nfc_hello/CMakeLists.txt | 2 +- samples/philosophers/CMakeLists.txt | 2 +- .../cmsis_rtos_v1/philosophers/CMakeLists.txt | 4 ++-- .../timer_synchronization/CMakeLists.txt | 4 ++-- .../cmsis_rtos_v2/philosophers/CMakeLists.txt | 4 ++-- .../timer_synchronization/CMakeLists.txt | 4 ++-- samples/posix/gettimeofday/CMakeLists.txt | 4 ++-- samples/scheduler/metairq_dispatch/CMakeLists.txt | 2 +- samples/sensor/adt7420/CMakeLists.txt | 2 +- samples/sensor/adxl362/CMakeLists.txt | 2 +- samples/sensor/adxl372/CMakeLists.txt | 2 +- samples/sensor/amg88xx/CMakeLists.txt | 2 +- samples/sensor/ams_iAQcore/CMakeLists.txt | 2 +- samples/sensor/apds9960/CMakeLists.txt | 2 +- samples/sensor/bme280/CMakeLists.txt | 2 +- samples/sensor/bme680/CMakeLists.txt | 4 ++-- samples/sensor/bmg160/CMakeLists.txt | 2 +- samples/sensor/bmm150/CMakeLists.txt | 2 +- samples/sensor/ccs811/CMakeLists.txt | 2 +- samples/sensor/dht/CMakeLists.txt | 2 +- samples/sensor/ens210/CMakeLists.txt | 2 +- samples/sensor/fxas21002/CMakeLists.txt | 2 +- samples/sensor/fxos8700-hid/CMakeLists.txt | 2 +- samples/sensor/fxos8700/CMakeLists.txt | 2 +- samples/sensor/grove_light/CMakeLists.txt | 2 +- samples/sensor/grove_temperature/CMakeLists.txt | 2 +- samples/sensor/hmc5883l/CMakeLists.txt | 2 +- samples/sensor/hts221/CMakeLists.txt | 2 +- samples/sensor/isl29035/CMakeLists.txt | 2 +- samples/sensor/lis2dh/CMakeLists.txt | 2 +- samples/sensor/lps22hb/CMakeLists.txt | 2 +- samples/sensor/lps22hh/CMakeLists.txt | 2 +- samples/sensor/lsm303dlhc/CMakeLists.txt | 2 +- samples/sensor/lsm6dsl/CMakeLists.txt | 2 +- samples/sensor/magn_polling/CMakeLists.txt | 2 +- samples/sensor/max30101/CMakeLists.txt | 2 +- samples/sensor/max44009/CMakeLists.txt | 2 +- samples/sensor/mcp9808/CMakeLists.txt | 2 +- samples/sensor/mpu6050/CMakeLists.txt | 2 +- samples/sensor/ms5837/CMakeLists.txt | 2 +- samples/sensor/sensor_shell/CMakeLists.txt | 2 +- samples/sensor/sht3xd/CMakeLists.txt | 2 +- samples/sensor/sx9500/CMakeLists.txt | 2 +- samples/sensor/th02/CMakeLists.txt | 2 +- samples/sensor/thermometer/CMakeLists.txt | 2 +- samples/sensor/ti_hdc/CMakeLists.txt | 2 +- samples/sensor/tmp112/CMakeLists.txt | 2 +- samples/sensor/tmp116/CMakeLists.txt | 2 +- samples/sensor/vl53l0x/CMakeLists.txt | 2 +- samples/shields/lmp90100_evb/rtd/CMakeLists.txt | 2 +- samples/shields/x_nucleo_iks01a1/CMakeLists.txt | 2 +- samples/shields/x_nucleo_iks01a2/CMakeLists.txt | 2 +- .../x_nucleo_iks01a3/sensorhub/CMakeLists.txt | 2 +- .../shields/x_nucleo_iks01a3/standard/CMakeLists.txt | 2 +- samples/smp/pi/CMakeLists.txt | 2 +- samples/subsys/canbus/canopen/CMakeLists.txt | 2 +- samples/subsys/canbus/isotp/CMakeLists.txt | 2 +- samples/subsys/console/echo/CMakeLists.txt | 2 +- samples/subsys/console/getchar/CMakeLists.txt | 2 +- samples/subsys/console/getline/CMakeLists.txt | 2 +- samples/subsys/fs/fat_fs/CMakeLists.txt | 2 +- samples/subsys/fs/littlefs/CMakeLists.txt | 2 +- samples/subsys/ipc/ipm_imx/CMakeLists.txt | 4 ++-- samples/subsys/ipc/ipm_mcux/CMakeLists.txt | 2 +- samples/subsys/ipc/ipm_mcux/remote/CMakeLists.txt | 2 +- samples/subsys/ipc/ipm_mhu_dual_core/CMakeLists.txt | 2 +- samples/subsys/ipc/openamp/CMakeLists.txt | 2 +- samples/subsys/ipc/openamp/remote/CMakeLists.txt | 2 +- samples/subsys/logging/logger/CMakeLists.txt | 2 +- samples/subsys/logging/syst/CMakeLists.txt | 2 +- samples/subsys/mgmt/mcumgr/smp_svr/CMakeLists.txt | 2 +- samples/subsys/nvs/CMakeLists.txt | 4 ++-- samples/subsys/power/device_pm/CMakeLists.txt | 2 +- samples/subsys/settings/CMakeLists.txt | 2 +- samples/subsys/shell/fs/CMakeLists.txt | 2 +- samples/subsys/shell/shell_module/CMakeLists.txt | 2 +- samples/subsys/usb/cdc_acm/CMakeLists.txt | 2 +- samples/subsys/usb/cdc_acm_composite/CMakeLists.txt | 2 +- samples/subsys/usb/console/CMakeLists.txt | 2 +- samples/subsys/usb/dfu/CMakeLists.txt | 2 +- samples/subsys/usb/hid-cdc/CMakeLists.txt | 2 +- samples/subsys/usb/hid-mouse/CMakeLists.txt | 2 +- samples/subsys/usb/hid/CMakeLists.txt | 2 +- samples/subsys/usb/mass/CMakeLists.txt | 2 +- samples/subsys/usb/testusb/CMakeLists.txt | 2 +- samples/subsys/usb/webusb/CMakeLists.txt | 4 ++-- samples/synchronization/CMakeLists.txt | 2 +- samples/testing/integration/CMakeLists.txt | 2 +- samples/userspace/prod_consumer/CMakeLists.txt | 3 +-- samples/userspace/shared_mem/CMakeLists.txt | 2 +- samples/video/capture/CMakeLists.txt | 2 +- samples/video/tcpserversink/CMakeLists.txt | 2 +- tests/application_development/cpp/CMakeLists.txt | 2 +- .../gen_inc_file/CMakeLists.txt | 2 +- tests/application_development/libcxx/CMakeLists.txt | 2 +- tests/arch/arm/arm_interrupt/CMakeLists.txt | 2 +- .../arm/arm_irq_advanced_features/CMakeLists.txt | 2 +- tests/arch/arm/arm_irq_vector_table/CMakeLists.txt | 2 +- tests/arch/arm/arm_ramfunc/CMakeLists.txt | 2 +- tests/arch/arm/arm_runtime_nmi/CMakeLists.txt | 2 +- tests/arch/arm/arm_thread_swap/CMakeLists.txt | 2 +- tests/arch/x86/boot_page_table/CMakeLists.txt | 2 +- tests/arch/x86/info/CMakeLists.txt | 2 +- tests/arch/x86/static_idt/CMakeLists.txt | 2 +- tests/arch/x86/x86_mmu_api/CMakeLists.txt | 2 +- tests/arch/xtensa_asm2/CMakeLists.txt | 2 +- tests/benchmarks/app_kernel/CMakeLists.txt | 2 +- tests/benchmarks/boot_time/CMakeLists.txt | 2 +- tests/benchmarks/latency_measure/CMakeLists.txt | 2 +- tests/benchmarks/mbedtls/CMakeLists.txt | 2 +- tests/benchmarks/sched/CMakeLists.txt | 2 +- tests/benchmarks/sys_kernel/CMakeLists.txt | 2 +- tests/benchmarks/timing_info/CMakeLists.txt | 2 +- tests/bluetooth/at/CMakeLists.txt | 4 ++-- tests/bluetooth/bluetooth/CMakeLists.txt | 2 +- tests/bluetooth/bsim_bt/bsim_test_app/CMakeLists.txt | 4 ++-- .../edtt_ble_test_app/gatt_test_app/CMakeLists.txt | 4 ++-- .../edtt_ble_test_app/hci_test_app/CMakeLists.txt | 6 +++--- tests/bluetooth/ctrl_sw_privacy/CMakeLists.txt | 5 ++--- tests/bluetooth/ctrl_sw_privacy_unit/CMakeLists.txt | 12 ++++++------ tests/bluetooth/ctrl_user_ext/CMakeLists.txt | 4 ++-- tests/bluetooth/gatt/CMakeLists.txt | 2 +- tests/bluetooth/hci_prop_evt/CMakeLists.txt | 2 +- tests/bluetooth/init/CMakeLists.txt | 2 +- tests/bluetooth/l2cap/CMakeLists.txt | 2 +- tests/bluetooth/ll_settings/CMakeLists.txt | 4 ++-- tests/bluetooth/mesh/CMakeLists.txt | 4 ++-- tests/bluetooth/mesh_shell/CMakeLists.txt | 2 +- tests/bluetooth/shell/CMakeLists.txt | 4 ++-- tests/bluetooth/tester/CMakeLists.txt | 4 ++-- tests/bluetooth/uuid/CMakeLists.txt | 2 +- tests/boards/altera_max10/i2c_master/CMakeLists.txt | 2 +- tests/boards/altera_max10/msgdma/CMakeLists.txt | 2 +- tests/boards/altera_max10/qspi/CMakeLists.txt | 2 +- tests/boards/altera_max10/sysid/CMakeLists.txt | 2 +- tests/boards/board_shell/CMakeLists.txt | 2 +- tests/boards/intel_s1000_crb/CMakeLists.txt | 2 +- tests/boards/intel_s1000_crb/cache/CMakeLists.txt | 2 +- .../boards/native_posix/native_tasks/CMakeLists.txt | 2 +- tests/boards/native_posix/rtc/CMakeLists.txt | 2 +- tests/crypto/mbedtls/CMakeLists.txt | 2 +- tests/crypto/rand32/CMakeLists.txt | 2 +- tests/crypto/tinycrypt/CMakeLists.txt | 2 +- tests/crypto/tinycrypt_hmac_prng/CMakeLists.txt | 2 +- tests/drivers/adc/adc_api/CMakeLists.txt | 2 +- tests/drivers/build_all/CMakeLists.txt | 2 +- tests/drivers/can/api/CMakeLists.txt | 2 +- tests/drivers/can/stm32/CMakeLists.txt | 2 +- .../clock_control/clock_control_api/CMakeLists.txt | 2 +- .../nrf_clock_calibration/CMakeLists.txt | 2 +- .../drivers/counter/counter_basic_api/CMakeLists.txt | 2 +- tests/drivers/counter/counter_cmos/CMakeLists.txt | 2 +- .../counter/counter_nrf_rtc/fixed_top/CMakeLists.txt | 2 +- tests/drivers/dma/chan_blen_transfer/CMakeLists.txt | 2 +- tests/drivers/dma/loop_transfer/CMakeLists.txt | 2 +- tests/drivers/eeprom/CMakeLists.txt | 2 +- tests/drivers/entropy/api/CMakeLists.txt | 2 +- tests/drivers/flash_simulator/CMakeLists.txt | 2 +- tests/drivers/gpio/gpio_api_1pin/CMakeLists.txt | 2 +- tests/drivers/gpio/gpio_basic_api/CMakeLists.txt | 2 +- tests/drivers/hwinfo/api/CMakeLists.txt | 2 +- tests/drivers/i2c/i2c_api/CMakeLists.txt | 2 +- tests/drivers/i2c/i2c_slave_api/CMakeLists.txt | 2 +- tests/drivers/i2s/i2s_api/CMakeLists.txt | 2 +- tests/drivers/i2s/i2s_speed/CMakeLists.txt | 2 +- tests/drivers/ipm/CMakeLists.txt | 2 +- tests/drivers/kscan/kscan_api/CMakeLists.txt | 2 +- tests/drivers/pwm/pwm_api/CMakeLists.txt | 2 +- tests/drivers/spi/spi_loopback/CMakeLists.txt | 2 +- tests/drivers/uart/uart_async_api/CMakeLists.txt | 2 +- tests/drivers/uart/uart_basic_api/CMakeLists.txt | 2 +- tests/drivers/watchdog/wdt_basic_api/CMakeLists.txt | 2 +- tests/kernel/common/CMakeLists.txt | 2 +- tests/kernel/context/CMakeLists.txt | 2 +- tests/kernel/critical/CMakeLists.txt | 2 +- tests/kernel/device/CMakeLists.txt | 2 +- tests/kernel/early_sleep/CMakeLists.txt | 2 +- tests/kernel/fatal/CMakeLists.txt | 2 +- tests/kernel/fifo/fifo_api/CMakeLists.txt | 2 +- tests/kernel/fifo/fifo_timeout/CMakeLists.txt | 2 +- tests/kernel/fifo/fifo_usage/CMakeLists.txt | 2 +- tests/kernel/fp_sharing/float_disable/CMakeLists.txt | 2 +- tests/kernel/fp_sharing/generic/CMakeLists.txt | 2 +- tests/kernel/gen_isr_table/CMakeLists.txt | 2 +- tests/kernel/interrupt/CMakeLists.txt | 2 +- tests/kernel/lifo/lifo_api/CMakeLists.txt | 2 +- tests/kernel/lifo/lifo_usage/CMakeLists.txt | 2 +- tests/kernel/mbox/mbox_api/CMakeLists.txt | 2 +- tests/kernel/mbox/mbox_usage/CMakeLists.txt | 2 +- .../kernel/mem_heap/mheap_api_concept/CMakeLists.txt | 2 +- tests/kernel/mem_pool/mem_pool/CMakeLists.txt | 2 +- tests/kernel/mem_pool/mem_pool_api/CMakeLists.txt | 2 +- .../kernel/mem_pool/mem_pool_concept/CMakeLists.txt | 2 +- .../mem_pool/mem_pool_threadsafe/CMakeLists.txt | 2 +- tests/kernel/mem_pool/sys_mem_pool/CMakeLists.txt | 2 +- tests/kernel/mem_protect/futex/CMakeLists.txt | 2 +- tests/kernel/mem_protect/mem_protect/CMakeLists.txt | 2 +- .../kernel/mem_protect/obj_validation/CMakeLists.txt | 2 +- tests/kernel/mem_protect/protection/CMakeLists.txt | 2 +- tests/kernel/mem_protect/stack_random/CMakeLists.txt | 2 +- tests/kernel/mem_protect/stackprot/CMakeLists.txt | 2 +- tests/kernel/mem_protect/sys_sem/CMakeLists.txt | 2 +- tests/kernel/mem_protect/syscalls/CMakeLists.txt | 2 +- tests/kernel/mem_protect/userspace/CMakeLists.txt | 2 +- tests/kernel/mem_slab/mslab/CMakeLists.txt | 2 +- tests/kernel/mem_slab/mslab_api/CMakeLists.txt | 2 +- tests/kernel/mem_slab/mslab_concept/CMakeLists.txt | 2 +- .../kernel/mem_slab/mslab_threadsafe/CMakeLists.txt | 2 +- tests/kernel/mp/CMakeLists.txt | 2 +- tests/kernel/msgq/msgq_api/CMakeLists.txt | 2 +- tests/kernel/mutex/mutex_api/CMakeLists.txt | 2 +- tests/kernel/mutex/sys_mutex/CMakeLists.txt | 2 +- tests/kernel/obj_tracing/CMakeLists.txt | 2 +- tests/kernel/pending/CMakeLists.txt | 2 +- tests/kernel/pipe/pipe/CMakeLists.txt | 2 +- tests/kernel/pipe/pipe_api/CMakeLists.txt | 2 +- tests/kernel/poll/CMakeLists.txt | 2 +- tests/kernel/profiling/profiling_api/CMakeLists.txt | 2 +- tests/kernel/queue/CMakeLists.txt | 2 +- tests/kernel/sched/deadline/CMakeLists.txt | 2 +- tests/kernel/sched/metairq/CMakeLists.txt | 2 +- tests/kernel/sched/preempt/CMakeLists.txt | 2 +- tests/kernel/sched/schedule_api/CMakeLists.txt | 2 +- tests/kernel/semaphore/semaphore/CMakeLists.txt | 2 +- tests/kernel/sleep/CMakeLists.txt | 2 +- tests/kernel/smp/CMakeLists.txt | 2 +- tests/kernel/spinlock/CMakeLists.txt | 2 +- tests/kernel/stack/stack/CMakeLists.txt | 2 +- tests/kernel/threads/dynamic_thread/CMakeLists.txt | 2 +- .../kernel/threads/no-multithreading/CMakeLists.txt | 2 +- tests/kernel/threads/thread_apis/CMakeLists.txt | 2 +- tests/kernel/threads/thread_init/CMakeLists.txt | 2 +- tests/kernel/tickless/tickless/CMakeLists.txt | 2 +- .../kernel/tickless/tickless_concept/CMakeLists.txt | 2 +- tests/kernel/timer/starve/CMakeLists.txt | 2 +- tests/kernel/timer/timer_api/CMakeLists.txt | 2 +- tests/kernel/timer/timer_monotonic/CMakeLists.txt | 2 +- tests/kernel/workq/work_queue/CMakeLists.txt | 2 +- tests/kernel/workq/work_queue_api/CMakeLists.txt | 2 +- tests/kernel/xip/CMakeLists.txt | 2 +- tests/lib/c_lib/CMakeLists.txt | 2 +- tests/lib/devicetree/CMakeLists.txt | 2 +- tests/lib/fdtable/CMakeLists.txt | 2 +- tests/lib/gui/lvgl/CMakeLists.txt | 2 +- tests/lib/json/CMakeLists.txt | 2 +- tests/lib/mem_alloc/CMakeLists.txt | 2 +- tests/lib/onoff/CMakeLists.txt | 2 +- tests/lib/ringbuffer/CMakeLists.txt | 2 +- tests/lib/sprintf/CMakeLists.txt | 2 +- tests/misc/test_build/CMakeLists.txt | 2 +- tests/net/6lo/CMakeLists.txt | 4 ++-- tests/net/all/CMakeLists.txt | 2 +- tests/net/arp/CMakeLists.txt | 6 +++--- tests/net/buf/CMakeLists.txt | 4 ++-- tests/net/checksum_offload/CMakeLists.txt | 4 ++-- tests/net/context/CMakeLists.txt | 4 ++-- tests/net/dhcpv4/CMakeLists.txt | 4 ++-- tests/net/ethernet_mgmt/CMakeLists.txt | 2 +- tests/net/hostname/CMakeLists.txt | 4 ++-- tests/net/icmpv4/CMakeLists.txt | 4 ++-- tests/net/icmpv6/CMakeLists.txt | 4 ++-- tests/net/ieee802154/fragment/CMakeLists.txt | 6 +++--- tests/net/ieee802154/l2/CMakeLists.txt | 6 +++--- tests/net/iface/CMakeLists.txt | 4 ++-- tests/net/ip-addr/CMakeLists.txt | 4 ++-- tests/net/ipv6/CMakeLists.txt | 4 ++-- tests/net/ipv6_fragment/CMakeLists.txt | 4 ++-- tests/net/lib/coap/CMakeLists.txt | 4 ++-- tests/net/lib/dns_addremove/CMakeLists.txt | 4 ++-- tests/net/lib/dns_packet/CMakeLists.txt | 2 +- tests/net/lib/dns_resolve/CMakeLists.txt | 4 ++-- tests/net/lib/http_header_fields/CMakeLists.txt | 4 ++-- tests/net/lib/mqtt_packet/CMakeLists.txt | 6 +++--- tests/net/lib/mqtt_publisher/CMakeLists.txt | 4 ++-- tests/net/lib/mqtt_pubsub/CMakeLists.txt | 4 ++-- tests/net/lib/mqtt_subscriber/CMakeLists.txt | 4 ++-- tests/net/lib/tls_credentials/CMakeLists.txt | 4 ++-- tests/net/mgmt/CMakeLists.txt | 4 ++-- tests/net/mld/CMakeLists.txt | 4 ++-- tests/net/neighbor/CMakeLists.txt | 4 ++-- tests/net/net_pkt/CMakeLists.txt | 2 +- tests/net/ppp/driver/CMakeLists.txt | 4 ++-- tests/net/promiscuous/CMakeLists.txt | 4 ++-- tests/net/ptp/clock/CMakeLists.txt | 4 ++-- tests/net/route/CMakeLists.txt | 4 ++-- tests/net/shell/CMakeLists.txt | 4 ++-- tests/net/socket/af_packet/CMakeLists.txt | 4 ++-- tests/net/socket/getaddrinfo/CMakeLists.txt | 6 +++--- tests/net/socket/getnameinfo/CMakeLists.txt | 2 +- tests/net/socket/misc/CMakeLists.txt | 2 +- tests/net/socket/net_mgmt/CMakeLists.txt | 6 +++--- tests/net/socket/poll/CMakeLists.txt | 4 ++-- tests/net/socket/register/CMakeLists.txt | 2 +- tests/net/socket/select/CMakeLists.txt | 2 +- tests/net/socket/tcp/CMakeLists.txt | 4 ++-- tests/net/socket/udp/CMakeLists.txt | 4 ++-- tests/net/socket/websocket/CMakeLists.txt | 4 ++-- tests/net/tcp/CMakeLists.txt | 4 ++-- tests/net/traffic_class/CMakeLists.txt | 4 ++-- tests/net/trickle/CMakeLists.txt | 4 ++-- tests/net/tx_timestamp/CMakeLists.txt | 4 ++-- tests/net/udp/CMakeLists.txt | 4 ++-- tests/net/utils/CMakeLists.txt | 4 ++-- tests/net/vlan/CMakeLists.txt | 4 ++-- tests/portability/cmsis_rtos_v1/CMakeLists.txt | 4 ++-- tests/portability/cmsis_rtos_v2/CMakeLists.txt | 4 ++-- tests/posix/common/CMakeLists.txt | 2 +- tests/posix/fs/CMakeLists.txt | 2 +- tests/shell/CMakeLists.txt | 2 +- tests/subsys/canbus/frame/CMakeLists.txt | 2 +- tests/subsys/canbus/isotp/conformance/CMakeLists.txt | 2 +- .../canbus/isotp/implementation/CMakeLists.txt | 2 +- tests/subsys/dfu/img_util/CMakeLists.txt | 2 +- tests/subsys/dfu/mcuboot/CMakeLists.txt | 2 +- tests/subsys/fs/fat_fs_api/CMakeLists.txt | 2 +- tests/subsys/fs/fat_fs_dual_drive/CMakeLists.txt | 2 +- tests/subsys/fs/fcb/CMakeLists.txt | 4 ++-- tests/subsys/fs/littlefs/CMakeLists.txt | 2 +- tests/subsys/fs/multi-fs/CMakeLists.txt | 2 +- tests/subsys/fs/nvs/CMakeLists.txt | 4 ++-- tests/subsys/jwt/CMakeLists.txt | 2 +- tests/subsys/logging/log_core/CMakeLists.txt | 2 +- tests/subsys/logging/log_immediate/CMakeLists.txt | 2 +- tests/subsys/logging/log_list/CMakeLists.txt | 2 +- tests/subsys/logging/log_msg/CMakeLists.txt | 2 +- tests/subsys/logging/log_output/CMakeLists.txt | 2 +- tests/subsys/settings/fcb/base64/CMakeLists.txt | 2 +- tests/subsys/settings/fcb/raw/CMakeLists.txt | 2 +- tests/subsys/settings/fcb/src/CMakeLists.txt | 6 +++--- tests/subsys/settings/fcb_init/CMakeLists.txt | 2 +- tests/subsys/settings/functional/fcb/CMakeLists.txt | 2 +- tests/subsys/settings/functional/file/CMakeLists.txt | 6 +++--- tests/subsys/settings/functional/nvs/CMakeLists.txt | 2 +- tests/subsys/settings/functional/src/CMakeLists.txt | 4 ++-- tests/subsys/settings/littlefs/base64/CMakeLists.txt | 2 +- tests/subsys/settings/littlefs/raw/CMakeLists.txt | 2 +- tests/subsys/settings/littlefs/src/CMakeLists.txt | 8 ++++---- tests/subsys/settings/nvs/raw/CMakeLists.txt | 2 +- tests/subsys/settings/nvs/src/CMakeLists.txt | 6 +++--- tests/subsys/shell/shell_history/CMakeLists.txt | 2 +- tests/subsys/storage/flash_map/CMakeLists.txt | 2 +- tests/subsys/tracing/CMakeLists.txt | 2 +- tests/subsys/usb/bos/CMakeLists.txt | 2 +- tests/subsys/usb/desc_sections/CMakeLists.txt | 2 +- tests/subsys/usb/device/CMakeLists.txt | 2 +- tests/subsys/usb/os_desc/CMakeLists.txt | 2 +- tests/unit/base64/CMakeLists.txt | 2 +- tests/unit/crc/CMakeLists.txt | 2 +- tests/unit/intmath/CMakeLists.txt | 2 +- tests/unit/list/CMakeLists.txt | 2 +- tests/unit/math_extras/CMakeLists.txt | 2 +- tests/unit/rbtree/CMakeLists.txt | 2 +- tests/unit/timeutil/CMakeLists.txt | 2 +- tests/unit/util/CMakeLists.txt | 2 +- tests/ztest/base/CMakeLists.txt | 4 ++-- tests/ztest/custom_output/CMakeLists.txt | 2 +- tests/ztest/mock/CMakeLists.txt | 4 ++-- 491 files changed, 626 insertions(+), 629 deletions(-) diff --git a/samples/application_development/code_relocation/CMakeLists.txt b/samples/application_development/code_relocation/CMakeLists.txt index f3af5320607..bbc47932277 100644 --- a/samples/application_development/code_relocation/CMakeLists.txt +++ b/samples/application_development/code_relocation/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(test_relocation) FILE(GLOB app_sources src/*.c) diff --git a/samples/application_development/external_lib/CMakeLists.txt b/samples/application_development/external_lib/CMakeLists.txt index e4443824f30..8dda0d204ac 100644 --- a/samples/application_development/external_lib/CMakeLists.txt +++ b/samples/application_development/external_lib/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(external_lib) target_sources(app PRIVATE src/main.c) diff --git a/samples/application_development/out_of_tree_board/CMakeLists.txt b/samples/application_development/out_of_tree_board/CMakeLists.txt index c0da1c4aa77..62ac20ec661 100644 --- a/samples/application_development/out_of_tree_board/CMakeLists.txt +++ b/samples/application_development/out_of_tree_board/CMakeLists.txt @@ -10,7 +10,7 @@ set(BOARD_ROOT ${CMAKE_CURRENT_LIST_DIR}) # this board. set(BOARD nrf52840dk_nrf52840) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(out_of_tree_board) target_sources(app PRIVATE src/main.c) diff --git a/samples/application_development/out_of_tree_driver/CMakeLists.txt b/samples/application_development/out_of_tree_driver/CMakeLists.txt index fc2a421ce23..ea3bace809c 100644 --- a/samples/application_development/out_of_tree_driver/CMakeLists.txt +++ b/samples/application_development/out_of_tree_driver/CMakeLists.txt @@ -13,7 +13,7 @@ cmake_minimum_required(VERSION 3.13.1) # be able to find the module's syscalls. list(APPEND SYSCALL_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/hello_world_module/zephyr) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) target_sources(app PRIVATE diff --git a/samples/basic/blink_led/CMakeLists.txt b/samples/basic/blink_led/CMakeLists.txt index a5afd776d63..8ff7ce38788 100644 --- a/samples/basic/blink_led/CMakeLists.txt +++ b/samples/basic/blink_led/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(blink_led) target_sources(app PRIVATE src/main.c) diff --git a/samples/basic/blinky/CMakeLists.txt b/samples/basic/blinky/CMakeLists.txt index 37015fe428e..d0a8db21808 100644 --- a/samples/basic/blinky/CMakeLists.txt +++ b/samples/basic/blinky/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(blinky) target_sources(app PRIVATE src/main.c) diff --git a/samples/basic/button/CMakeLists.txt b/samples/basic/button/CMakeLists.txt index 25bcdb6c51a..295658d68a5 100644 --- a/samples/basic/button/CMakeLists.txt +++ b/samples/basic/button/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(button) target_sources(app PRIVATE src/main.c) diff --git a/samples/basic/fade_led/CMakeLists.txt b/samples/basic/fade_led/CMakeLists.txt index 11bbaadb760..4153aaf9585 100644 --- a/samples/basic/fade_led/CMakeLists.txt +++ b/samples/basic/fade_led/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fade_led) target_sources(app PRIVATE src/main.c) diff --git a/samples/basic/minimal/CMakeLists.txt b/samples/basic/minimal/CMakeLists.txt index 0ffa890ac02..a5428a1604b 100644 --- a/samples/basic/minimal/CMakeLists.txt +++ b/samples/basic/minimal/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(minimal) target_sources(app PRIVATE src/main.c) diff --git a/samples/basic/rgb_led/CMakeLists.txt b/samples/basic/rgb_led/CMakeLists.txt index f69650afa10..4eb0200909b 100644 --- a/samples/basic/rgb_led/CMakeLists.txt +++ b/samples/basic/rgb_led/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(rgb_led) target_sources(app PRIVATE src/main.c) diff --git a/samples/basic/servo_motor/CMakeLists.txt b/samples/basic/servo_motor/CMakeLists.txt index 4225ca38ef5..7453ab346f0 100644 --- a/samples/basic/servo_motor/CMakeLists.txt +++ b/samples/basic/servo_motor/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(servo_motor) target_sources(app PRIVATE src/main.c) diff --git a/samples/basic/threads/CMakeLists.txt b/samples/basic/threads/CMakeLists.txt index 03e58faab32..6c3a60d9b4d 100644 --- a/samples/basic/threads/CMakeLists.txt +++ b/samples/basic/threads/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(threads) target_sources(app PRIVATE src/main.c) diff --git a/samples/bluetooth/beacon/CMakeLists.txt b/samples/bluetooth/beacon/CMakeLists.txt index d4df3dece76..c2dfe9f8e02 100644 --- a/samples/bluetooth/beacon/CMakeLists.txt +++ b/samples/bluetooth/beacon/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(beacon) target_sources(app PRIVATE src/main.c) diff --git a/samples/bluetooth/central/CMakeLists.txt b/samples/bluetooth/central/CMakeLists.txt index dec4bb36bcc..54c3d6fe140 100644 --- a/samples/bluetooth/central/CMakeLists.txt +++ b/samples/bluetooth/central/CMakeLists.txt @@ -1,11 +1,11 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(central) target_sources(app PRIVATE src/main.c ) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/bluetooth/central_hr/CMakeLists.txt b/samples/bluetooth/central_hr/CMakeLists.txt index 45b3987e07d..e656662d675 100644 --- a/samples/bluetooth/central_hr/CMakeLists.txt +++ b/samples/bluetooth/central_hr/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(central_hr) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/bluetooth/eddystone/CMakeLists.txt b/samples/bluetooth/eddystone/CMakeLists.txt index 980c3ec62c7..d3c5ae51a5e 100644 --- a/samples/bluetooth/eddystone/CMakeLists.txt +++ b/samples/bluetooth/eddystone/CMakeLists.txt @@ -1,11 +1,11 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(eddystone) target_sources(app PRIVATE src/main.c ) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/bluetooth/handsfree/CMakeLists.txt b/samples/bluetooth/handsfree/CMakeLists.txt index 5e05995df5d..efc3fb167e2 100644 --- a/samples/bluetooth/handsfree/CMakeLists.txt +++ b/samples/bluetooth/handsfree/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(handsfree) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/bluetooth/hci_pwr_ctrl/CMakeLists.txt b/samples/bluetooth/hci_pwr_ctrl/CMakeLists.txt index 198bad20030..56e2ed25b93 100644 --- a/samples/bluetooth/hci_pwr_ctrl/CMakeLists.txt +++ b/samples/bluetooth/hci_pwr_ctrl/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hci_pwr_ctrl) target_sources(app PRIVATE src/main.c) diff --git a/samples/bluetooth/hci_rpmsg/CMakeLists.txt b/samples/bluetooth/hci_rpmsg/CMakeLists.txt index bad6906aaa8..d5d8dabfb1e 100644 --- a/samples/bluetooth/hci_rpmsg/CMakeLists.txt +++ b/samples/bluetooth/hci_rpmsg/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hci_rpmsg) target_sources(app PRIVATE src/main.c) diff --git a/samples/bluetooth/hci_spi/CMakeLists.txt b/samples/bluetooth/hci_spi/CMakeLists.txt index 51c8f47e3bb..1591aff78f0 100644 --- a/samples/bluetooth/hci_spi/CMakeLists.txt +++ b/samples/bluetooth/hci_spi/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hci_spi) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/bluetooth/hci_uart/CMakeLists.txt b/samples/bluetooth/hci_uart/CMakeLists.txt index 5aff9dedb3e..59eca34de1e 100644 --- a/samples/bluetooth/hci_uart/CMakeLists.txt +++ b/samples/bluetooth/hci_uart/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hci_uart) target_sources(app PRIVATE src/main.c) diff --git a/samples/bluetooth/hci_usb/CMakeLists.txt b/samples/bluetooth/hci_usb/CMakeLists.txt index a7462ee718a..2bea6092baa 100644 --- a/samples/bluetooth/hci_usb/CMakeLists.txt +++ b/samples/bluetooth/hci_usb/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hci_usb) target_sources(app PRIVATE src/main.c) diff --git a/samples/bluetooth/ibeacon/CMakeLists.txt b/samples/bluetooth/ibeacon/CMakeLists.txt index adf97d5f873..01eeaab72ae 100644 --- a/samples/bluetooth/ibeacon/CMakeLists.txt +++ b/samples/bluetooth/ibeacon/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ibeacon) target_sources(app PRIVATE src/main.c) diff --git a/samples/bluetooth/ipsp/CMakeLists.txt b/samples/bluetooth/ipsp/CMakeLists.txt index f5aef63ef3f..945ee124d55 100644 --- a/samples/bluetooth/ipsp/CMakeLists.txt +++ b/samples/bluetooth/ipsp/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ipsp) target_sources(app PRIVATE diff --git a/samples/bluetooth/mesh/CMakeLists.txt b/samples/bluetooth/mesh/CMakeLists.txt index 5547c4c5763..c6369c9f91a 100644 --- a/samples/bluetooth/mesh/CMakeLists.txt +++ b/samples/bluetooth/mesh/CMakeLists.txt @@ -7,7 +7,7 @@ if((BOARD STREQUAL nrf51_blenano) OR (BOARD STREQUAL nrf51_ble400)) set(CONF_FILE nrf51_qfaa.conf) endif() -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mesh) target_sources(app PRIVATE src/main.c) diff --git a/samples/bluetooth/mesh_demo/CMakeLists.txt b/samples/bluetooth/mesh_demo/CMakeLists.txt index f746d1d45f2..20bc4c4e3e7 100644 --- a/samples/bluetooth/mesh_demo/CMakeLists.txt +++ b/samples/bluetooth/mesh_demo/CMakeLists.txt @@ -3,13 +3,13 @@ cmake_minimum_required(VERSION 3.13.1) set(QEMU_EXTRA_FLAGS -s) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mesh_demo) target_sources(app PRIVATE src/main.c) target_sources_ifdef(CONFIG_BOARD_BBC_MICROBIT app PRIVATE src/microbit.c) zephyr_include_directories_ifdef(CONFIG_BOARD_BBC_MICROBIT - $ENV{ZEPHYR_BASE}/boards/arm/bbc_microbit) + ${ZEPHYR_BASE}/boards/arm/bbc_microbit) if(NODE_ADDR) zephyr_compile_definitions(NODE_ADDR=${NODE_ADDR}) diff --git a/samples/bluetooth/mesh_provisioner/CMakeLists.txt b/samples/bluetooth/mesh_provisioner/CMakeLists.txt index 7fce3dea624..827016a1a9f 100644 --- a/samples/bluetooth/mesh_provisioner/CMakeLists.txt +++ b/samples/bluetooth/mesh_provisioner/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13.1) set(QEMU_EXTRA_FLAGS -s) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mesh_provisioner) target_sources(app PRIVATE src/main.c) diff --git a/samples/bluetooth/peripheral/CMakeLists.txt b/samples/bluetooth/peripheral/CMakeLists.txt index 372514f0c1c..e1332810d6a 100644 --- a/samples/bluetooth/peripheral/CMakeLists.txt +++ b/samples/bluetooth/peripheral/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(peripheral) target_sources(app PRIVATE diff --git a/samples/bluetooth/peripheral_csc/CMakeLists.txt b/samples/bluetooth/peripheral_csc/CMakeLists.txt index cb77a608bc0..9819ef89b73 100644 --- a/samples/bluetooth/peripheral_csc/CMakeLists.txt +++ b/samples/bluetooth/peripheral_csc/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(peripheral_csc) FILE(GLOB app_sources src/*.c) @@ -9,4 +9,4 @@ target_sources(app PRIVATE ${app_sources} ) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/bluetooth/peripheral_dis/CMakeLists.txt b/samples/bluetooth/peripheral_dis/CMakeLists.txt index 2b77f8a7540..da183cd3647 100644 --- a/samples/bluetooth/peripheral_dis/CMakeLists.txt +++ b/samples/bluetooth/peripheral_dis/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(peripheral_dis) FILE(GLOB app_sources src/*.c) @@ -9,4 +9,4 @@ target_sources(app PRIVATE ${app_sources} ) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/bluetooth/peripheral_esp/CMakeLists.txt b/samples/bluetooth/peripheral_esp/CMakeLists.txt index 9c3fcb9063d..4e038e36c07 100644 --- a/samples/bluetooth/peripheral_esp/CMakeLists.txt +++ b/samples/bluetooth/peripheral_esp/CMakeLists.txt @@ -1,11 +1,11 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(peripheral_esp) target_sources(app PRIVATE src/main.c ) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/bluetooth/peripheral_hids/CMakeLists.txt b/samples/bluetooth/peripheral_hids/CMakeLists.txt index a2bf7b5e005..fc39d1e2105 100644 --- a/samples/bluetooth/peripheral_hids/CMakeLists.txt +++ b/samples/bluetooth/peripheral_hids/CMakeLists.txt @@ -1,11 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(peripheral_hids) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources} ) - diff --git a/samples/bluetooth/peripheral_hr/CMakeLists.txt b/samples/bluetooth/peripheral_hr/CMakeLists.txt index 279e6af9d35..ea4395c7ef5 100644 --- a/samples/bluetooth/peripheral_hr/CMakeLists.txt +++ b/samples/bluetooth/peripheral_hr/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(peripheral_hr) FILE(GLOB app_sources src/*.c) @@ -10,4 +10,4 @@ target_sources(app PRIVATE ${app_sources} ) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/bluetooth/peripheral_ht/CMakeLists.txt b/samples/bluetooth/peripheral_ht/CMakeLists.txt index 0d975bb57a2..611da868452 100644 --- a/samples/bluetooth/peripheral_ht/CMakeLists.txt +++ b/samples/bluetooth/peripheral_ht/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(peripheral_ht) FILE(GLOB app_sources src/*.c) diff --git a/samples/bluetooth/peripheral_sc_only/CMakeLists.txt b/samples/bluetooth/peripheral_sc_only/CMakeLists.txt index dbcad42e4c1..b0aef97e76f 100644 --- a/samples/bluetooth/peripheral_sc_only/CMakeLists.txt +++ b/samples/bluetooth/peripheral_sc_only/CMakeLists.txt @@ -1,11 +1,11 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(peripheral_sc_only) target_sources(app PRIVATE src/main.c ) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/bluetooth/scan_adv/CMakeLists.txt b/samples/bluetooth/scan_adv/CMakeLists.txt index 9ec769641e1..de92e4b1ac3 100644 --- a/samples/bluetooth/scan_adv/CMakeLists.txt +++ b/samples/bluetooth/scan_adv/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(scan_adv) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/bluetooth/st_ble_sensor/CMakeLists.txt b/samples/bluetooth/st_ble_sensor/CMakeLists.txt index 6ea9a297e7a..86d4fc29678 100644 --- a/samples/bluetooth/st_ble_sensor/CMakeLists.txt +++ b/samples/bluetooth/st_ble_sensor/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(st_ble_sensor) FILE(GLOB app_sources src/*.c) @@ -9,4 +9,4 @@ target_sources(app PRIVATE ${app_sources} ) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) diff --git a/samples/boards/96b_argonkey/microphone/CMakeLists.txt b/samples/boards/96b_argonkey/microphone/CMakeLists.txt index a951f6ea2b8..16c5a6977aa 100644 --- a/samples/boards/96b_argonkey/microphone/CMakeLists.txt +++ b/samples/boards/96b_argonkey/microphone/CMakeLists.txt @@ -4,7 +4,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) target_sources(app PRIVATE src/main.c) diff --git a/samples/boards/96b_argonkey/sensors/CMakeLists.txt b/samples/boards/96b_argonkey/sensors/CMakeLists.txt index 8c2aeec33dd..6d485e19c50 100644 --- a/samples/boards/96b_argonkey/sensors/CMakeLists.txt +++ b/samples/boards/96b_argonkey/sensors/CMakeLists.txt @@ -4,7 +4,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(96b_argonkey) target_sources(app PRIVATE src/main.c) diff --git a/samples/boards/arc_secure_services/CMakeLists.txt b/samples/boards/arc_secure_services/CMakeLists.txt index ba6c2fe68a9..546eed006c1 100644 --- a/samples/boards/arc_secure_services/CMakeLists.txt +++ b/samples/boards/arc_secure_services/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(arc_secure_services) target_sources(app PRIVATE src/main.c) diff --git a/samples/boards/bbc_microbit/display/CMakeLists.txt b/samples/boards/bbc_microbit/display/CMakeLists.txt index 7a1be91ead0..15096558871 100644 --- a/samples/boards/bbc_microbit/display/CMakeLists.txt +++ b/samples/boards/bbc_microbit/display/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(display) FILE(GLOB app_sources src/*.c) diff --git a/samples/boards/bbc_microbit/line_follower_robot/CMakeLists.txt b/samples/boards/bbc_microbit/line_follower_robot/CMakeLists.txt index e6e3ac08f24..9b0046e61f5 100644 --- a/samples/boards/bbc_microbit/line_follower_robot/CMakeLists.txt +++ b/samples/boards/bbc_microbit/line_follower_robot/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(robot) FILE(GLOB app_sources src/*.c) diff --git a/samples/boards/bbc_microbit/pong/CMakeLists.txt b/samples/boards/bbc_microbit/pong/CMakeLists.txt index 21099aa308e..0a567739748 100644 --- a/samples/boards/bbc_microbit/pong/CMakeLists.txt +++ b/samples/boards/bbc_microbit/pong/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(pong) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -zephyr_include_directories($ENV{ZEPHYR_BASE}/boards/arm/bbc_microbit) +zephyr_include_directories(${ZEPHYR_BASE}/boards/arm/bbc_microbit) diff --git a/samples/boards/bbc_microbit/sound/CMakeLists.txt b/samples/boards/bbc_microbit/sound/CMakeLists.txt index c72daaf9ecd..c2a8f6a5514 100644 --- a/samples/boards/bbc_microbit/sound/CMakeLists.txt +++ b/samples/boards/bbc_microbit/sound/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sound) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -zephyr_include_directories($ENV{ZEPHYR_BASE}/boards/arm/bbc_microbit) +zephyr_include_directories(${ZEPHYR_BASE}/boards/arm/bbc_microbit) diff --git a/samples/boards/intel_s1000_crb/audio/CMakeLists.txt b/samples/boards/intel_s1000_crb/audio/CMakeLists.txt index c6006032aac..d4bae6b0eae 100644 --- a/samples/boards/intel_s1000_crb/audio/CMakeLists.txt +++ b/samples/boards/intel_s1000_crb/audio/CMakeLists.txt @@ -2,7 +2,7 @@ set(BOARD intel_s1000_crb) cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) target_sources(app PRIVATE src/audio_driver.c) diff --git a/samples/boards/intel_s1000_crb/dmic/CMakeLists.txt b/samples/boards/intel_s1000_crb/dmic/CMakeLists.txt index cb5b94e275c..6a3492b3842 100644 --- a/samples/boards/intel_s1000_crb/dmic/CMakeLists.txt +++ b/samples/boards/intel_s1000_crb/dmic/CMakeLists.txt @@ -2,7 +2,7 @@ set(BOARD intel_s1000_crb) cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) target_sources(app PRIVATE src/dmic_sample.c) diff --git a/samples/boards/intel_s1000_crb/i2s/CMakeLists.txt b/samples/boards/intel_s1000_crb/i2s/CMakeLists.txt index 87d4e9cf27e..f49030c681e 100644 --- a/samples/boards/intel_s1000_crb/i2s/CMakeLists.txt +++ b/samples/boards/intel_s1000_crb/i2s/CMakeLists.txt @@ -2,7 +2,7 @@ set(BOARD intel_s1000_crb) cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) target_sources(app PRIVATE src/i2s_sample.c) diff --git a/samples/boards/mec15xxevb_assy6853/power_management/CMakeLists.txt b/samples/boards/mec15xxevb_assy6853/power_management/CMakeLists.txt index bc7e57584d3..912f9387caf 100644 --- a/samples/boards/mec15xxevb_assy6853/power_management/CMakeLists.txt +++ b/samples/boards/mec15xxevb_assy6853/power_management/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mec15_brd_test) FILE(GLOB app_sources src/*.c) diff --git a/samples/boards/nrf/battery/CMakeLists.txt b/samples/boards/nrf/battery/CMakeLists.txt index 9fb519f8a8b..bead4e24591 100644 --- a/samples/boards/nrf/battery/CMakeLists.txt +++ b/samples/boards/nrf/battery/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(battery) FILE(GLOB app_sources src/*.c) diff --git a/samples/boards/nrf/mesh/onoff-app/CMakeLists.txt b/samples/boards/nrf/mesh/onoff-app/CMakeLists.txt index 929e30bbadd..04c98902e7c 100644 --- a/samples/boards/nrf/mesh/onoff-app/CMakeLists.txt +++ b/samples/boards/nrf/mesh/onoff-app/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13.1) set(QEMU_EXTRA_FLAGS -s) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(onoff-app) target_sources(app PRIVATE src/main.c) diff --git a/samples/boards/nrf/mesh/onoff_level_lighting_vnd_app/CMakeLists.txt b/samples/boards/nrf/mesh/onoff_level_lighting_vnd_app/CMakeLists.txt index 9fa73e8d761..d921a577ac6 100644 --- a/samples/boards/nrf/mesh/onoff_level_lighting_vnd_app/CMakeLists.txt +++ b/samples/boards/nrf/mesh/onoff_level_lighting_vnd_app/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13.1) set(QEMU_EXTRA_FLAGS -s) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(onoff_level_lighting_vnd_app) target_sources(app PRIVATE diff --git a/samples/boards/nrf/nrfx/CMakeLists.txt b/samples/boards/nrf/nrfx/CMakeLists.txt index d0d3f68870c..4ac867eacac 100644 --- a/samples/boards/nrf/nrfx/CMakeLists.txt +++ b/samples/boards/nrf/nrfx/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(nrfx_sample) target_sources(app PRIVATE src/main.c) diff --git a/samples/boards/nrf/system_off/CMakeLists.txt b/samples/boards/nrf/system_off/CMakeLists.txt index 775a541dfd4..38fa36237d5 100644 --- a/samples/boards/nrf/system_off/CMakeLists.txt +++ b/samples/boards/nrf/system_off/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(nrf_system_off) FILE(GLOB app_sources src/*.c) diff --git a/samples/boards/olimex_stm32_e407/ccm/CMakeLists.txt b/samples/boards/olimex_stm32_e407/ccm/CMakeLists.txt index aa8bc7c2558..73aadc51966 100644 --- a/samples/boards/olimex_stm32_e407/ccm/CMakeLists.txt +++ b/samples/boards/olimex_stm32_e407/ccm/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ccm) target_sources(app PRIVATE src/main.c) diff --git a/samples/boards/reel_board/mesh_badge/CMakeLists.txt b/samples/boards/reel_board/mesh_badge/CMakeLists.txt index 0cf17f3977d..7febe242f96 100644 --- a/samples/boards/reel_board/mesh_badge/CMakeLists.txt +++ b/samples/boards/reel_board/mesh_badge/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mesh_badge) FILE(GLOB app_sources src/*.c) diff --git a/samples/boards/sensortile_box/CMakeLists.txt b/samples/boards/sensortile_box/CMakeLists.txt index 41bccd9a5e8..38b8e6a8e31 100644 --- a/samples/boards/sensortile_box/CMakeLists.txt +++ b/samples/boards/sensortile_box/CMakeLists.txt @@ -4,7 +4,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sensortile_box) target_sources(app PRIVATE src/main.c) diff --git a/samples/boards/up_squared/gpio_counter/CMakeLists.txt b/samples/boards/up_squared/gpio_counter/CMakeLists.txt index 2e3d9187ae6..5240ab5a1dd 100644 --- a/samples/boards/up_squared/gpio_counter/CMakeLists.txt +++ b/samples/boards/up_squared/gpio_counter/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(gpio_counter) target_sources(app PRIVATE src/main.c) -zephyr_include_directories($ENV{ZEPHYR_BASE}/boards/x86/up_squared) +zephyr_include_directories(${ZEPHYR_BASE}/boards/x86/up_squared) diff --git a/samples/cpp_synchronization/CMakeLists.txt b/samples/cpp_synchronization/CMakeLists.txt index fdc8b90bbb9..8aa143edd31 100644 --- a/samples/cpp_synchronization/CMakeLists.txt +++ b/samples/cpp_synchronization/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(cpp_synchronization) target_sources(app PRIVATE src/main.cpp) diff --git a/samples/display/cfb/CMakeLists.txt b/samples/display/cfb/CMakeLists.txt index 44a8910dcd8..65f2979c3f2 100644 --- a/samples/display/cfb/CMakeLists.txt +++ b/samples/display/cfb/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(cfb) FILE(GLOB app_sources src/*.c) diff --git a/samples/display/cfb_custom_font/CMakeLists.txt b/samples/display/cfb_custom_font/CMakeLists.txt index c273eea761c..3edbba48457 100644 --- a/samples/display/cfb_custom_font/CMakeLists.txt +++ b/samples/display/cfb_custom_font/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) -include($ENV{ZEPHYR_BASE}/cmake/cfb.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) +include(${ZEPHYR_BASE}/cmake/cfb.cmake NO_POLICY_SCOPE) project(cfb_custom_font) target_sources(app PRIVATE src/main.c) diff --git a/samples/display/cfb_shell/CMakeLists.txt b/samples/display/cfb_shell/CMakeLists.txt index 44a8910dcd8..65f2979c3f2 100644 --- a/samples/display/cfb_shell/CMakeLists.txt +++ b/samples/display/cfb_shell/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(cfb) FILE(GLOB app_sources src/*.c) diff --git a/samples/display/grove_display/CMakeLists.txt b/samples/display/grove_display/CMakeLists.txt index cc55ea14c66..6a56ddb7519 100644 --- a/samples/display/grove_display/CMakeLists.txt +++ b/samples/display/grove_display/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(grove_display) FILE(GLOB app_sources src/*.c) diff --git a/samples/display/lvgl/CMakeLists.txt b/samples/display/lvgl/CMakeLists.txt index e5b250faa1e..1e923503b1c 100644 --- a/samples/display/lvgl/CMakeLists.txt +++ b/samples/display/lvgl/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lvgl) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/CAN/CMakeLists.txt b/samples/drivers/CAN/CMakeLists.txt index 1ec55878dce..de40cf9ea61 100644 --- a/samples/drivers/CAN/CMakeLists.txt +++ b/samples/drivers/CAN/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(CAN) target_sources(app PRIVATE src/main.c) diff --git a/samples/drivers/counter/alarm/CMakeLists.txt b/samples/drivers/counter/alarm/CMakeLists.txt index 86280f765bc..7e4ea25af1a 100644 --- a/samples/drivers/counter/alarm/CMakeLists.txt +++ b/samples/drivers/counter/alarm/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(counter) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/crypto/CMakeLists.txt b/samples/drivers/crypto/CMakeLists.txt index 95f669b4f23..7e8891475e7 100644 --- a/samples/drivers/crypto/CMakeLists.txt +++ b/samples/drivers/crypto/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(crypto) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/current_sensing/CMakeLists.txt b/samples/drivers/current_sensing/CMakeLists.txt index 29f03a91145..48975714e09 100644 --- a/samples/drivers/current_sensing/CMakeLists.txt +++ b/samples/drivers/current_sensing/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(current_sensing) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/display/CMakeLists.txt b/samples/drivers/display/CMakeLists.txt index 8bcc4f98473..b01219d9762 100644 --- a/samples/drivers/display/CMakeLists.txt +++ b/samples/drivers/display/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(display) target_sources(app PRIVATE src/main.c) diff --git a/samples/drivers/entropy/CMakeLists.txt b/samples/drivers/entropy/CMakeLists.txt index 5aeaa86fe32..585fe72fbff 100644 --- a/samples/drivers/entropy/CMakeLists.txt +++ b/samples/drivers/entropy/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(entropy) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/espi/CMakeLists.txt b/samples/drivers/espi/CMakeLists.txt index 096fe934d83..e378c9c77da 100644 --- a/samples/drivers/espi/CMakeLists.txt +++ b/samples/drivers/espi/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(espi) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/flash_shell/CMakeLists.txt b/samples/drivers/flash_shell/CMakeLists.txt index fe1e0bdc73a..34ce5a0d497 100644 --- a/samples/drivers/flash_shell/CMakeLists.txt +++ b/samples/drivers/flash_shell/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(flash_shell) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/ht16k33/CMakeLists.txt b/samples/drivers/ht16k33/CMakeLists.txt index 79ea63f102f..2439c0765a8 100644 --- a/samples/drivers/ht16k33/CMakeLists.txt +++ b/samples/drivers/ht16k33/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ht16k33) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/i2c_fujitsu_fram/CMakeLists.txt b/samples/drivers/i2c_fujitsu_fram/CMakeLists.txt index 1aa9ac5c743..c565dead535 100644 --- a/samples/drivers/i2c_fujitsu_fram/CMakeLists.txt +++ b/samples/drivers/i2c_fujitsu_fram/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(i2c_fujitsu_fram) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/kscan/CMakeLists.txt b/samples/drivers/kscan/CMakeLists.txt index 5424ef0e177..5a28edf9099 100644 --- a/samples/drivers/kscan/CMakeLists.txt +++ b/samples/drivers/kscan/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(kscan) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/lcd_hd44780/CMakeLists.txt b/samples/drivers/lcd_hd44780/CMakeLists.txt index 67260c3f7b2..f1b5f45d443 100644 --- a/samples/drivers/lcd_hd44780/CMakeLists.txt +++ b/samples/drivers/lcd_hd44780/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lcd_hd44780) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/led_apa102/CMakeLists.txt b/samples/drivers/led_apa102/CMakeLists.txt index 4c30a007bf7..9add413a853 100644 --- a/samples/drivers/led_apa102/CMakeLists.txt +++ b/samples/drivers/led_apa102/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(led_apa102) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/led_apa102c_bitbang/CMakeLists.txt b/samples/drivers/led_apa102c_bitbang/CMakeLists.txt index 62621bdc56f..93465fb292f 100644 --- a/samples/drivers/led_apa102c_bitbang/CMakeLists.txt +++ b/samples/drivers/led_apa102c_bitbang/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(led_apa102c) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/led_lp3943/CMakeLists.txt b/samples/drivers/led_lp3943/CMakeLists.txt index c5d0a683314..1657d4f886b 100644 --- a/samples/drivers/led_lp3943/CMakeLists.txt +++ b/samples/drivers/led_lp3943/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(led_lp3943) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/led_lp5562/CMakeLists.txt b/samples/drivers/led_lp5562/CMakeLists.txt index 8a317ac2bcb..00f59347df2 100644 --- a/samples/drivers/led_lp5562/CMakeLists.txt +++ b/samples/drivers/led_lp5562/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(led_lp5562) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/led_lpd8806/CMakeLists.txt b/samples/drivers/led_lpd8806/CMakeLists.txt index f446e696e7d..1db2911c96e 100644 --- a/samples/drivers/led_lpd8806/CMakeLists.txt +++ b/samples/drivers/led_lpd8806/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(led_lpd8806) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/led_pca9633/CMakeLists.txt b/samples/drivers/led_pca9633/CMakeLists.txt index 5c9cab625bf..add9c4b3c01 100644 --- a/samples/drivers/led_pca9633/CMakeLists.txt +++ b/samples/drivers/led_pca9633/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(led_pca9633) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/led_ws2812/CMakeLists.txt b/samples/drivers/led_ws2812/CMakeLists.txt index b73895884aa..1a8280c87a3 100644 --- a/samples/drivers/led_ws2812/CMakeLists.txt +++ b/samples/drivers/led_ws2812/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(led_ws2812) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/lora/receive/CMakeLists.txt b/samples/drivers/lora/receive/CMakeLists.txt index fa2e994c23d..6e10cc01e92 100644 --- a/samples/drivers/lora/receive/CMakeLists.txt +++ b/samples/drivers/lora/receive/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lora_receive) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/lora/send/CMakeLists.txt b/samples/drivers/lora/send/CMakeLists.txt index ce4b633d973..79a0158d982 100644 --- a/samples/drivers/lora/send/CMakeLists.txt +++ b/samples/drivers/lora/send/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lora_send) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/peci/CMakeLists.txt b/samples/drivers/peci/CMakeLists.txt index 0832823533c..431bd3cb383 100644 --- a/samples/drivers/peci/CMakeLists.txt +++ b/samples/drivers/peci/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(peci) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/ps2/CMakeLists.txt b/samples/drivers/ps2/CMakeLists.txt index 096fe934d83..e378c9c77da 100644 --- a/samples/drivers/ps2/CMakeLists.txt +++ b/samples/drivers/ps2/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(espi) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/soc_flash_nrf/CMakeLists.txt b/samples/drivers/soc_flash_nrf/CMakeLists.txt index e9a61408fe7..40ff1fb6525 100644 --- a/samples/drivers/soc_flash_nrf/CMakeLists.txt +++ b/samples/drivers/soc_flash_nrf/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(soc_flash_nrf) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/spi_flash/CMakeLists.txt b/samples/drivers/spi_flash/CMakeLists.txt index 6d5bc319e14..60cb993f942 100644 --- a/samples/drivers/spi_flash/CMakeLists.txt +++ b/samples/drivers/spi_flash/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(spi_flash) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/spi_fujitsu_fram/CMakeLists.txt b/samples/drivers/spi_fujitsu_fram/CMakeLists.txt index 99f3d81fff2..4b934951fab 100644 --- a/samples/drivers/spi_fujitsu_fram/CMakeLists.txt +++ b/samples/drivers/spi_fujitsu_fram/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(spi_fujitsu_fram) FILE(GLOB app_sources src/*.c) diff --git a/samples/drivers/watchdog/CMakeLists.txt b/samples/drivers/watchdog/CMakeLists.txt index 88cfc29bd71..45d01dd2d31 100644 --- a/samples/drivers/watchdog/CMakeLists.txt +++ b/samples/drivers/watchdog/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(watchdog) target_sources(app PRIVATE src/main.c) diff --git a/samples/hello_world/CMakeLists.txt b/samples/hello_world/CMakeLists.txt index 628615f4919..29878daa900 100644 --- a/samples/hello_world/CMakeLists.txt +++ b/samples/hello_world/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hello_world) target_sources(app PRIVATE src/main.c) diff --git a/samples/mpu/mpu_test/CMakeLists.txt b/samples/mpu/mpu_test/CMakeLists.txt index c61f4eee77b..4ac696f9127 100644 --- a/samples/mpu/mpu_test/CMakeLists.txt +++ b/samples/mpu/mpu_test/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mpu_test) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/cloud/google_iot_mqtt/CMakeLists.txt b/samples/net/cloud/google_iot_mqtt/CMakeLists.txt index 68764bb218e..6866fa722e2 100644 --- a/samples/net/cloud/google_iot_mqtt/CMakeLists.txt +++ b/samples/net/cloud/google_iot_mqtt/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) if(NOT EXISTS ${APPLICATION_SOURCE_DIR}/src/private_info/key.c) diff --git a/samples/net/cloud/mqtt_azure/CMakeLists.txt b/samples/net/cloud/mqtt_azure/CMakeLists.txt index 14163b20a19..c9e23ae0e29 100644 --- a/samples/net/cloud/mqtt_azure/CMakeLists.txt +++ b/samples/net/cloud/mqtt_azure/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mqtt-azure) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/dhcpv4_client/CMakeLists.txt b/samples/net/dhcpv4_client/CMakeLists.txt index 353cc3f1fb2..3413d13ef36 100644 --- a/samples/net/dhcpv4_client/CMakeLists.txt +++ b/samples/net/dhcpv4_client/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(dhcpv4_client) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/dns_resolve/CMakeLists.txt b/samples/net/dns_resolve/CMakeLists.txt index ba524e45da8..d5a3965b52e 100644 --- a/samples/net/dns_resolve/CMakeLists.txt +++ b/samples/net/dns_resolve/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(dns_resolve) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/eth_native_posix/CMakeLists.txt b/samples/net/eth_native_posix/CMakeLists.txt index ff61f3fc2f9..435afa6fc5b 100644 --- a/samples/net/eth_native_posix/CMakeLists.txt +++ b/samples/net/eth_native_posix/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(eth_native_posix) target_sources(app PRIVATE src/main.c) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) diff --git a/samples/net/gptp/CMakeLists.txt b/samples/net/gptp/CMakeLists.txt index 720e5234780..be5a15eae33 100644 --- a/samples/net/gptp/CMakeLists.txt +++ b/samples/net/gptp/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(gptp) target_sources(app PRIVATE src/main.c) diff --git a/samples/net/gsm_modem/CMakeLists.txt b/samples/net/gsm_modem/CMakeLists.txt index 46e569ca7b1..93a0cab038f 100644 --- a/samples/net/gsm_modem/CMakeLists.txt +++ b/samples/net/gsm_modem/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(gsm_modem) target_sources(app PRIVATE src/main.c) diff --git a/samples/net/ipv4_autoconf/CMakeLists.txt b/samples/net/ipv4_autoconf/CMakeLists.txt index 002808356dd..a11a19d4cc7 100644 --- a/samples/net/ipv4_autoconf/CMakeLists.txt +++ b/samples/net/ipv4_autoconf/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ipv4_autoconf) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/lldp/CMakeLists.txt b/samples/net/lldp/CMakeLists.txt index 48a4865dd53..db2c4e25833 100644 --- a/samples/net/lldp/CMakeLists.txt +++ b/samples/net/lldp/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lldp) target_sources(app PRIVATE src/main.c) diff --git a/samples/net/lwm2m_client/CMakeLists.txt b/samples/net/lwm2m_client/CMakeLists.txt index fde12308e3c..a45874f56c4 100644 --- a/samples/net/lwm2m_client/CMakeLists.txt +++ b/samples/net/lwm2m_client/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lwm2m_client) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) diff --git a/samples/net/mdns_responder/CMakeLists.txt b/samples/net/mdns_responder/CMakeLists.txt index 8bef7eb52f4..b23528b739e 100644 --- a/samples/net/mdns_responder/CMakeLists.txt +++ b/samples/net/mdns_responder/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mdns_responder) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) diff --git a/samples/net/mqtt_publisher/CMakeLists.txt b/samples/net/mqtt_publisher/CMakeLists.txt index 7e249417429..b45aa56df59 100644 --- a/samples/net/mqtt_publisher/CMakeLists.txt +++ b/samples/net/mqtt_publisher/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mqtt_publisher) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/openthread/ncp/CMakeLists.txt b/samples/net/openthread/ncp/CMakeLists.txt index b180cf43ff7..fd01e675148 100644 --- a/samples/net/openthread/ncp/CMakeLists.txt +++ b/samples/net/openthread/ncp/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ncp) target_sources( app @@ -10,6 +10,6 @@ target_sources( app src/main.c ) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/) diff --git a/samples/net/promiscuous_mode/CMakeLists.txt b/samples/net/promiscuous_mode/CMakeLists.txt index 4b5f7f92664..6b2382becbe 100644 --- a/samples/net/promiscuous_mode/CMakeLists.txt +++ b/samples/net/promiscuous_mode/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(promiscuous_mode) target_sources(app PRIVATE src/main.c) diff --git a/samples/net/sockets/big_http_download/CMakeLists.txt b/samples/net/sockets/big_http_download/CMakeLists.txt index 34d5752548e..7a9770c756f 100644 --- a/samples/net/sockets/big_http_download/CMakeLists.txt +++ b/samples/net/sockets/big_http_download/CMakeLists.txt @@ -1,13 +1,13 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(big_http_download) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/) diff --git a/samples/net/sockets/can/CMakeLists.txt b/samples/net/sockets/can/CMakeLists.txt index 806608ab5e6..e16951d5538 100644 --- a/samples/net/sockets/can/CMakeLists.txt +++ b/samples/net/sockets/can/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sockets_can) target_sources(app PRIVATE src/main.c) diff --git a/samples/net/sockets/civetweb/CMakeLists.txt b/samples/net/sockets/civetweb/CMakeLists.txt index 119eb74c9ca..8575364a039 100644 --- a/samples/net/sockets/civetweb/CMakeLists.txt +++ b/samples/net/sockets/civetweb/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hello_world) target_sources(app PRIVATE src/main.c src/libc_extensions.c) diff --git a/samples/net/sockets/coap_client/CMakeLists.txt b/samples/net/sockets/coap_client/CMakeLists.txt index 7eff6a9b63b..e3ee74cd44e 100644 --- a/samples/net/sockets/coap_client/CMakeLists.txt +++ b/samples/net/sockets/coap_client/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) diff --git a/samples/net/sockets/coap_server/CMakeLists.txt b/samples/net/sockets/coap_server/CMakeLists.txt index 7eff6a9b63b..e3ee74cd44e 100644 --- a/samples/net/sockets/coap_server/CMakeLists.txt +++ b/samples/net/sockets/coap_server/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) diff --git a/samples/net/sockets/dumb_http_server/CMakeLists.txt b/samples/net/sockets/dumb_http_server/CMakeLists.txt index f0f8bace41a..122fdefa63b 100644 --- a/samples/net/sockets/dumb_http_server/CMakeLists.txt +++ b/samples/net/sockets/dumb_http_server/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(dumb_http_server) FILE(GLOB app_sources src/*.c) @@ -12,4 +12,4 @@ set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/) generate_inc_file_for_target(app src/response_small.html.bin ${gen_dir}/response_small.html.bin.inc) generate_inc_file_for_target(app src/response_big.html.bin ${gen_dir}/response_big.html.bin.inc) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) diff --git a/samples/net/sockets/dumb_http_server_mt/CMakeLists.txt b/samples/net/sockets/dumb_http_server_mt/CMakeLists.txt index 23694fd0bbe..8ebfd157be9 100644 --- a/samples/net/sockets/dumb_http_server_mt/CMakeLists.txt +++ b/samples/net/sockets/dumb_http_server_mt/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(dumb_http_server_mt) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/sockets/echo/CMakeLists.txt b/samples/net/sockets/echo/CMakeLists.txt index 9850f543ae7..79fdd84d864 100644 --- a/samples/net/sockets/echo/CMakeLists.txt +++ b/samples/net/sockets/echo/CMakeLists.txt @@ -2,10 +2,10 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sockets_echo) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) diff --git a/samples/net/sockets/echo_async/CMakeLists.txt b/samples/net/sockets/echo_async/CMakeLists.txt index 7868a088363..ece6a7c81f4 100644 --- a/samples/net/sockets/echo_async/CMakeLists.txt +++ b/samples/net/sockets/echo_async/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sockets_echo_async) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) diff --git a/samples/net/sockets/echo_async_select/CMakeLists.txt b/samples/net/sockets/echo_async_select/CMakeLists.txt index a9003d8498c..78a511d9efc 100644 --- a/samples/net/sockets/echo_async_select/CMakeLists.txt +++ b/samples/net/sockets/echo_async_select/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sockets_echo_async_select) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) diff --git a/samples/net/sockets/echo_client/CMakeLists.txt b/samples/net/sockets/echo_client/CMakeLists.txt index 53da92f49dc..e876368b65e 100644 --- a/samples/net/sockets/echo_client/CMakeLists.txt +++ b/samples/net/sockets/echo_client/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sockets_echo_client) if(CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED AND @@ -22,7 +22,7 @@ target_sources_ifdef(CONFIG_NET_UDP app PRIVATE src/udp.c) target_sources_ifdef(CONFIG_NET_TCP app PRIVATE src/tcp.c) target_sources_ifdef(CONFIG_NET_VLAN app PRIVATE src/vlan.c) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/) diff --git a/samples/net/sockets/echo_server/CMakeLists.txt b/samples/net/sockets/echo_server/CMakeLists.txt index 5764048adc3..a391f17c4dd 100644 --- a/samples/net/sockets/echo_server/CMakeLists.txt +++ b/samples/net/sockets/echo_server/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sockets_echo_server) if(CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED AND @@ -22,7 +22,7 @@ target_sources_ifdef(CONFIG_NET_UDP app PRIVATE src/udp.c) target_sources_ifdef(CONFIG_NET_TCP app PRIVATE src/tcp.c) target_sources_ifdef(CONFIG_NET_VLAN app PRIVATE src/vlan.c) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/) diff --git a/samples/net/sockets/http_client/CMakeLists.txt b/samples/net/sockets/http_client/CMakeLists.txt index 5aba16b3b5a..4fbd6846d11 100644 --- a/samples/net/sockets/http_client/CMakeLists.txt +++ b/samples/net/sockets/http_client/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(http_client) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/sockets/http_get/CMakeLists.txt b/samples/net/sockets/http_get/CMakeLists.txt index 36680ad7610..8b7e2bd1f37 100644 --- a/samples/net/sockets/http_get/CMakeLists.txt +++ b/samples/net/sockets/http_get/CMakeLists.txt @@ -2,13 +2,13 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(http_get) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/) diff --git a/samples/net/sockets/net_mgmt/CMakeLists.txt b/samples/net/sockets/net_mgmt/CMakeLists.txt index 3b77f25e540..16472d257b5 100644 --- a/samples/net/sockets/net_mgmt/CMakeLists.txt +++ b/samples/net/sockets/net_mgmt/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sockets_net_mgmt) target_sources_ifdef(CONFIG_NET_SOCKETS_NET_MGMT app PRIVATE src/main.c) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) diff --git a/samples/net/sockets/packet/CMakeLists.txt b/samples/net/sockets/packet/CMakeLists.txt index 97b4ea7fccf..fa0b132122f 100644 --- a/samples/net/sockets/packet/CMakeLists.txt +++ b/samples/net/sockets/packet/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sockets_echo_server) target_sources( app PRIVATE src/packet.c) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) diff --git a/samples/net/sockets/sntp_client/CMakeLists.txt b/samples/net/sockets/sntp_client/CMakeLists.txt index fdd95f74447..33ba37bdeba 100644 --- a/samples/net/sockets/sntp_client/CMakeLists.txt +++ b/samples/net/sockets/sntp_client/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sntp_client) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/sockets/tcp/CMakeLists.txt b/samples/net/sockets/tcp/CMakeLists.txt index 8d4e0c8ce8f..a673bf569c0 100644 --- a/samples/net/sockets/tcp/CMakeLists.txt +++ b/samples/net/sockets/tcp/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tcp) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) target_sources(app PRIVATE src/main.c) diff --git a/samples/net/sockets/websocket_client/CMakeLists.txt b/samples/net/sockets/websocket_client/CMakeLists.txt index 5aba16b3b5a..4fbd6846d11 100644 --- a/samples/net/sockets/websocket_client/CMakeLists.txt +++ b/samples/net/sockets/websocket_client/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(http_client) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/stats/CMakeLists.txt b/samples/net/stats/CMakeLists.txt index 3dc14666679..e8e21941fda 100644 --- a/samples/net/stats/CMakeLists.txt +++ b/samples/net/stats/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(stats) target_sources(app PRIVATE src/main.c) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) diff --git a/samples/net/syslog_net/CMakeLists.txt b/samples/net/syslog_net/CMakeLists.txt index 7ac5982e37d..f8f508c02fd 100644 --- a/samples/net/syslog_net/CMakeLists.txt +++ b/samples/net/syslog_net/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/telnet/CMakeLists.txt b/samples/net/telnet/CMakeLists.txt index e76b97fcaf0..906df70a93c 100644 --- a/samples/net/telnet/CMakeLists.txt +++ b/samples/net/telnet/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(telnet) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/updatehub/CMakeLists.txt b/samples/net/updatehub/CMakeLists.txt index d9c008e82bf..d0ce2df4867 100644 --- a/samples/net/updatehub/CMakeLists.txt +++ b/samples/net/updatehub/CMakeLists.txt @@ -7,10 +7,10 @@ cmake_minimum_required(VERSION 3.13.1) # This application has its own Kconfig options. set(KCONFIG_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/Kconfig) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/lib/updatehub/include) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/lib/updatehub/include) target_sources(app PRIVATE src/main.c) if(CONFIG_UPDATEHUB_DTLS) diff --git a/samples/net/vlan/CMakeLists.txt b/samples/net/vlan/CMakeLists.txt index 3fa4a26fb7a..326167cceac 100644 --- a/samples/net/vlan/CMakeLists.txt +++ b/samples/net/vlan/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(vlan) target_sources(app PRIVATE src/main.c) -include($ENV{ZEPHYR_BASE}/samples/net/common/common.cmake) +include(${ZEPHYR_BASE}/samples/net/common/common.cmake) diff --git a/samples/net/wifi/CMakeLists.txt b/samples/net/wifi/CMakeLists.txt index 0864eb6937b..594bae1b535 100644 --- a/samples/net/wifi/CMakeLists.txt +++ b/samples/net/wifi/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(wifi) FILE(GLOB app_sources src/*.c) diff --git a/samples/net/wpan_serial/CMakeLists.txt b/samples/net/wpan_serial/CMakeLists.txt index dfa31b25836..f63a1f834fd 100644 --- a/samples/net/wpan_serial/CMakeLists.txt +++ b/samples/net/wpan_serial/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(wpan_serial) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/samples/net/wpanusb/CMakeLists.txt b/samples/net/wpanusb/CMakeLists.txt index a5bf3df781a..f52bbd8a10e 100644 --- a/samples/net/wpanusb/CMakeLists.txt +++ b/samples/net/wpanusb/CMakeLists.txt @@ -1,12 +1,12 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(wpanusb) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/l2) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/usb) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/l2) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/usb) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/samples/net/zperf/CMakeLists.txt b/samples/net/zperf/CMakeLists.txt index 1cee7bf9a2d..f1573f1cf5e 100644 --- a/samples/net/zperf/CMakeLists.txt +++ b/samples/net/zperf/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(zperf) target_sources(app PRIVATE @@ -16,5 +16,5 @@ target_sources(app PRIVATE ) target_include_directories(app PRIVATE - $ENV{ZEPHYR_BASE}/subsys/net/ip + ${ZEPHYR_BASE}/subsys/net/ip ) diff --git a/samples/nfc/nfc_hello/CMakeLists.txt b/samples/nfc/nfc_hello/CMakeLists.txt index e40534cbafb..2e4f10b7604 100644 --- a/samples/nfc/nfc_hello/CMakeLists.txt +++ b/samples/nfc/nfc_hello/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13.1) list(APPEND QEMU_EXTRA_FLAGS -serial tcp:localhost:8888) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(nfc_hello) FILE(GLOB app_sources src/*.c) diff --git a/samples/philosophers/CMakeLists.txt b/samples/philosophers/CMakeLists.txt index 8554aab2ee9..89f3899406b 100644 --- a/samples/philosophers/CMakeLists.txt +++ b/samples/philosophers/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(philosophers) target_sources(app PRIVATE src/main.c) diff --git a/samples/portability/cmsis_rtos_v1/philosophers/CMakeLists.txt b/samples/portability/cmsis_rtos_v1/philosophers/CMakeLists.txt index 57044853b8f..f4583f16649 100644 --- a/samples/portability/cmsis_rtos_v1/philosophers/CMakeLists.txt +++ b/samples/portability/cmsis_rtos_v1/philosophers/CMakeLists.txt @@ -1,8 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(philosophers_cmsis_rtos_v1) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/include/cmsis_rtos_v1) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/cmsis_rtos_v1) target_sources(app PRIVATE src/main.c) diff --git a/samples/portability/cmsis_rtos_v1/timer_synchronization/CMakeLists.txt b/samples/portability/cmsis_rtos_v1/timer_synchronization/CMakeLists.txt index 3403fdbe53e..e5037e9f1b0 100644 --- a/samples/portability/cmsis_rtos_v1/timer_synchronization/CMakeLists.txt +++ b/samples/portability/cmsis_rtos_v1/timer_synchronization/CMakeLists.txt @@ -1,8 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(cmsis_rtos_v1_synchronization) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/include/cmsis_rtos_v1) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/cmsis_rtos_v1) target_sources(app PRIVATE src/main.c) diff --git a/samples/portability/cmsis_rtos_v2/philosophers/CMakeLists.txt b/samples/portability/cmsis_rtos_v2/philosophers/CMakeLists.txt index 25ec2b8c307..6e73d7992f0 100644 --- a/samples/portability/cmsis_rtos_v2/philosophers/CMakeLists.txt +++ b/samples/portability/cmsis_rtos_v2/philosophers/CMakeLists.txt @@ -1,8 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(philosophers) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/include/cmsis_rtos_v2) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/cmsis_rtos_v2) target_sources(app PRIVATE src/main.c) diff --git a/samples/portability/cmsis_rtos_v2/timer_synchronization/CMakeLists.txt b/samples/portability/cmsis_rtos_v2/timer_synchronization/CMakeLists.txt index f9a7307e738..e7a1d2789fb 100644 --- a/samples/portability/cmsis_rtos_v2/timer_synchronization/CMakeLists.txt +++ b/samples/portability/cmsis_rtos_v2/timer_synchronization/CMakeLists.txt @@ -1,8 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(cpp_synchronization) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/include/cmsis_rtos_v2) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/cmsis_rtos_v2) target_sources(app PRIVATE src/main.c) diff --git a/samples/posix/gettimeofday/CMakeLists.txt b/samples/posix/gettimeofday/CMakeLists.txt index 751956e39fc..f6c341a64e1 100644 --- a/samples/posix/gettimeofday/CMakeLists.txt +++ b/samples/posix/gettimeofday/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(gettimeofday) -#target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/include/posix) +#target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/posix) target_sources(app PRIVATE src/main.c) diff --git a/samples/scheduler/metairq_dispatch/CMakeLists.txt b/samples/scheduler/metairq_dispatch/CMakeLists.txt index ade46f25ee7..e7f7b7f2c56 100644 --- a/samples/scheduler/metairq_dispatch/CMakeLists.txt +++ b/samples/scheduler/metairq_dispatch/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(metairq_dispatch) target_sources(app PRIVATE src/main.c src/msgdev.c) diff --git a/samples/sensor/adt7420/CMakeLists.txt b/samples/sensor/adt7420/CMakeLists.txt index 749a4c2b9b0..a776b6b6c50 100644 --- a/samples/sensor/adt7420/CMakeLists.txt +++ b/samples/sensor/adt7420/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(adt7420) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/adxl362/CMakeLists.txt b/samples/sensor/adxl362/CMakeLists.txt index ed2ecdd896b..2da7ad50249 100644 --- a/samples/sensor/adxl362/CMakeLists.txt +++ b/samples/sensor/adxl362/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(adxl362) target_sources(app PRIVATE src/main.c) diff --git a/samples/sensor/adxl372/CMakeLists.txt b/samples/sensor/adxl372/CMakeLists.txt index ae405a80996..ab59349f3d1 100644 --- a/samples/sensor/adxl372/CMakeLists.txt +++ b/samples/sensor/adxl372/CMakeLists.txt @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(adxl372) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/amg88xx/CMakeLists.txt b/samples/sensor/amg88xx/CMakeLists.txt index 8447f8ec723..d202a389060 100644 --- a/samples/sensor/amg88xx/CMakeLists.txt +++ b/samples/sensor/amg88xx/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(amg88xx) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/ams_iAQcore/CMakeLists.txt b/samples/sensor/ams_iAQcore/CMakeLists.txt index d2910c832b8..6a60921bd98 100644 --- a/samples/sensor/ams_iAQcore/CMakeLists.txt +++ b/samples/sensor/ams_iAQcore/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13.1) set(DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/iaq_core.overlay") -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(iAQcore) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/apds9960/CMakeLists.txt b/samples/sensor/apds9960/CMakeLists.txt index dea999037f9..72d1f183972 100644 --- a/samples/sensor/apds9960/CMakeLists.txt +++ b/samples/sensor/apds9960/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(apds9960) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/bme280/CMakeLists.txt b/samples/sensor/bme280/CMakeLists.txt index b4ea0cf818f..08aea0e7261 100644 --- a/samples/sensor/bme280/CMakeLists.txt +++ b/samples/sensor/bme280/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bme280) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/bme680/CMakeLists.txt b/samples/sensor/bme680/CMakeLists.txt index 2d7c6570cd8..2ac0059acb9 100644 --- a/samples/sensor/bme680/CMakeLists.txt +++ b/samples/sensor/bme680/CMakeLists.txt @@ -5,8 +5,8 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) FILE(GLOB app_sources src/*.c) -target_sources(app PRIVATE ${app_sources}) \ No newline at end of file +target_sources(app PRIVATE ${app_sources}) diff --git a/samples/sensor/bmg160/CMakeLists.txt b/samples/sensor/bmg160/CMakeLists.txt index 2913ea46c94..e3a0f00fb4f 100644 --- a/samples/sensor/bmg160/CMakeLists.txt +++ b/samples/sensor/bmg160/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bmg160) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/bmm150/CMakeLists.txt b/samples/sensor/bmm150/CMakeLists.txt index aeb1a716a8b..29b7680f92e 100644 --- a/samples/sensor/bmm150/CMakeLists.txt +++ b/samples/sensor/bmm150/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bmm150) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/ccs811/CMakeLists.txt b/samples/sensor/ccs811/CMakeLists.txt index 44cf08120ac..fa8e4a6a7f8 100644 --- a/samples/sensor/ccs811/CMakeLists.txt +++ b/samples/sensor/ccs811/CMakeLists.txt @@ -5,7 +5,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ccs811) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/dht/CMakeLists.txt b/samples/sensor/dht/CMakeLists.txt index e67cb60cfbc..10fe663594b 100644 --- a/samples/sensor/dht/CMakeLists.txt +++ b/samples/sensor/dht/CMakeLists.txt @@ -5,7 +5,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(dht) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/ens210/CMakeLists.txt b/samples/sensor/ens210/CMakeLists.txt index 4d9acb8693e..211e309c930 100644 --- a/samples/sensor/ens210/CMakeLists.txt +++ b/samples/sensor/ens210/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13.1) set(DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ens210.overlay") -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ens210) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/fxas21002/CMakeLists.txt b/samples/sensor/fxas21002/CMakeLists.txt index 77858c3dccf..5ae1e9966f5 100644 --- a/samples/sensor/fxas21002/CMakeLists.txt +++ b/samples/sensor/fxas21002/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fxas21002) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/fxos8700-hid/CMakeLists.txt b/samples/sensor/fxos8700-hid/CMakeLists.txt index 21496abbd02..9ab52223028 100644 --- a/samples/sensor/fxos8700-hid/CMakeLists.txt +++ b/samples/sensor/fxos8700-hid/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fxos8700-hid) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/fxos8700/CMakeLists.txt b/samples/sensor/fxos8700/CMakeLists.txt index 61f735c2da7..d6e47de8883 100644 --- a/samples/sensor/fxos8700/CMakeLists.txt +++ b/samples/sensor/fxos8700/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fxos8700) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/grove_light/CMakeLists.txt b/samples/sensor/grove_light/CMakeLists.txt index a33f987199e..6b06ca2a895 100644 --- a/samples/sensor/grove_light/CMakeLists.txt +++ b/samples/sensor/grove_light/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(grove_light) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/grove_temperature/CMakeLists.txt b/samples/sensor/grove_temperature/CMakeLists.txt index 8aaa96795c3..0761e03e261 100644 --- a/samples/sensor/grove_temperature/CMakeLists.txt +++ b/samples/sensor/grove_temperature/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(grove_temperature) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/hmc5883l/CMakeLists.txt b/samples/sensor/hmc5883l/CMakeLists.txt index fc07b57cf04..a3253d1a0d5 100644 --- a/samples/sensor/hmc5883l/CMakeLists.txt +++ b/samples/sensor/hmc5883l/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hmc5883l) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/hts221/CMakeLists.txt b/samples/sensor/hts221/CMakeLists.txt index f4c633f206f..465f4eb7c6d 100644 --- a/samples/sensor/hts221/CMakeLists.txt +++ b/samples/sensor/hts221/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hts221) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/isl29035/CMakeLists.txt b/samples/sensor/isl29035/CMakeLists.txt index c709e05c87b..cb69fd0a29c 100644 --- a/samples/sensor/isl29035/CMakeLists.txt +++ b/samples/sensor/isl29035/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(isl29035) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/lis2dh/CMakeLists.txt b/samples/sensor/lis2dh/CMakeLists.txt index 4af1c367355..5290581da44 100644 --- a/samples/sensor/lis2dh/CMakeLists.txt +++ b/samples/sensor/lis2dh/CMakeLists.txt @@ -5,7 +5,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lis2dh) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/lps22hb/CMakeLists.txt b/samples/sensor/lps22hb/CMakeLists.txt index 2c06e31627c..8ffb1940bb4 100644 --- a/samples/sensor/lps22hb/CMakeLists.txt +++ b/samples/sensor/lps22hb/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lps22hb) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/lps22hh/CMakeLists.txt b/samples/sensor/lps22hh/CMakeLists.txt index 3a726e5834c..37b29381b5c 100644 --- a/samples/sensor/lps22hh/CMakeLists.txt +++ b/samples/sensor/lps22hh/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lps22hh) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/lsm303dlhc/CMakeLists.txt b/samples/sensor/lsm303dlhc/CMakeLists.txt index 48d850badfc..68a1f72c1f7 100644 --- a/samples/sensor/lsm303dlhc/CMakeLists.txt +++ b/samples/sensor/lsm303dlhc/CMakeLists.txt @@ -5,7 +5,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lsm303dlhc) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/lsm6dsl/CMakeLists.txt b/samples/sensor/lsm6dsl/CMakeLists.txt index b9941dac9d3..d63ce982e60 100644 --- a/samples/sensor/lsm6dsl/CMakeLists.txt +++ b/samples/sensor/lsm6dsl/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lsm6dsl) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/magn_polling/CMakeLists.txt b/samples/sensor/magn_polling/CMakeLists.txt index 467287ed16d..048564819c8 100644 --- a/samples/sensor/magn_polling/CMakeLists.txt +++ b/samples/sensor/magn_polling/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(magn_polling) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/max30101/CMakeLists.txt b/samples/sensor/max30101/CMakeLists.txt index 91f79b1cd55..bb0e883cdc7 100644 --- a/samples/sensor/max30101/CMakeLists.txt +++ b/samples/sensor/max30101/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(max30101) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/max44009/CMakeLists.txt b/samples/sensor/max44009/CMakeLists.txt index 0a7780b572a..7f2f917df4e 100644 --- a/samples/sensor/max44009/CMakeLists.txt +++ b/samples/sensor/max44009/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(max44009) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/mcp9808/CMakeLists.txt b/samples/sensor/mcp9808/CMakeLists.txt index 97590d1a8b7..57bbe89725f 100644 --- a/samples/sensor/mcp9808/CMakeLists.txt +++ b/samples/sensor/mcp9808/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mcp9808) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/mpu6050/CMakeLists.txt b/samples/sensor/mpu6050/CMakeLists.txt index 02a3ddbb2fc..af97a5ed020 100644 --- a/samples/sensor/mpu6050/CMakeLists.txt +++ b/samples/sensor/mpu6050/CMakeLists.txt @@ -5,7 +5,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mpu6050) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/ms5837/CMakeLists.txt b/samples/sensor/ms5837/CMakeLists.txt index 8684185d3af..537d392d510 100644 --- a/samples/sensor/ms5837/CMakeLists.txt +++ b/samples/sensor/ms5837/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ms5837) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/sensor_shell/CMakeLists.txt b/samples/sensor/sensor_shell/CMakeLists.txt index d69a6623c82..819947eda25 100644 --- a/samples/sensor/sensor_shell/CMakeLists.txt +++ b/samples/sensor/sensor_shell/CMakeLists.txt @@ -9,7 +9,7 @@ macro(set_conf_file) endif() endmacro() -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sensor_shell) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/sht3xd/CMakeLists.txt b/samples/sensor/sht3xd/CMakeLists.txt index 9632a44f41c..dbeda9b25b6 100644 --- a/samples/sensor/sht3xd/CMakeLists.txt +++ b/samples/sensor/sht3xd/CMakeLists.txt @@ -5,7 +5,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sht3xd) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/sx9500/CMakeLists.txt b/samples/sensor/sx9500/CMakeLists.txt index 4e98406bdd5..39478ed4953 100644 --- a/samples/sensor/sx9500/CMakeLists.txt +++ b/samples/sensor/sx9500/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sx9500) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/th02/CMakeLists.txt b/samples/sensor/th02/CMakeLists.txt index 361e8505e4a..db494303453 100644 --- a/samples/sensor/th02/CMakeLists.txt +++ b/samples/sensor/th02/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(th02) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/thermometer/CMakeLists.txt b/samples/sensor/thermometer/CMakeLists.txt index a62cbe76ebe..3d7f2b3f16a 100644 --- a/samples/sensor/thermometer/CMakeLists.txt +++ b/samples/sensor/thermometer/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(thermometer) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/ti_hdc/CMakeLists.txt b/samples/sensor/ti_hdc/CMakeLists.txt index f90f0542f43..8df6e7d08c8 100644 --- a/samples/sensor/ti_hdc/CMakeLists.txt +++ b/samples/sensor/ti_hdc/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ti_hdc) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/tmp112/CMakeLists.txt b/samples/sensor/tmp112/CMakeLists.txt index c689c1fd09c..6b4524483e7 100644 --- a/samples/sensor/tmp112/CMakeLists.txt +++ b/samples/sensor/tmp112/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tmp112) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/tmp116/CMakeLists.txt b/samples/sensor/tmp116/CMakeLists.txt index aaaff60961b..f3ccbe03daf 100644 --- a/samples/sensor/tmp116/CMakeLists.txt +++ b/samples/sensor/tmp116/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tmp116) FILE(GLOB app_sources src/*.c) diff --git a/samples/sensor/vl53l0x/CMakeLists.txt b/samples/sensor/vl53l0x/CMakeLists.txt index 4b7440d4616..f7158c5dbe8 100644 --- a/samples/sensor/vl53l0x/CMakeLists.txt +++ b/samples/sensor/vl53l0x/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(vl53l0x) FILE(GLOB app_sources src/*.c) diff --git a/samples/shields/lmp90100_evb/rtd/CMakeLists.txt b/samples/shields/lmp90100_evb/rtd/CMakeLists.txt index 21549f74215..4d537d93f46 100644 --- a/samples/shields/lmp90100_evb/rtd/CMakeLists.txt +++ b/samples/shields/lmp90100_evb/rtd/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.13.1) # This sample is specific to lmp90100_evb shield. Enforce -DSHIELD option set(SHIELD lmp90100_evb) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lmp90100_evb_rtd) FILE(GLOB app_sources src/*.c) diff --git a/samples/shields/x_nucleo_iks01a1/CMakeLists.txt b/samples/shields/x_nucleo_iks01a1/CMakeLists.txt index 5800e5205c4..132cb7f800c 100644 --- a/samples/shields/x_nucleo_iks01a1/CMakeLists.txt +++ b/samples/shields/x_nucleo_iks01a1/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.13.1) # This sample is specific to x_nucleo_iks01a1 shield. Enforce -DSHIELD option set(SHIELD x_nucleo_iks01a1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(x_nucleo_iks01a1) FILE(GLOB app_sources src/*.c) diff --git a/samples/shields/x_nucleo_iks01a2/CMakeLists.txt b/samples/shields/x_nucleo_iks01a2/CMakeLists.txt index 0b38281cc58..976d4888de7 100644 --- a/samples/shields/x_nucleo_iks01a2/CMakeLists.txt +++ b/samples/shields/x_nucleo_iks01a2/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.13.1) # This sample is specific to x_nucleo_iks01a2 shield. Enforce -DSHIELD option set(SHIELD x_nucleo_iks01a2) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(x_nucleo_iks01a2) FILE(GLOB app_sources src/*.c) diff --git a/samples/shields/x_nucleo_iks01a3/sensorhub/CMakeLists.txt b/samples/shields/x_nucleo_iks01a3/sensorhub/CMakeLists.txt index 47565c23427..61361e22488 100644 --- a/samples/shields/x_nucleo_iks01a3/sensorhub/CMakeLists.txt +++ b/samples/shields/x_nucleo_iks01a3/sensorhub/CMakeLists.txt @@ -10,7 +10,7 @@ set(SHIELD x_nucleo_iks01a3_shub) # IKS01A3 board configured in sensorhub mode set(CONF_FILE shub.conf) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(x_nucleo_iks01a3) FILE(GLOB app_sources src/*.c) diff --git a/samples/shields/x_nucleo_iks01a3/standard/CMakeLists.txt b/samples/shields/x_nucleo_iks01a3/standard/CMakeLists.txt index 48812acf1ac..71e02b91f30 100644 --- a/samples/shields/x_nucleo_iks01a3/standard/CMakeLists.txt +++ b/samples/shields/x_nucleo_iks01a3/standard/CMakeLists.txt @@ -9,7 +9,7 @@ set(SHIELD x_nucleo_iks01a3) set(CONF_FILE prj.conf) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(x_nucleo_iks01a3) FILE(GLOB app_sources src/*.c) diff --git a/samples/smp/pi/CMakeLists.txt b/samples/smp/pi/CMakeLists.txt index c8c1cf19f55..73d18af6261 100644 --- a/samples/smp/pi/CMakeLists.txt +++ b/samples/smp/pi/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(smp_pi) target_sources(app PRIVATE src/main.c) diff --git a/samples/subsys/canbus/canopen/CMakeLists.txt b/samples/subsys/canbus/canopen/CMakeLists.txt index 3b4bd2bb2f0..ce47de10316 100644 --- a/samples/subsys/canbus/canopen/CMakeLists.txt +++ b/samples/subsys/canbus/canopen/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(CANopen) target_sources(app PRIVATE src/main.c objdict/CO_OD.c) diff --git a/samples/subsys/canbus/isotp/CMakeLists.txt b/samples/subsys/canbus/isotp/CMakeLists.txt index 67aea987526..f5290f272ad 100644 --- a/samples/subsys/canbus/isotp/CMakeLists.txt +++ b/samples/subsys/canbus/isotp/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ISOTP) target_sources(app PRIVATE src/main.c) diff --git a/samples/subsys/console/echo/CMakeLists.txt b/samples/subsys/console/echo/CMakeLists.txt index 788ae6001ad..fca4073d032 100644 --- a/samples/subsys/console/echo/CMakeLists.txt +++ b/samples/subsys/console/echo/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(echo) target_sources(app PRIVATE src/main.c) diff --git a/samples/subsys/console/getchar/CMakeLists.txt b/samples/subsys/console/getchar/CMakeLists.txt index af23ab52ecc..f9eb52fa389 100644 --- a/samples/subsys/console/getchar/CMakeLists.txt +++ b/samples/subsys/console/getchar/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(getchar) target_sources(app PRIVATE src/main.c) diff --git a/samples/subsys/console/getline/CMakeLists.txt b/samples/subsys/console/getline/CMakeLists.txt index 6a28d192283..2bebbaabdf2 100644 --- a/samples/subsys/console/getline/CMakeLists.txt +++ b/samples/subsys/console/getline/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(getline) target_sources(app PRIVATE src/main.c) diff --git a/samples/subsys/fs/fat_fs/CMakeLists.txt b/samples/subsys/fs/fat_fs/CMakeLists.txt index d4acefd1c31..e8152c515ba 100644 --- a/samples/subsys/fs/fat_fs/CMakeLists.txt +++ b/samples/subsys/fs/fat_fs/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mass) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/fs/littlefs/CMakeLists.txt b/samples/subsys/fs/littlefs/CMakeLists.txt index bf55d6efad3..09a13ce63c9 100644 --- a/samples/subsys/fs/littlefs/CMakeLists.txt +++ b/samples/subsys/fs/littlefs/CMakeLists.txt @@ -5,7 +5,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(littlefs) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/ipc/ipm_imx/CMakeLists.txt b/samples/subsys/ipc/ipm_imx/CMakeLists.txt index 2a69a798be8..19fac968bec 100644 --- a/samples/subsys/ipc/ipm_imx/CMakeLists.txt +++ b/samples/subsys/ipc/ipm_imx/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/drivers) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/drivers) target_sources(app PRIVATE src/main.c) diff --git a/samples/subsys/ipc/ipm_mcux/CMakeLists.txt b/samples/subsys/ipc/ipm_mcux/CMakeLists.txt index 4b7fb811884..9609c7a392c 100644 --- a/samples/subsys/ipc/ipm_mcux/CMakeLists.txt +++ b/samples/subsys/ipc/ipm_mcux/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.13.1) set(BOARD lpcxpresso54114_m4) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) if(NOT ("${BOARD}" STREQUAL "lpcxpresso54114_m4")) message(FATAL_ERROR "${BOARD} was specified, but this sample only supports lpcxpresso54114_m4") diff --git a/samples/subsys/ipc/ipm_mcux/remote/CMakeLists.txt b/samples/subsys/ipc/ipm_mcux/remote/CMakeLists.txt index 30602a56bb3..dc7cb750dc7 100644 --- a/samples/subsys/ipc/ipm_mcux/remote/CMakeLists.txt +++ b/samples/subsys/ipc/ipm_mcux/remote/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.13.1) # set(BOARD lpcxpresso54114_m0) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ipm_mcux_remote) if(NOT ("${BOARD}" STREQUAL "lpcxpresso54114_m0")) diff --git a/samples/subsys/ipc/ipm_mhu_dual_core/CMakeLists.txt b/samples/subsys/ipc/ipm_mhu_dual_core/CMakeLists.txt index 2c3c3229c60..b6b9d780cd9 100644 --- a/samples/subsys/ipc/ipm_mhu_dual_core/CMakeLists.txt +++ b/samples/subsys/ipc/ipm_mhu_dual_core/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ipm_mhu_dual_core) target_sources(app PRIVATE src/main.c) diff --git a/samples/subsys/ipc/openamp/CMakeLists.txt b/samples/subsys/ipc/openamp/CMakeLists.txt index 0876541d5ef..960527e8890 100644 --- a/samples/subsys/ipc/openamp/CMakeLists.txt +++ b/samples/subsys/ipc/openamp/CMakeLists.txt @@ -22,7 +22,7 @@ endif() message(INFO " ${BOARD} compile as Master in this sample") -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(openamp) enable_language(C ASM) diff --git a/samples/subsys/ipc/openamp/remote/CMakeLists.txt b/samples/subsys/ipc/openamp/remote/CMakeLists.txt index 74a2fd71d9f..925a4361859 100644 --- a/samples/subsys/ipc/openamp/remote/CMakeLists.txt +++ b/samples/subsys/ipc/openamp/remote/CMakeLists.txt @@ -14,7 +14,7 @@ else() message(FATAL_ERROR "${BOARD} was not supported for this sample") endif() -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(openamp_remote) target_sources(app PRIVATE src/main.c) diff --git a/samples/subsys/logging/logger/CMakeLists.txt b/samples/subsys/logging/logger/CMakeLists.txt index ba32b68a7ab..1c1bb4510a1 100644 --- a/samples/subsys/logging/logger/CMakeLists.txt +++ b/samples/subsys/logging/logger/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(logger) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/logging/syst/CMakeLists.txt b/samples/subsys/logging/syst/CMakeLists.txt index 5afb3b133f3..d4c544b6f29 100644 --- a/samples/subsys/logging/syst/CMakeLists.txt +++ b/samples/subsys/logging/syst/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(syst) target_sources(app PRIVATE src/main.c) diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/CMakeLists.txt b/samples/subsys/mgmt/mcumgr/smp_svr/CMakeLists.txt index 562ead47192..592983fb94e 100644 --- a/samples/subsys/mgmt/mcumgr/smp_svr/CMakeLists.txt +++ b/samples/subsys/mgmt/mcumgr/smp_svr/CMakeLists.txt @@ -9,7 +9,7 @@ cmake_minimum_required(VERSION 3.13.1) # mcumgr. It can be used as a starting point for new applications. # Standard Zephyr application boilerplate. -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(smp_svr) target_sources(app PRIVATE diff --git a/samples/subsys/nvs/CMakeLists.txt b/samples/subsys/nvs/CMakeLists.txt index b67cf8a2d12..785683e8e6e 100644 --- a/samples/subsys/nvs/CMakeLists.txt +++ b/samples/subsys/nvs/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(nvs) target_sources(app PRIVATE src/main.c) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/fs/nvs) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/fs/nvs) diff --git a/samples/subsys/power/device_pm/CMakeLists.txt b/samples/subsys/power/device_pm/CMakeLists.txt index 9cd2477bc5f..c5c4c51beec 100644 --- a/samples/subsys/power/device_pm/CMakeLists.txt +++ b/samples/subsys/power/device_pm/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(device) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/settings/CMakeLists.txt b/samples/subsys/settings/CMakeLists.txt index fd908af1234..b14e3156a49 100644 --- a/samples/subsys/settings/CMakeLists.txt +++ b/samples/subsys/settings/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13.1) #set(QEMU_EXTRA_FLAGS -s) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(settings_sample) target_sources(app PRIVATE src/main.c) diff --git a/samples/subsys/shell/fs/CMakeLists.txt b/samples/subsys/shell/fs/CMakeLists.txt index c7f512dcfd9..6d521115e19 100644 --- a/samples/subsys/shell/fs/CMakeLists.txt +++ b/samples/subsys/shell/fs/CMakeLists.txt @@ -14,7 +14,7 @@ if((BOARD STREQUAL nrf52840dk_nrf52840) OR endif() endif() -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fs_shell) diff --git a/samples/subsys/shell/shell_module/CMakeLists.txt b/samples/subsys/shell/shell_module/CMakeLists.txt index 966df095fa7..343f139accb 100644 --- a/samples/subsys/shell/shell_module/CMakeLists.txt +++ b/samples/subsys/shell/shell_module/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(shell_module) target_sources(app PRIVATE src/main.c src/test_module.c) diff --git a/samples/subsys/usb/cdc_acm/CMakeLists.txt b/samples/subsys/usb/cdc_acm/CMakeLists.txt index 2361894765a..c3c65e9ab7b 100644 --- a/samples/subsys/usb/cdc_acm/CMakeLists.txt +++ b/samples/subsys/usb/cdc_acm/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(cdc_acm) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/usb/cdc_acm_composite/CMakeLists.txt b/samples/subsys/usb/cdc_acm_composite/CMakeLists.txt index 2361894765a..c3c65e9ab7b 100644 --- a/samples/subsys/usb/cdc_acm_composite/CMakeLists.txt +++ b/samples/subsys/usb/cdc_acm_composite/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(cdc_acm) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/usb/console/CMakeLists.txt b/samples/subsys/usb/console/CMakeLists.txt index 12d871208c0..bb6510ed7a2 100644 --- a/samples/subsys/usb/console/CMakeLists.txt +++ b/samples/subsys/usb/console/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(console) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/usb/dfu/CMakeLists.txt b/samples/subsys/usb/dfu/CMakeLists.txt index 85be4acaa5a..b17492b46f5 100644 --- a/samples/subsys/usb/dfu/CMakeLists.txt +++ b/samples/subsys/usb/dfu/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(dfu) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/usb/hid-cdc/CMakeLists.txt b/samples/subsys/usb/hid-cdc/CMakeLists.txt index b096e7821bf..a1da4a02f86 100644 --- a/samples/subsys/usb/hid-cdc/CMakeLists.txt +++ b/samples/subsys/usb/hid-cdc/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hid-cdc) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/usb/hid-mouse/CMakeLists.txt b/samples/subsys/usb/hid-mouse/CMakeLists.txt index 9886790db00..d3921ca0b4d 100644 --- a/samples/subsys/usb/hid-mouse/CMakeLists.txt +++ b/samples/subsys/usb/hid-mouse/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hid-mouse) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/usb/hid/CMakeLists.txt b/samples/subsys/usb/hid/CMakeLists.txt index 97204734745..aa6ca25ec42 100644 --- a/samples/subsys/usb/hid/CMakeLists.txt +++ b/samples/subsys/usb/hid/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hid) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/usb/mass/CMakeLists.txt b/samples/subsys/usb/mass/CMakeLists.txt index ffe80802e4b..53c9e766fe0 100644 --- a/samples/subsys/usb/mass/CMakeLists.txt +++ b/samples/subsys/usb/mass/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mass) if((NOT CONFIG_DISK_ACCESS_FLASH) AND (NOT CONFIG_DISK_ACCESS_RAM)) diff --git a/samples/subsys/usb/testusb/CMakeLists.txt b/samples/subsys/usb/testusb/CMakeLists.txt index 87c40839386..cbab2f034a3 100644 --- a/samples/subsys/usb/testusb/CMakeLists.txt +++ b/samples/subsys/usb/testusb/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(testusb) FILE(GLOB app_sources src/*.c) diff --git a/samples/subsys/usb/webusb/CMakeLists.txt b/samples/subsys/usb/webusb/CMakeLists.txt index 66cf6aef61a..869650c4e14 100644 --- a/samples/subsys/usb/webusb/CMakeLists.txt +++ b/samples/subsys/usb/webusb/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(webusb) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/usb) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/usb) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/samples/synchronization/CMakeLists.txt b/samples/synchronization/CMakeLists.txt index 4fcb72afca6..10692e651d9 100644 --- a/samples/synchronization/CMakeLists.txt +++ b/samples/synchronization/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(synchronization) target_sources(app PRIVATE src/main.c) diff --git a/samples/testing/integration/CMakeLists.txt b/samples/testing/integration/CMakeLists.txt index 445aaf12964..60e3e15be65 100644 --- a/samples/testing/integration/CMakeLists.txt +++ b/samples/testing/integration/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(integration) FILE(GLOB app_sources src/*.c) diff --git a/samples/userspace/prod_consumer/CMakeLists.txt b/samples/userspace/prod_consumer/CMakeLists.txt index 0921af5da55..d31decd150b 100644 --- a/samples/userspace/prod_consumer/CMakeLists.txt +++ b/samples/userspace/prod_consumer/CMakeLists.txt @@ -1,9 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(shared_mem) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) - diff --git a/samples/userspace/shared_mem/CMakeLists.txt b/samples/userspace/shared_mem/CMakeLists.txt index 8bd9eb3a202..f1133699aab 100644 --- a/samples/userspace/shared_mem/CMakeLists.txt +++ b/samples/userspace/shared_mem/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(shared_mem) FILE(GLOB app_sources src/*.c) diff --git a/samples/video/capture/CMakeLists.txt b/samples/video/capture/CMakeLists.txt index 84344d8b34c..c3cc019e3a2 100644 --- a/samples/video/capture/CMakeLists.txt +++ b/samples/video/capture/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(video_capture) FILE(GLOB app_sources src/*.c) diff --git a/samples/video/tcpserversink/CMakeLists.txt b/samples/video/tcpserversink/CMakeLists.txt index 98e789d73ed..9389829a7cd 100644 --- a/samples/video/tcpserversink/CMakeLists.txt +++ b/samples/video/tcpserversink/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(video_tcpserversink) FILE(GLOB app_sources src/*.c) diff --git a/tests/application_development/cpp/CMakeLists.txt b/tests/application_development/cpp/CMakeLists.txt index 4fcc2391b6d..347b47e0815 100644 --- a/tests/application_development/cpp/CMakeLists.txt +++ b/tests/application_development/cpp/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(cpp) FILE(GLOB app_sources src/*.cpp) diff --git a/tests/application_development/gen_inc_file/CMakeLists.txt b/tests/application_development/gen_inc_file/CMakeLists.txt index e3d4e4fbefd..f333b1c0b62 100644 --- a/tests/application_development/gen_inc_file/CMakeLists.txt +++ b/tests/application_development/gen_inc_file/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(gen_inc_file) FILE(GLOB app_sources src/*.c) diff --git a/tests/application_development/libcxx/CMakeLists.txt b/tests/application_development/libcxx/CMakeLists.txt index 4fcc2391b6d..347b47e0815 100644 --- a/tests/application_development/libcxx/CMakeLists.txt +++ b/tests/application_development/libcxx/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(cpp) FILE(GLOB app_sources src/*.cpp) diff --git a/tests/arch/arm/arm_interrupt/CMakeLists.txt b/tests/arch/arm/arm_interrupt/CMakeLists.txt index c78728ec6a8..d852973e4be 100644 --- a/tests/arch/arm/arm_interrupt/CMakeLists.txt +++ b/tests/arch/arm/arm_interrupt/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(arm_interrupt) FILE(GLOB app_sources src/*.c) diff --git a/tests/arch/arm/arm_irq_advanced_features/CMakeLists.txt b/tests/arch/arm/arm_irq_advanced_features/CMakeLists.txt index 1f22c135760..443a8214a3f 100644 --- a/tests/arch/arm/arm_irq_advanced_features/CMakeLists.txt +++ b/tests/arch/arm/arm_irq_advanced_features/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(arm_zero_latency_irqs) FILE(GLOB app_sources src/*.c) diff --git a/tests/arch/arm/arm_irq_vector_table/CMakeLists.txt b/tests/arch/arm/arm_irq_vector_table/CMakeLists.txt index 241415c4796..0150ad0340b 100644 --- a/tests/arch/arm/arm_irq_vector_table/CMakeLists.txt +++ b/tests/arch/arm/arm_irq_vector_table/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(arm_irq_vector_table) FILE(GLOB app_sources src/*.c) diff --git a/tests/arch/arm/arm_ramfunc/CMakeLists.txt b/tests/arch/arm/arm_ramfunc/CMakeLists.txt index 1f22c135760..443a8214a3f 100644 --- a/tests/arch/arm/arm_ramfunc/CMakeLists.txt +++ b/tests/arch/arm/arm_ramfunc/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(arm_zero_latency_irqs) FILE(GLOB app_sources src/*.c) diff --git a/tests/arch/arm/arm_runtime_nmi/CMakeLists.txt b/tests/arch/arm/arm_runtime_nmi/CMakeLists.txt index a86430bcb2b..b24b23a246b 100644 --- a/tests/arch/arm/arm_runtime_nmi/CMakeLists.txt +++ b/tests/arch/arm/arm_runtime_nmi/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(arm_runtime_nmi) FILE(GLOB app_sources src/*.c) diff --git a/tests/arch/arm/arm_thread_swap/CMakeLists.txt b/tests/arch/arm/arm_thread_swap/CMakeLists.txt index fa7afe41d1d..001e7a732d2 100644 --- a/tests/arch/arm/arm_thread_swap/CMakeLists.txt +++ b/tests/arch/arm/arm_thread_swap/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(arm_swap) FILE(GLOB app_sources src/*.c) diff --git a/tests/arch/x86/boot_page_table/CMakeLists.txt b/tests/arch/x86/boot_page_table/CMakeLists.txt index 1d33f6d2187..f4c2414d866 100644 --- a/tests/arch/x86/boot_page_table/CMakeLists.txt +++ b/tests/arch/x86/boot_page_table/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(boot_page_table) FILE(GLOB app_sources src/*.c) diff --git a/tests/arch/x86/info/CMakeLists.txt b/tests/arch/x86/info/CMakeLists.txt index 1c25776fa18..890adb251c7 100644 --- a/tests/arch/x86/info/CMakeLists.txt +++ b/tests/arch/x86/info/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(x86_info) target_sources(app PRIVATE src/main.c) diff --git a/tests/arch/x86/static_idt/CMakeLists.txt b/tests/arch/x86/static_idt/CMakeLists.txt index 1344355183b..7f763e4cad4 100644 --- a/tests/arch/x86/static_idt/CMakeLists.txt +++ b/tests/arch/x86/static_idt/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(static_idt) enable_language(C ASM) diff --git a/tests/arch/x86/x86_mmu_api/CMakeLists.txt b/tests/arch/x86/x86_mmu_api/CMakeLists.txt index 96b7de648c5..68cd4382c36 100644 --- a/tests/arch/x86/x86_mmu_api/CMakeLists.txt +++ b/tests/arch/x86/x86_mmu_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(x86_mmu_api) file(GLOB source_for_app src/*.c) diff --git a/tests/arch/xtensa_asm2/CMakeLists.txt b/tests/arch/xtensa_asm2/CMakeLists.txt index f9d9095a09f..9fff455773f 100644 --- a/tests/arch/xtensa_asm2/CMakeLists.txt +++ b/tests/arch/xtensa_asm2/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(xtensa_asm2) enable_language(ASM) diff --git a/tests/benchmarks/app_kernel/CMakeLists.txt b/tests/benchmarks/app_kernel/CMakeLists.txt index d99d01e8e82..2855c53204c 100644 --- a/tests/benchmarks/app_kernel/CMakeLists.txt +++ b/tests/benchmarks/app_kernel/CMakeLists.txt @@ -5,7 +5,7 @@ if(BOARD STREQUAL "minnowboard") set(CONF_FILE prj_fp.conf) endif() -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(app_kernel) FILE(GLOB app_sources src/*.c) diff --git a/tests/benchmarks/boot_time/CMakeLists.txt b/tests/benchmarks/boot_time/CMakeLists.txt index 2de72b4da52..3124de10e07 100644 --- a/tests/benchmarks/boot_time/CMakeLists.txt +++ b/tests/benchmarks/boot_time/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(boot_time) FILE(GLOB app_sources src/*.c) diff --git a/tests/benchmarks/latency_measure/CMakeLists.txt b/tests/benchmarks/latency_measure/CMakeLists.txt index 9c319ff3036..e115360ddca 100644 --- a/tests/benchmarks/latency_measure/CMakeLists.txt +++ b/tests/benchmarks/latency_measure/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(latency_measure) FILE(GLOB app_sources src/*.c) diff --git a/tests/benchmarks/mbedtls/CMakeLists.txt b/tests/benchmarks/mbedtls/CMakeLists.txt index 2d204f3f1a5..0756d54e05c 100644 --- a/tests/benchmarks/mbedtls/CMakeLists.txt +++ b/tests/benchmarks/mbedtls/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mbedtls_benchmark) FILE(GLOB app_sources src/*.c) diff --git a/tests/benchmarks/sched/CMakeLists.txt b/tests/benchmarks/sched/CMakeLists.txt index 720f39f1f61..c95c8642b2a 100644 --- a/tests/benchmarks/sched/CMakeLists.txt +++ b/tests/benchmarks/sched/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sched_bench) target_sources(app PRIVATE src/main.c) diff --git a/tests/benchmarks/sys_kernel/CMakeLists.txt b/tests/benchmarks/sys_kernel/CMakeLists.txt index 26b82666741..d13eb19222b 100644 --- a/tests/benchmarks/sys_kernel/CMakeLists.txt +++ b/tests/benchmarks/sys_kernel/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sys_kernel) FILE(GLOB app_sources src/*.c) diff --git a/tests/benchmarks/timing_info/CMakeLists.txt b/tests/benchmarks/timing_info/CMakeLists.txt index 5de4e17c9f8..de404d697eb 100644 --- a/tests/benchmarks/timing_info/CMakeLists.txt +++ b/tests/benchmarks/timing_info/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(timing_info) FILE(GLOB app_sources src/[^u]*.c) diff --git a/tests/bluetooth/at/CMakeLists.txt b/tests/bluetooth/at/CMakeLists.txt index acca43cb27b..4b0e433034f 100644 --- a/tests/bluetooth/at/CMakeLists.txt +++ b/tests/bluetooth/at/CMakeLists.txt @@ -1,12 +1,12 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(at) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) target_include_directories(app PRIVATE - $ENV{ZEPHYR_BASE} + ${ZEPHYR_BASE} ) diff --git a/tests/bluetooth/bluetooth/CMakeLists.txt b/tests/bluetooth/bluetooth/CMakeLists.txt index 8d910f208a3..2dcf43bc765 100644 --- a/tests/bluetooth/bluetooth/CMakeLists.txt +++ b/tests/bluetooth/bluetooth/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13.1) set(NO_QEMU_SERIAL_BT_SERVER 1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bluetooth) target_sources(app PRIVATE src/bluetooth.c) diff --git a/tests/bluetooth/bsim_bt/bsim_test_app/CMakeLists.txt b/tests/bluetooth/bsim_bt/bsim_test_app/CMakeLists.txt index a9218c3e8b5..aa54b2f452c 100644 --- a/tests/bluetooth/bsim_bt/bsim_test_app/CMakeLists.txt +++ b/tests/bluetooth/bsim_bt/bsim_test_app/CMakeLists.txt @@ -9,7 +9,7 @@ if (NOT DEFINED ENV{BSIM_COMPONENTS_PATH}) https://babblesim.github.io/folder_structure_and_env.html") endif() -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bsim_test_app) target_sources(app PRIVATE @@ -22,5 +22,5 @@ target_sources(app PRIVATE zephyr_include_directories( $ENV{BSIM_COMPONENTS_PATH}/libUtilv1/src/ $ENV{BSIM_COMPONENTS_PATH}/libPhyComv1/src/ - $ENV{ZEPHYR_BASE}/samples/bluetooth + ${ZEPHYR_BASE}/samples/bluetooth ) diff --git a/tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app/CMakeLists.txt b/tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app/CMakeLists.txt index 6d053de5923..7fbcdb0865c 100644 --- a/tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app/CMakeLists.txt +++ b/tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app/CMakeLists.txt @@ -10,7 +10,7 @@ if (NOT DEFINED ENV{BSIM_COMPONENTS_PATH}) https://babblesim.github.io/folder_structure_and_env.html") endif() -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(peripheral_test) FILE(GLOB app_sources src/*.c) @@ -21,7 +21,7 @@ target_sources(app PRIVATE ${gatt_sources} ) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth ../common/ src/ $ENV{BSIM_COMPONENTS_PATH}/libUtilv1/src/ diff --git a/tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app/CMakeLists.txt b/tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app/CMakeLists.txt index 283b0b3a5ae..679cb3757e7 100644 --- a/tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app/CMakeLists.txt +++ b/tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app/CMakeLists.txt @@ -10,7 +10,7 @@ if (NOT DEFINED ENV{BSIM_COMPONENTS_PATH}) https://babblesim.github.io/folder_structure_and_env.html") endif() -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hci_test_app) target_sources(app PRIVATE @@ -19,8 +19,8 @@ target_sources(app PRIVATE ) zephyr_library_include_directories( - $ENV{ZEPHYR_BASE}/samples/bluetooth - $ENV{ZEPHYR_BASE}/subsys/bluetooth + ${ZEPHYR_BASE}/samples/bluetooth + ${ZEPHYR_BASE}/subsys/bluetooth ../common/ $ENV{BSIM_COMPONENTS_PATH}/libUtilv1/src/ $ENV{BSIM_COMPONENTS_PATH}/libPhyComv1/src/ diff --git a/tests/bluetooth/ctrl_sw_privacy/CMakeLists.txt b/tests/bluetooth/ctrl_sw_privacy/CMakeLists.txt index 2845ef567e4..2efec3e5f43 100644 --- a/tests/bluetooth/ctrl_sw_privacy/CMakeLists.txt +++ b/tests/bluetooth/ctrl_sw_privacy/CMakeLists.txt @@ -3,12 +3,11 @@ cmake_minimum_required(VERSION 3.13.1) include_directories("./src") -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bluetooth_ctrl_sw_privacy) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/subsys/bluetooth/controller/) +zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/bluetooth/controller/) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) - diff --git a/tests/bluetooth/ctrl_sw_privacy_unit/CMakeLists.txt b/tests/bluetooth/ctrl_sw_privacy_unit/CMakeLists.txt index 4e305286555..0a7582ee0bc 100644 --- a/tests/bluetooth/ctrl_sw_privacy_unit/CMakeLists.txt +++ b/tests/bluetooth/ctrl_sw_privacy_unit/CMakeLists.txt @@ -3,15 +3,15 @@ cmake_minimum_required(VERSION 3.13.1) include_directories("./src") -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bluetooth_ctrl_sw_privacy) zephyr_library_include_directories( - $ENV{ZEPHYR_BASE}/subsys/bluetooth - $ENV{ZEPHYR_BASE}/subsys/bluetooth/controller - $ENV{ZEPHYR_BASE}/subsys/bluetooth/controller/include - $ENV{ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic - $ENV{ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic/lll + ${ZEPHYR_BASE}/subsys/bluetooth + ${ZEPHYR_BASE}/subsys/bluetooth/controller + ${ZEPHYR_BASE}/subsys/bluetooth/controller/include + ${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic + ${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic/lll ) FILE(GLOB app_sources src/*.c) diff --git a/tests/bluetooth/ctrl_user_ext/CMakeLists.txt b/tests/bluetooth/ctrl_user_ext/CMakeLists.txt index 4fd978919ae..5952493ce1f 100644 --- a/tests/bluetooth/ctrl_user_ext/CMakeLists.txt +++ b/tests/bluetooth/ctrl_user_ext/CMakeLists.txt @@ -3,10 +3,10 @@ cmake_minimum_required(VERSION 3.13.1) include_directories("./src") -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bluetooth_ctrl_user_ext) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/subsys/bluetooth/controller/) +zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/bluetooth/controller/) FILE(GLOB app_sources src/*.c) diff --git a/tests/bluetooth/gatt/CMakeLists.txt b/tests/bluetooth/gatt/CMakeLists.txt index d973827dba8..5a0c1851b89 100644 --- a/tests/bluetooth/gatt/CMakeLists.txt +++ b/tests/bluetooth/gatt/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bluetooth_gatt) FILE(GLOB app_sources src/*.c) diff --git a/tests/bluetooth/hci_prop_evt/CMakeLists.txt b/tests/bluetooth/hci_prop_evt/CMakeLists.txt index 011d6203833..52780a1df49 100644 --- a/tests/bluetooth/hci_prop_evt/CMakeLists.txt +++ b/tests/bluetooth/hci_prop_evt/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(hci_prop_evt) target_sources(app PRIVATE src/main.c) diff --git a/tests/bluetooth/init/CMakeLists.txt b/tests/bluetooth/init/CMakeLists.txt index 690b5a58bc5..8d24930e708 100644 --- a/tests/bluetooth/init/CMakeLists.txt +++ b/tests/bluetooth/init/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bluetooth_init) FILE(GLOB app_sources src/*.c) diff --git a/tests/bluetooth/l2cap/CMakeLists.txt b/tests/bluetooth/l2cap/CMakeLists.txt index d973827dba8..5a0c1851b89 100644 --- a/tests/bluetooth/l2cap/CMakeLists.txt +++ b/tests/bluetooth/l2cap/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bluetooth_gatt) FILE(GLOB app_sources src/*.c) diff --git a/tests/bluetooth/ll_settings/CMakeLists.txt b/tests/bluetooth/ll_settings/CMakeLists.txt index 904180a1ce2..539dc8b628f 100644 --- a/tests/bluetooth/ll_settings/CMakeLists.txt +++ b/tests/bluetooth/ll_settings/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bluetooth_ll_settings) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/subsys/bluetooth/controller/include) +zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/bluetooth/controller/include) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/bluetooth/mesh/CMakeLists.txt b/tests/bluetooth/mesh/CMakeLists.txt index 48284bfccbc..42eefe74aa1 100644 --- a/tests/bluetooth/mesh/CMakeLists.txt +++ b/tests/bluetooth/mesh/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mesh) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) target_sources(app PRIVATE src/main.c) if(CONFIG_BOARD_BBC_MICROBIT) target_sources(app PRIVATE src/microbit.c) diff --git a/tests/bluetooth/mesh_shell/CMakeLists.txt b/tests/bluetooth/mesh_shell/CMakeLists.txt index 67a91a2a888..dc0e24d8deb 100644 --- a/tests/bluetooth/mesh_shell/CMakeLists.txt +++ b/tests/bluetooth/mesh_shell/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mesh_shell) FILE(GLOB app_sources src/*.c) diff --git a/tests/bluetooth/shell/CMakeLists.txt b/tests/bluetooth/shell/CMakeLists.txt index 715e6c70d2c..8459fbdb303 100644 --- a/tests/bluetooth/shell/CMakeLists.txt +++ b/tests/bluetooth/shell/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bluetooth_shell) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) target_sources(app PRIVATE src/main.c) diff --git a/tests/bluetooth/tester/CMakeLists.txt b/tests/bluetooth/tester/CMakeLists.txt index 4690b11c478..2e6dc08e5c2 100644 --- a/tests/bluetooth/tester/CMakeLists.txt +++ b/tests/bluetooth/tester/CMakeLists.txt @@ -4,10 +4,10 @@ cmake_minimum_required(VERSION 3.13.1) LIST(APPEND QEMU_EXTRA_FLAGS -serial unix:/tmp/bt-stack-tester) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tester) -zephyr_library_include_directories($ENV{ZEPHYR_BASE}/samples/bluetooth) +zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) target_sources(app PRIVATE src/main.c src/bttester.c diff --git a/tests/bluetooth/uuid/CMakeLists.txt b/tests/bluetooth/uuid/CMakeLists.txt index d973827dba8..5a0c1851b89 100644 --- a/tests/bluetooth/uuid/CMakeLists.txt +++ b/tests/bluetooth/uuid/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bluetooth_gatt) FILE(GLOB app_sources src/*.c) diff --git a/tests/boards/altera_max10/i2c_master/CMakeLists.txt b/tests/boards/altera_max10/i2c_master/CMakeLists.txt index 8f3401a19aa..094c7f961dc 100644 --- a/tests/boards/altera_max10/i2c_master/CMakeLists.txt +++ b/tests/boards/altera_max10/i2c_master/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(i2c_master) FILE(GLOB app_sources src/*.c) diff --git a/tests/boards/altera_max10/msgdma/CMakeLists.txt b/tests/boards/altera_max10/msgdma/CMakeLists.txt index 35a7f914044..16e87857588 100644 --- a/tests/boards/altera_max10/msgdma/CMakeLists.txt +++ b/tests/boards/altera_max10/msgdma/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(msgdma) FILE(GLOB app_sources src/*.c) diff --git a/tests/boards/altera_max10/qspi/CMakeLists.txt b/tests/boards/altera_max10/qspi/CMakeLists.txt index 12d2b2f0b99..51d9486e064 100644 --- a/tests/boards/altera_max10/qspi/CMakeLists.txt +++ b/tests/boards/altera_max10/qspi/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(qspi) FILE(GLOB app_sources src/*.c) diff --git a/tests/boards/altera_max10/sysid/CMakeLists.txt b/tests/boards/altera_max10/sysid/CMakeLists.txt index 3cd79f155d2..029de6a659f 100644 --- a/tests/boards/altera_max10/sysid/CMakeLists.txt +++ b/tests/boards/altera_max10/sysid/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sysid) FILE(GLOB app_sources src/*.c) diff --git a/tests/boards/board_shell/CMakeLists.txt b/tests/boards/board_shell/CMakeLists.txt index 65430d56e72..3ab7e5d7e31 100644 --- a/tests/boards/board_shell/CMakeLists.txt +++ b/tests/boards/board_shell/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(board_shell) FILE(GLOB app_sources src/*.c) diff --git a/tests/boards/intel_s1000_crb/CMakeLists.txt b/tests/boards/intel_s1000_crb/CMakeLists.txt index 3bea69db4cc..d31ebc06902 100644 --- a/tests/boards/intel_s1000_crb/CMakeLists.txt +++ b/tests/boards/intel_s1000_crb/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(intel_s1000_crb) if(CONFIG_I2C) diff --git a/tests/boards/intel_s1000_crb/cache/CMakeLists.txt b/tests/boards/intel_s1000_crb/cache/CMakeLists.txt index 7413a0bc001..461e37b989c 100644 --- a/tests/boards/intel_s1000_crb/cache/CMakeLists.txt +++ b/tests/boards/intel_s1000_crb/cache/CMakeLists.txt @@ -2,7 +2,7 @@ set(BOARD intel_s1000_crb) cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(intel_s1000_crb) target_sources(app PRIVATE src/cache_test.c) diff --git a/tests/boards/native_posix/native_tasks/CMakeLists.txt b/tests/boards/native_posix/native_tasks/CMakeLists.txt index c14e9e80a63..dda4460ba29 100644 --- a/tests/boards/native_posix/native_tasks/CMakeLists.txt +++ b/tests/boards/native_posix/native_tasks/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(native_tasks) FILE(GLOB app_sources src/*.c) diff --git a/tests/boards/native_posix/rtc/CMakeLists.txt b/tests/boards/native_posix/rtc/CMakeLists.txt index 1fc7f6039bd..9d729a246d7 100644 --- a/tests/boards/native_posix/rtc/CMakeLists.txt +++ b/tests/boards/native_posix/rtc/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(rtc) target_sources(app PRIVATE src/main.c) diff --git a/tests/crypto/mbedtls/CMakeLists.txt b/tests/crypto/mbedtls/CMakeLists.txt index 8ac179f2dbf..626a822715d 100644 --- a/tests/crypto/mbedtls/CMakeLists.txt +++ b/tests/crypto/mbedtls/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mbedtls) FILE(GLOB app_sources src/*.c) diff --git a/tests/crypto/rand32/CMakeLists.txt b/tests/crypto/rand32/CMakeLists.txt index 0c3c4eefcd5..00cd51af2c5 100644 --- a/tests/crypto/rand32/CMakeLists.txt +++ b/tests/crypto/rand32/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(rand32) zephyr_library_include_directories(${ZEPHYR_BASE}/kernel/include/) diff --git a/tests/crypto/tinycrypt/CMakeLists.txt b/tests/crypto/tinycrypt/CMakeLists.txt index 59f70ea86e2..3179c27b49c 100644 --- a/tests/crypto/tinycrypt/CMakeLists.txt +++ b/tests/crypto/tinycrypt/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tinycrypt) FILE(GLOB app_sources src/*.c) diff --git a/tests/crypto/tinycrypt_hmac_prng/CMakeLists.txt b/tests/crypto/tinycrypt_hmac_prng/CMakeLists.txt index a8be4796b3e..bc51a7a1ed7 100644 --- a/tests/crypto/tinycrypt_hmac_prng/CMakeLists.txt +++ b/tests/crypto/tinycrypt_hmac_prng/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tinycrypt_hmac_prng) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/adc/adc_api/CMakeLists.txt b/tests/drivers/adc/adc_api/CMakeLists.txt index 32c3ff19ee2..04b26384000 100644 --- a/tests/drivers/adc/adc_api/CMakeLists.txt +++ b/tests/drivers/adc/adc_api/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(adc_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/build_all/CMakeLists.txt b/tests/drivers/build_all/CMakeLists.txt index ea540a94f82..49085ddf6ba 100644 --- a/tests/drivers/build_all/CMakeLists.txt +++ b/tests/drivers/build_all/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(build_all) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/can/api/CMakeLists.txt b/tests/drivers/can/api/CMakeLists.txt index 445aaf12964..60e3e15be65 100644 --- a/tests/drivers/can/api/CMakeLists.txt +++ b/tests/drivers/can/api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(integration) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/can/stm32/CMakeLists.txt b/tests/drivers/can/stm32/CMakeLists.txt index 445aaf12964..60e3e15be65 100644 --- a/tests/drivers/can/stm32/CMakeLists.txt +++ b/tests/drivers/can/stm32/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(integration) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/clock_control/clock_control_api/CMakeLists.txt b/tests/drivers/clock_control/clock_control_api/CMakeLists.txt index 7ac5982e37d..f8f508c02fd 100644 --- a/tests/drivers/clock_control/clock_control_api/CMakeLists.txt +++ b/tests/drivers/clock_control/clock_control_api/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/clock_control/nrf_clock_calibration/CMakeLists.txt b/tests/drivers/clock_control/nrf_clock_calibration/CMakeLists.txt index 7ac5982e37d..f8f508c02fd 100644 --- a/tests/drivers/clock_control/nrf_clock_calibration/CMakeLists.txt +++ b/tests/drivers/clock_control/nrf_clock_calibration/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/counter/counter_basic_api/CMakeLists.txt b/tests/drivers/counter/counter_basic_api/CMakeLists.txt index 7ac5982e37d..f8f508c02fd 100644 --- a/tests/drivers/counter/counter_basic_api/CMakeLists.txt +++ b/tests/drivers/counter/counter_basic_api/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/counter/counter_cmos/CMakeLists.txt b/tests/drivers/counter/counter_cmos/CMakeLists.txt index 829dc318fc2..98b3eb51347 100644 --- a/tests/drivers/counter/counter_cmos/CMakeLists.txt +++ b/tests/drivers/counter/counter_cmos/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) target_sources(app PRIVATE src/main.c) diff --git a/tests/drivers/counter/counter_nrf_rtc/fixed_top/CMakeLists.txt b/tests/drivers/counter/counter_nrf_rtc/fixed_top/CMakeLists.txt index 7ac5982e37d..f8f508c02fd 100644 --- a/tests/drivers/counter/counter_nrf_rtc/fixed_top/CMakeLists.txt +++ b/tests/drivers/counter/counter_nrf_rtc/fixed_top/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/dma/chan_blen_transfer/CMakeLists.txt b/tests/drivers/dma/chan_blen_transfer/CMakeLists.txt index 72f9e604b8e..340df0be376 100644 --- a/tests/drivers/dma/chan_blen_transfer/CMakeLists.txt +++ b/tests/drivers/dma/chan_blen_transfer/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(chan_blen_transfer) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/dma/loop_transfer/CMakeLists.txt b/tests/drivers/dma/loop_transfer/CMakeLists.txt index 4640df1c3ca..b1a2ddc5275 100644 --- a/tests/drivers/dma/loop_transfer/CMakeLists.txt +++ b/tests/drivers/dma/loop_transfer/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(loop_transfer) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/eeprom/CMakeLists.txt b/tests/drivers/eeprom/CMakeLists.txt index 94fd4bc8dbc..0c1ddb40690 100644 --- a/tests/drivers/eeprom/CMakeLists.txt +++ b/tests/drivers/eeprom/CMakeLists.txt @@ -5,7 +5,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(eeprom_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/entropy/api/CMakeLists.txt b/tests/drivers/entropy/api/CMakeLists.txt index 1a9b8b8fcd3..2f033971eb8 100644 --- a/tests/drivers/entropy/api/CMakeLists.txt +++ b/tests/drivers/entropy/api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(entropy_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/flash_simulator/CMakeLists.txt b/tests/drivers/flash_simulator/CMakeLists.txt index ffeb61e15bd..af83acbfc72 100644 --- a/tests/drivers/flash_simulator/CMakeLists.txt +++ b/tests/drivers/flash_simulator/CMakeLists.txt @@ -5,7 +5,7 @@ # cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(flash_simulator) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/gpio/gpio_api_1pin/CMakeLists.txt b/tests/drivers/gpio/gpio_api_1pin/CMakeLists.txt index 66e98a7b2ef..f8f4f1f5485 100644 --- a/tests/drivers/gpio/gpio_api_1pin/CMakeLists.txt +++ b/tests/drivers/gpio/gpio_api_1pin/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(gpio_basic_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/gpio/gpio_basic_api/CMakeLists.txt b/tests/drivers/gpio/gpio_basic_api/CMakeLists.txt index 66e98a7b2ef..f8f4f1f5485 100644 --- a/tests/drivers/gpio/gpio_basic_api/CMakeLists.txt +++ b/tests/drivers/gpio/gpio_basic_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(gpio_basic_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/hwinfo/api/CMakeLists.txt b/tests/drivers/hwinfo/api/CMakeLists.txt index 445aaf12964..60e3e15be65 100644 --- a/tests/drivers/hwinfo/api/CMakeLists.txt +++ b/tests/drivers/hwinfo/api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(integration) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/i2c/i2c_api/CMakeLists.txt b/tests/drivers/i2c/i2c_api/CMakeLists.txt index b45e1eebe18..e181312190e 100644 --- a/tests/drivers/i2c/i2c_api/CMakeLists.txt +++ b/tests/drivers/i2c/i2c_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(i2c_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/i2c/i2c_slave_api/CMakeLists.txt b/tests/drivers/i2c/i2c_slave_api/CMakeLists.txt index 6f7bdc90324..f5908137cdc 100644 --- a/tests/drivers/i2c/i2c_slave_api/CMakeLists.txt +++ b/tests/drivers/i2c/i2c_slave_api/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(i2c_slave_api) add_subdirectory(common) diff --git a/tests/drivers/i2s/i2s_api/CMakeLists.txt b/tests/drivers/i2s/i2s_api/CMakeLists.txt index 536d35dfddf..a7180f7f5c0 100644 --- a/tests/drivers/i2s/i2s_api/CMakeLists.txt +++ b/tests/drivers/i2s/i2s_api/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(i2s_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/i2s/i2s_speed/CMakeLists.txt b/tests/drivers/i2s/i2s_speed/CMakeLists.txt index 643ef83be82..fc9055ae291 100644 --- a/tests/drivers/i2s/i2s_speed/CMakeLists.txt +++ b/tests/drivers/i2s/i2s_speed/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(i2s_speed) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/ipm/CMakeLists.txt b/tests/drivers/ipm/CMakeLists.txt index ba374e41bf1..ef42e4eaea9 100644 --- a/tests/drivers/ipm/CMakeLists.txt +++ b/tests/drivers/ipm/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ipm) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/kscan/kscan_api/CMakeLists.txt b/tests/drivers/kscan/kscan_api/CMakeLists.txt index 2eed9ec5bf7..16367aab477 100644 --- a/tests/drivers/kscan/kscan_api/CMakeLists.txt +++ b/tests/drivers/kscan/kscan_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(kscan_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/pwm/pwm_api/CMakeLists.txt b/tests/drivers/pwm/pwm_api/CMakeLists.txt index 8fe93aa5286..c61f23507c1 100644 --- a/tests/drivers/pwm/pwm_api/CMakeLists.txt +++ b/tests/drivers/pwm/pwm_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(pwm_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/spi/spi_loopback/CMakeLists.txt b/tests/drivers/spi/spi_loopback/CMakeLists.txt index 9ac96b473bc..3c51ff0dcac 100644 --- a/tests/drivers/spi/spi_loopback/CMakeLists.txt +++ b/tests/drivers/spi/spi_loopback/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(spi_loopback) FILE(GLOB app_sources src/*.c) diff --git a/tests/drivers/uart/uart_async_api/CMakeLists.txt b/tests/drivers/uart/uart_async_api/CMakeLists.txt index 4c4d46c950d..5ce634175e8 100644 --- a/tests/drivers/uart/uart_async_api/CMakeLists.txt +++ b/tests/drivers/uart/uart_async_api/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(uart_high_level_api) target_sources(app PRIVATE diff --git a/tests/drivers/uart/uart_basic_api/CMakeLists.txt b/tests/drivers/uart/uart_basic_api/CMakeLists.txt index 89beb00f4a7..a30fa6f58db 100644 --- a/tests/drivers/uart/uart_basic_api/CMakeLists.txt +++ b/tests/drivers/uart/uart_basic_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(uart_basic_api) target_sources(app PRIVATE diff --git a/tests/drivers/watchdog/wdt_basic_api/CMakeLists.txt b/tests/drivers/watchdog/wdt_basic_api/CMakeLists.txt index ebd00241c9f..61661675f92 100644 --- a/tests/drivers/watchdog/wdt_basic_api/CMakeLists.txt +++ b/tests/drivers/watchdog/wdt_basic_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(wdt_basic_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/common/CMakeLists.txt b/tests/kernel/common/CMakeLists.txt index fdae0e0ca83..a6baecc97ec 100644 --- a/tests/kernel/common/CMakeLists.txt +++ b/tests/kernel/common/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(kernel_common) if(NOT CONFIG_ARM) diff --git a/tests/kernel/context/CMakeLists.txt b/tests/kernel/context/CMakeLists.txt index 140643a81de..28c93dbe4ba 100644 --- a/tests/kernel/context/CMakeLists.txt +++ b/tests/kernel/context/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(kernel_context) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/critical/CMakeLists.txt b/tests/kernel/critical/CMakeLists.txt index 825c4bd66c3..93aba7b68ff 100644 --- a/tests/kernel/critical/CMakeLists.txt +++ b/tests/kernel/critical/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(critical) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/device/CMakeLists.txt b/tests/kernel/device/CMakeLists.txt index 3ce85d04dc3..9b143e10561 100644 --- a/tests/kernel/device/CMakeLists.txt +++ b/tests/kernel/device/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(device) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/early_sleep/CMakeLists.txt b/tests/kernel/early_sleep/CMakeLists.txt index 0718c9984f8..54b5382e237 100644 --- a/tests/kernel/early_sleep/CMakeLists.txt +++ b/tests/kernel/early_sleep/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(early_sleep) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/fatal/CMakeLists.txt b/tests/kernel/fatal/CMakeLists.txt index dd6b855f4f2..213dd77a8bf 100644 --- a/tests/kernel/fatal/CMakeLists.txt +++ b/tests/kernel/fatal/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fatal) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/fifo/fifo_api/CMakeLists.txt b/tests/kernel/fifo/fifo_api/CMakeLists.txt index b98d2fa8a0b..dee98b72c0b 100644 --- a/tests/kernel/fifo/fifo_api/CMakeLists.txt +++ b/tests/kernel/fifo/fifo_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fifo_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/fifo/fifo_timeout/CMakeLists.txt b/tests/kernel/fifo/fifo_timeout/CMakeLists.txt index 345401c0136..619b939162f 100644 --- a/tests/kernel/fifo/fifo_timeout/CMakeLists.txt +++ b/tests/kernel/fifo/fifo_timeout/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fifo_timeout) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/fifo/fifo_usage/CMakeLists.txt b/tests/kernel/fifo/fifo_usage/CMakeLists.txt index 1c742414d1b..9f17d497401 100644 --- a/tests/kernel/fifo/fifo_usage/CMakeLists.txt +++ b/tests/kernel/fifo/fifo_usage/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fifo_usage) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/fp_sharing/float_disable/CMakeLists.txt b/tests/kernel/fp_sharing/float_disable/CMakeLists.txt index aa27d5912fc..94f09ad5f3d 100644 --- a/tests/kernel/fp_sharing/float_disable/CMakeLists.txt +++ b/tests/kernel/fp_sharing/float_disable/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(k_float_disable) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/fp_sharing/generic/CMakeLists.txt b/tests/kernel/fp_sharing/generic/CMakeLists.txt index 4db2447e988..e36561aa62c 100644 --- a/tests/kernel/fp_sharing/generic/CMakeLists.txt +++ b/tests/kernel/fp_sharing/generic/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fp_sharing) # Some boards are significantly slower than others resulting in the test diff --git a/tests/kernel/gen_isr_table/CMakeLists.txt b/tests/kernel/gen_isr_table/CMakeLists.txt index c5590572f51..6c9ca4c22a0 100644 --- a/tests/kernel/gen_isr_table/CMakeLists.txt +++ b/tests/kernel/gen_isr_table/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(gen_isr_table) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/interrupt/CMakeLists.txt b/tests/kernel/interrupt/CMakeLists.txt index 523be953f69..91ecb4d5f26 100644 --- a/tests/kernel/interrupt/CMakeLists.txt +++ b/tests/kernel/interrupt/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(interrupt) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/lifo/lifo_api/CMakeLists.txt b/tests/kernel/lifo/lifo_api/CMakeLists.txt index 674939aa824..57837a3ba9f 100644 --- a/tests/kernel/lifo/lifo_api/CMakeLists.txt +++ b/tests/kernel/lifo/lifo_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lifo_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/lifo/lifo_usage/CMakeLists.txt b/tests/kernel/lifo/lifo_usage/CMakeLists.txt index e50cd664817..468ab0737b4 100644 --- a/tests/kernel/lifo/lifo_usage/CMakeLists.txt +++ b/tests/kernel/lifo/lifo_usage/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lifo_usage) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mbox/mbox_api/CMakeLists.txt b/tests/kernel/mbox/mbox_api/CMakeLists.txt index 7648eb5245d..b010496d9d4 100644 --- a/tests/kernel/mbox/mbox_api/CMakeLists.txt +++ b/tests/kernel/mbox/mbox_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mbox_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mbox/mbox_usage/CMakeLists.txt b/tests/kernel/mbox/mbox_usage/CMakeLists.txt index 15f80db408e..3638ee3b6d9 100644 --- a/tests/kernel/mbox/mbox_usage/CMakeLists.txt +++ b/tests/kernel/mbox/mbox_usage/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mbox_usage) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_heap/mheap_api_concept/CMakeLists.txt b/tests/kernel/mem_heap/mheap_api_concept/CMakeLists.txt index ac2a475aab4..cb45f78713b 100644 --- a/tests/kernel/mem_heap/mheap_api_concept/CMakeLists.txt +++ b/tests/kernel/mem_heap/mheap_api_concept/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mheap_api_concept) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_pool/mem_pool/CMakeLists.txt b/tests/kernel/mem_pool/mem_pool/CMakeLists.txt index 0de29bda709..41ec0a63b8b 100644 --- a/tests/kernel/mem_pool/mem_pool/CMakeLists.txt +++ b/tests/kernel/mem_pool/mem_pool/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mem_pool) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_pool/mem_pool_api/CMakeLists.txt b/tests/kernel/mem_pool/mem_pool_api/CMakeLists.txt index e8503cddeb9..74819d149bc 100644 --- a/tests/kernel/mem_pool/mem_pool_api/CMakeLists.txt +++ b/tests/kernel/mem_pool/mem_pool_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mem_pool_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_pool/mem_pool_concept/CMakeLists.txt b/tests/kernel/mem_pool/mem_pool_concept/CMakeLists.txt index ddde548c109..3ae677a4167 100644 --- a/tests/kernel/mem_pool/mem_pool_concept/CMakeLists.txt +++ b/tests/kernel/mem_pool/mem_pool_concept/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mem_pool_concept) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_pool/mem_pool_threadsafe/CMakeLists.txt b/tests/kernel/mem_pool/mem_pool_threadsafe/CMakeLists.txt index 1c8f755fcdb..e8cd59ff956 100644 --- a/tests/kernel/mem_pool/mem_pool_threadsafe/CMakeLists.txt +++ b/tests/kernel/mem_pool/mem_pool_threadsafe/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mem_pool_threadsafe) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_pool/sys_mem_pool/CMakeLists.txt b/tests/kernel/mem_pool/sys_mem_pool/CMakeLists.txt index 3bc0d26390c..b20578d7d19 100644 --- a/tests/kernel/mem_pool/sys_mem_pool/CMakeLists.txt +++ b/tests/kernel/mem_pool/sys_mem_pool/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sys_mem_pool) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_protect/futex/CMakeLists.txt b/tests/kernel/mem_protect/futex/CMakeLists.txt index 4a1cf46aadd..83cf4801646 100644 --- a/tests/kernel/mem_protect/futex/CMakeLists.txt +++ b/tests/kernel/mem_protect/futex/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(futex) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_protect/mem_protect/CMakeLists.txt b/tests/kernel/mem_protect/mem_protect/CMakeLists.txt index e6aacee7559..ee1541f84e3 100644 --- a/tests/kernel/mem_protect/mem_protect/CMakeLists.txt +++ b/tests/kernel/mem_protect/mem_protect/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mem_protect) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_protect/obj_validation/CMakeLists.txt b/tests/kernel/mem_protect/obj_validation/CMakeLists.txt index 1021b6a1b35..53850f1393d 100644 --- a/tests/kernel/mem_protect/obj_validation/CMakeLists.txt +++ b/tests/kernel/mem_protect/obj_validation/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(obj_validation) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_protect/protection/CMakeLists.txt b/tests/kernel/mem_protect/protection/CMakeLists.txt index 07c923bb58b..cc19c2d8ad2 100644 --- a/tests/kernel/mem_protect/protection/CMakeLists.txt +++ b/tests/kernel/mem_protect/protection/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(protection) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_protect/stack_random/CMakeLists.txt b/tests/kernel/mem_protect/stack_random/CMakeLists.txt index 735ca3b4004..fb4b2182412 100644 --- a/tests/kernel/mem_protect/stack_random/CMakeLists.txt +++ b/tests/kernel/mem_protect/stack_random/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(stack_random) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_protect/stackprot/CMakeLists.txt b/tests/kernel/mem_protect/stackprot/CMakeLists.txt index d03f315970a..b2006308e8e 100644 --- a/tests/kernel/mem_protect/stackprot/CMakeLists.txt +++ b/tests/kernel/mem_protect/stackprot/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(stackprot) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_protect/sys_sem/CMakeLists.txt b/tests/kernel/mem_protect/sys_sem/CMakeLists.txt index 9463f4d42f7..2eb7428c876 100644 --- a/tests/kernel/mem_protect/sys_sem/CMakeLists.txt +++ b/tests/kernel/mem_protect/sys_sem/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sys_sem) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_protect/syscalls/CMakeLists.txt b/tests/kernel/mem_protect/syscalls/CMakeLists.txt index 13def6b1987..953b2606c6c 100644 --- a/tests/kernel/mem_protect/syscalls/CMakeLists.txt +++ b/tests/kernel/mem_protect/syscalls/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(syscalls) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_protect/userspace/CMakeLists.txt b/tests/kernel/mem_protect/userspace/CMakeLists.txt index bc32021861e..fd9909dcdf3 100644 --- a/tests/kernel/mem_protect/userspace/CMakeLists.txt +++ b/tests/kernel/mem_protect/userspace/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(userspace) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_slab/mslab/CMakeLists.txt b/tests/kernel/mem_slab/mslab/CMakeLists.txt index 621b3b01da7..7c85ba4003e 100644 --- a/tests/kernel/mem_slab/mslab/CMakeLists.txt +++ b/tests/kernel/mem_slab/mslab/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mslab) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_slab/mslab_api/CMakeLists.txt b/tests/kernel/mem_slab/mslab_api/CMakeLists.txt index 2cd4fd0741a..76045e1bf0c 100644 --- a/tests/kernel/mem_slab/mslab_api/CMakeLists.txt +++ b/tests/kernel/mem_slab/mslab_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mslab_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_slab/mslab_concept/CMakeLists.txt b/tests/kernel/mem_slab/mslab_concept/CMakeLists.txt index 468c2d64e35..5712779c69d 100644 --- a/tests/kernel/mem_slab/mslab_concept/CMakeLists.txt +++ b/tests/kernel/mem_slab/mslab_concept/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mslab_concept) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mem_slab/mslab_threadsafe/CMakeLists.txt b/tests/kernel/mem_slab/mslab_threadsafe/CMakeLists.txt index c566e45e153..b24f22f0e12 100644 --- a/tests/kernel/mem_slab/mslab_threadsafe/CMakeLists.txt +++ b/tests/kernel/mem_slab/mslab_threadsafe/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mslab_threadsafe) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mp/CMakeLists.txt b/tests/kernel/mp/CMakeLists.txt index 1fc26fee94a..69b1d8268b8 100644 --- a/tests/kernel/mp/CMakeLists.txt +++ b/tests/kernel/mp/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mp) target_sources(app PRIVATE src/main.c) diff --git a/tests/kernel/msgq/msgq_api/CMakeLists.txt b/tests/kernel/msgq/msgq_api/CMakeLists.txt index c2764fcb6a2..005ea67ac19 100644 --- a/tests/kernel/msgq/msgq_api/CMakeLists.txt +++ b/tests/kernel/msgq/msgq_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(msgq_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mutex/mutex_api/CMakeLists.txt b/tests/kernel/mutex/mutex_api/CMakeLists.txt index 59842bb1a6c..49dd71fff49 100644 --- a/tests/kernel/mutex/mutex_api/CMakeLists.txt +++ b/tests/kernel/mutex/mutex_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mutex_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/mutex/sys_mutex/CMakeLists.txt b/tests/kernel/mutex/sys_mutex/CMakeLists.txt index f136e0b7937..1722bdb11f3 100644 --- a/tests/kernel/mutex/sys_mutex/CMakeLists.txt +++ b/tests/kernel/mutex/sys_mutex/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mutex) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/obj_tracing/CMakeLists.txt b/tests/kernel/obj_tracing/CMakeLists.txt index 09e9f9cb56f..14a5c1796c9 100644 --- a/tests/kernel/obj_tracing/CMakeLists.txt +++ b/tests/kernel/obj_tracing/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(obj_tracing) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/pending/CMakeLists.txt b/tests/kernel/pending/CMakeLists.txt index f5b8859c8a3..45b87836807 100644 --- a/tests/kernel/pending/CMakeLists.txt +++ b/tests/kernel/pending/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(pending) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/pipe/pipe/CMakeLists.txt b/tests/kernel/pipe/pipe/CMakeLists.txt index 8ad39e84e76..4854d03a93b 100644 --- a/tests/kernel/pipe/pipe/CMakeLists.txt +++ b/tests/kernel/pipe/pipe/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(pipe) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/pipe/pipe_api/CMakeLists.txt b/tests/kernel/pipe/pipe_api/CMakeLists.txt index 4d0b0aa3cb3..2fdde29648e 100644 --- a/tests/kernel/pipe/pipe_api/CMakeLists.txt +++ b/tests/kernel/pipe/pipe_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(pipe_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/poll/CMakeLists.txt b/tests/kernel/poll/CMakeLists.txt index c69a34455b8..62813da5dd0 100644 --- a/tests/kernel/poll/CMakeLists.txt +++ b/tests/kernel/poll/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(poll) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/profiling/profiling_api/CMakeLists.txt b/tests/kernel/profiling/profiling_api/CMakeLists.txt index 438da693b18..4433d09fd97 100644 --- a/tests/kernel/profiling/profiling_api/CMakeLists.txt +++ b/tests/kernel/profiling/profiling_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(profiling_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/queue/CMakeLists.txt b/tests/kernel/queue/CMakeLists.txt index f6d678da529..459a0f16e91 100644 --- a/tests/kernel/queue/CMakeLists.txt +++ b/tests/kernel/queue/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(queue) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/sched/deadline/CMakeLists.txt b/tests/kernel/sched/deadline/CMakeLists.txt index a446da8d64e..e36720aa4ae 100644 --- a/tests/kernel/sched/deadline/CMakeLists.txt +++ b/tests/kernel/sched/deadline/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(deadline) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/sched/metairq/CMakeLists.txt b/tests/kernel/sched/metairq/CMakeLists.txt index 9196efd7a68..bbdc8c471e8 100644 --- a/tests/kernel/sched/metairq/CMakeLists.txt +++ b/tests/kernel/sched/metairq/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(preempt) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/sched/preempt/CMakeLists.txt b/tests/kernel/sched/preempt/CMakeLists.txt index 9196efd7a68..bbdc8c471e8 100644 --- a/tests/kernel/sched/preempt/CMakeLists.txt +++ b/tests/kernel/sched/preempt/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(preempt) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/sched/schedule_api/CMakeLists.txt b/tests/kernel/sched/schedule_api/CMakeLists.txt index 85d46ba7980..815825e6e81 100644 --- a/tests/kernel/sched/schedule_api/CMakeLists.txt +++ b/tests/kernel/sched/schedule_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(schedule_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/semaphore/semaphore/CMakeLists.txt b/tests/kernel/semaphore/semaphore/CMakeLists.txt index abf4a113380..3a1033f4f66 100644 --- a/tests/kernel/semaphore/semaphore/CMakeLists.txt +++ b/tests/kernel/semaphore/semaphore/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(semaphore) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/sleep/CMakeLists.txt b/tests/kernel/sleep/CMakeLists.txt index 407339d004c..c00c33bdbe2 100644 --- a/tests/kernel/sleep/CMakeLists.txt +++ b/tests/kernel/sleep/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sleep) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/smp/CMakeLists.txt b/tests/kernel/smp/CMakeLists.txt index 6d4b51481c0..8f3a78f98c1 100644 --- a/tests/kernel/smp/CMakeLists.txt +++ b/tests/kernel/smp/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(smp) target_sources(app PRIVATE src/main.c) diff --git a/tests/kernel/spinlock/CMakeLists.txt b/tests/kernel/spinlock/CMakeLists.txt index b646cd29c43..ed4ba8c8a31 100644 --- a/tests/kernel/spinlock/CMakeLists.txt +++ b/tests/kernel/spinlock/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(spinlock) target_sources(app PRIVATE src/main.c) diff --git a/tests/kernel/stack/stack/CMakeLists.txt b/tests/kernel/stack/stack/CMakeLists.txt index 01f81c59426..e2b791d111c 100644 --- a/tests/kernel/stack/stack/CMakeLists.txt +++ b/tests/kernel/stack/stack/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(stack_usage) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/threads/dynamic_thread/CMakeLists.txt b/tests/kernel/threads/dynamic_thread/CMakeLists.txt index 8957995cdae..4a5f908ad83 100644 --- a/tests/kernel/threads/dynamic_thread/CMakeLists.txt +++ b/tests/kernel/threads/dynamic_thread/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(dynamic_thread) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/threads/no-multithreading/CMakeLists.txt b/tests/kernel/threads/no-multithreading/CMakeLists.txt index b827acba2f0..c881aeb41b2 100644 --- a/tests/kernel/threads/no-multithreading/CMakeLists.txt +++ b/tests/kernel/threads/no-multithreading/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(no-multithreading) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/threads/thread_apis/CMakeLists.txt b/tests/kernel/threads/thread_apis/CMakeLists.txt index d95357873af..7487612707d 100644 --- a/tests/kernel/threads/thread_apis/CMakeLists.txt +++ b/tests/kernel/threads/thread_apis/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(thread_apis) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/threads/thread_init/CMakeLists.txt b/tests/kernel/threads/thread_init/CMakeLists.txt index c93a6a6a60a..773c44a062f 100644 --- a/tests/kernel/threads/thread_init/CMakeLists.txt +++ b/tests/kernel/threads/thread_init/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(thread_init) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/tickless/tickless/CMakeLists.txt b/tests/kernel/tickless/tickless/CMakeLists.txt index 4f95bdc978f..8dfce1d161a 100644 --- a/tests/kernel/tickless/tickless/CMakeLists.txt +++ b/tests/kernel/tickless/tickless/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tickless) target_sources(app PRIVATE src/main.c) diff --git a/tests/kernel/tickless/tickless_concept/CMakeLists.txt b/tests/kernel/tickless/tickless_concept/CMakeLists.txt index 30f65ac7693..b515dc0cfde 100644 --- a/tests/kernel/tickless/tickless_concept/CMakeLists.txt +++ b/tests/kernel/tickless/tickless_concept/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tickless_concept) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/timer/starve/CMakeLists.txt b/tests/kernel/timer/starve/CMakeLists.txt index a096658fdf8..22572a2591d 100644 --- a/tests/kernel/timer/starve/CMakeLists.txt +++ b/tests/kernel/timer/starve/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(timer_starve) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/timer/timer_api/CMakeLists.txt b/tests/kernel/timer/timer_api/CMakeLists.txt index a114d491e7d..39ec1621d43 100644 --- a/tests/kernel/timer/timer_api/CMakeLists.txt +++ b/tests/kernel/timer/timer_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(timer_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/timer/timer_monotonic/CMakeLists.txt b/tests/kernel/timer/timer_monotonic/CMakeLists.txt index 712566b15f2..0ea75e318e2 100644 --- a/tests/kernel/timer/timer_monotonic/CMakeLists.txt +++ b/tests/kernel/timer/timer_monotonic/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(timer_monotonic) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/workq/work_queue/CMakeLists.txt b/tests/kernel/workq/work_queue/CMakeLists.txt index ac5e06a2abf..d9f8e79a2a9 100644 --- a/tests/kernel/workq/work_queue/CMakeLists.txt +++ b/tests/kernel/workq/work_queue/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(work_queue) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/workq/work_queue_api/CMakeLists.txt b/tests/kernel/workq/work_queue_api/CMakeLists.txt index 8d50e443645..998feb3e013 100644 --- a/tests/kernel/workq/work_queue_api/CMakeLists.txt +++ b/tests/kernel/workq/work_queue_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(work_queue_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/kernel/xip/CMakeLists.txt b/tests/kernel/xip/CMakeLists.txt index 9d4f0cc1c9a..51041ea59e5 100644 --- a/tests/kernel/xip/CMakeLists.txt +++ b/tests/kernel/xip/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(xip) FILE(GLOB app_sources src/*.c) diff --git a/tests/lib/c_lib/CMakeLists.txt b/tests/lib/c_lib/CMakeLists.txt index 76a2cf3e56c..e6f930402af 100644 --- a/tests/lib/c_lib/CMakeLists.txt +++ b/tests/lib/c_lib/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(c_lib) FILE(GLOB app_sources src/*.c) diff --git a/tests/lib/devicetree/CMakeLists.txt b/tests/lib/devicetree/CMakeLists.txt index 33d1fefb4e2..fad78eb584d 100644 --- a/tests/lib/devicetree/CMakeLists.txt +++ b/tests/lib/devicetree/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.13.1) set(DTS_ROOTS ${CMAKE_CURRENT_LIST_DIR}) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(devicetree) FILE(GLOB app_sources src/*.c) diff --git a/tests/lib/fdtable/CMakeLists.txt b/tests/lib/fdtable/CMakeLists.txt index 20df8c03648..558ad501d97 100644 --- a/tests/lib/fdtable/CMakeLists.txt +++ b/tests/lib/fdtable/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fdtable) FILE(GLOB app_sources src/*.c) diff --git a/tests/lib/gui/lvgl/CMakeLists.txt b/tests/lib/gui/lvgl/CMakeLists.txt index 5021ec80e2b..744a666a36c 100644 --- a/tests/lib/gui/lvgl/CMakeLists.txt +++ b/tests/lib/gui/lvgl/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(lvgl) FILE(GLOB app_sources src/*.c) diff --git a/tests/lib/json/CMakeLists.txt b/tests/lib/json/CMakeLists.txt index 3b839d9233c..ffda8da4b15 100644 --- a/tests/lib/json/CMakeLists.txt +++ b/tests/lib/json/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(json) FILE(GLOB app_sources src/*.c) diff --git a/tests/lib/mem_alloc/CMakeLists.txt b/tests/lib/mem_alloc/CMakeLists.txt index bc858c55278..bdae3dca361 100644 --- a/tests/lib/mem_alloc/CMakeLists.txt +++ b/tests/lib/mem_alloc/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mem_alloc) FILE(GLOB app_sources src/*.c) diff --git a/tests/lib/onoff/CMakeLists.txt b/tests/lib/onoff/CMakeLists.txt index 0987b751825..611ee027264 100644 --- a/tests/lib/onoff/CMakeLists.txt +++ b/tests/lib/onoff/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(onoff) FILE(GLOB app_sources src/*.c) diff --git a/tests/lib/ringbuffer/CMakeLists.txt b/tests/lib/ringbuffer/CMakeLists.txt index 144fe031bdc..04739730212 100644 --- a/tests/lib/ringbuffer/CMakeLists.txt +++ b/tests/lib/ringbuffer/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ringbuffer) FILE(GLOB app_sources src/*.c) diff --git a/tests/lib/sprintf/CMakeLists.txt b/tests/lib/sprintf/CMakeLists.txt index 12d455fcc96..eaacff8730d 100644 --- a/tests/lib/sprintf/CMakeLists.txt +++ b/tests/lib/sprintf/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sprintf) FILE(GLOB app_sources src/*.c) diff --git a/tests/misc/test_build/CMakeLists.txt b/tests/misc/test_build/CMakeLists.txt index 4ac159a2571..6ce6eb20a0d 100644 --- a/tests/misc/test_build/CMakeLists.txt +++ b/tests/misc/test_build/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(test_build) FILE(GLOB app_sources src/*.c) diff --git a/tests/net/6lo/CMakeLists.txt b/tests/net/6lo/CMakeLists.txt index 86a0ceda4fb..213e2fd6813 100644 --- a/tests/net/6lo/CMakeLists.txt +++ b/tests/net/6lo/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(6lo) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/all/CMakeLists.txt b/tests/net/all/CMakeLists.txt index fa603b3c27a..a580e7ccbba 100644 --- a/tests/net/all/CMakeLists.txt +++ b/tests/net/all/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(all) FILE(GLOB app_sources src/*.c) diff --git a/tests/net/arp/CMakeLists.txt b/tests/net/arp/CMakeLists.txt index f3ed56cdbcd..91b4ea7f779 100644 --- a/tests/net/arp/CMakeLists.txt +++ b/tests/net/arp/CMakeLists.txt @@ -1,14 +1,14 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(arp) target_include_directories( app PRIVATE - $ENV{ZEPHYR_BASE}/subsys/net/ip - $ENV{ZEPHYR_BASE}/subsys/net/l2/ethernet + ${ZEPHYR_BASE}/subsys/net/ip + ${ZEPHYR_BASE}/subsys/net/l2/ethernet ) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/buf/CMakeLists.txt b/tests/net/buf/CMakeLists.txt index 8eeb6064e9a..525ee28e645 100644 --- a/tests/net/buf/CMakeLists.txt +++ b/tests/net/buf/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(buf) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/checksum_offload/CMakeLists.txt b/tests/net/checksum_offload/CMakeLists.txt index d3dbcaa5936..fbd70bed8c1 100644 --- a/tests/net/checksum_offload/CMakeLists.txt +++ b/tests/net/checksum_offload/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(checksum_offload) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/context/CMakeLists.txt b/tests/net/context/CMakeLists.txt index 80c32547ffe..bc9486cfc22 100644 --- a/tests/net/context/CMakeLists.txt +++ b/tests/net/context/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(net_context) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/dhcpv4/CMakeLists.txt b/tests/net/dhcpv4/CMakeLists.txt index c394593045c..c56d6691b5c 100644 --- a/tests/net/dhcpv4/CMakeLists.txt +++ b/tests/net/dhcpv4/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(dhcpv4) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/ethernet_mgmt/CMakeLists.txt b/tests/net/ethernet_mgmt/CMakeLists.txt index d7466875f5b..e438b689d22 100644 --- a/tests/net/ethernet_mgmt/CMakeLists.txt +++ b/tests/net/ethernet_mgmt/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ethernet_mgmt) FILE(GLOB app_sources src/*.c) diff --git a/tests/net/hostname/CMakeLists.txt b/tests/net/hostname/CMakeLists.txt index f3704d49413..4f802380281 100644 --- a/tests/net/hostname/CMakeLists.txt +++ b/tests/net/hostname/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(iface) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/icmpv4/CMakeLists.txt b/tests/net/icmpv4/CMakeLists.txt index c8437cba6a0..bf1a7af3f14 100644 --- a/tests/net/icmpv4/CMakeLists.txt +++ b/tests/net/icmpv4/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(icmpv4) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/icmpv6/CMakeLists.txt b/tests/net/icmpv6/CMakeLists.txt index 75e5a85f2f6..347fed3b792 100644 --- a/tests/net/icmpv6/CMakeLists.txt +++ b/tests/net/icmpv6/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(icmpv6) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/ieee802154/fragment/CMakeLists.txt b/tests/net/ieee802154/fragment/CMakeLists.txt index 56a7227dac2..0fe08b9b137 100644 --- a/tests/net/ieee802154/fragment/CMakeLists.txt +++ b/tests/net/ieee802154/fragment/CMakeLists.txt @@ -1,14 +1,14 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fragment) target_include_directories( app PRIVATE - $ENV{ZEPHYR_BASE}/subsys/net/ip - $ENV{ZEPHYR_BASE}/subsys/net/l2/ieee802154 + ${ZEPHYR_BASE}/subsys/net/ip + ${ZEPHYR_BASE}/subsys/net/l2/ieee802154 ) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/ieee802154/l2/CMakeLists.txt b/tests/net/ieee802154/l2/CMakeLists.txt index 92690d0a223..8b271080ee1 100644 --- a/tests/net/ieee802154/l2/CMakeLists.txt +++ b/tests/net/ieee802154/l2/CMakeLists.txt @@ -1,14 +1,14 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(l2) target_include_directories( app PRIVATE - $ENV{ZEPHYR_BASE}/subsys/net/ip - $ENV{ZEPHYR_BASE}/subsys/net/l2/ieee802154 + ${ZEPHYR_BASE}/subsys/net/ip + ${ZEPHYR_BASE}/subsys/net/l2/ieee802154 ) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/iface/CMakeLists.txt b/tests/net/iface/CMakeLists.txt index f3704d49413..4f802380281 100644 --- a/tests/net/iface/CMakeLists.txt +++ b/tests/net/iface/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(iface) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/ip-addr/CMakeLists.txt b/tests/net/ip-addr/CMakeLists.txt index fadf90b2316..101b3467fca 100644 --- a/tests/net/ip-addr/CMakeLists.txt +++ b/tests/net/ip-addr/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ip-addr) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/ipv6/CMakeLists.txt b/tests/net/ipv6/CMakeLists.txt index 1786b8bb062..e11076b8b6a 100644 --- a/tests/net/ipv6/CMakeLists.txt +++ b/tests/net/ipv6/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ipv6) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/ipv6_fragment/CMakeLists.txt b/tests/net/ipv6_fragment/CMakeLists.txt index 32a4fced8f8..400e5aee039 100644 --- a/tests/net/ipv6_fragment/CMakeLists.txt +++ b/tests/net/ipv6_fragment/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(ipv6_fragment) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/lib/coap/CMakeLists.txt b/tests/net/lib/coap/CMakeLists.txt index 7eff6a9b63b..e3ee74cd44e 100644 --- a/tests/net/lib/coap/CMakeLists.txt +++ b/tests/net/lib/coap/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) diff --git a/tests/net/lib/dns_addremove/CMakeLists.txt b/tests/net/lib/dns_addremove/CMakeLists.txt index bfaa0fa264f..e572f69bee7 100644 --- a/tests/net/lib/dns_addremove/CMakeLists.txt +++ b/tests/net/lib/dns_addremove/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(dns_addremove) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/lib/dns_packet/CMakeLists.txt b/tests/net/lib/dns_packet/CMakeLists.txt index d8b19e9bf7c..8c03a6c2a57 100644 --- a/tests/net/lib/dns_packet/CMakeLists.txt +++ b/tests/net/lib/dns_packet/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(dns_packet) FILE(GLOB app_sources src/*.c) diff --git a/tests/net/lib/dns_resolve/CMakeLists.txt b/tests/net/lib/dns_resolve/CMakeLists.txt index 121d2c41837..ec44c144689 100644 --- a/tests/net/lib/dns_resolve/CMakeLists.txt +++ b/tests/net/lib/dns_resolve/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(dns_resolve) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/lib/http_header_fields/CMakeLists.txt b/tests/net/lib/http_header_fields/CMakeLists.txt index 4a1ae40a1ce..c2117e7467d 100644 --- a/tests/net/lib/http_header_fields/CMakeLists.txt +++ b/tests/net/lib/http_header_fields/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(http_header_fields) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/lib/mqtt_packet/CMakeLists.txt b/tests/net/lib/mqtt_packet/CMakeLists.txt index f3d45ee6ec8..98a2c52d50d 100644 --- a/tests/net/lib/mqtt_packet/CMakeLists.txt +++ b/tests/net/lib/mqtt_packet/CMakeLists.txt @@ -2,12 +2,12 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mqtt_packet) target_include_directories(app PRIVATE - $ENV{ZEPHYR_BASE}/subsys/net/ip - $ENV{ZEPHYR_BASE}/subsys/net/lib/mqtt + ${ZEPHYR_BASE}/subsys/net/ip + ${ZEPHYR_BASE}/subsys/net/lib/mqtt ) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/lib/mqtt_publisher/CMakeLists.txt b/tests/net/lib/mqtt_publisher/CMakeLists.txt index fafc6495185..323f7133447 100644 --- a/tests/net/lib/mqtt_publisher/CMakeLists.txt +++ b/tests/net/lib/mqtt_publisher/CMakeLists.txt @@ -2,11 +2,11 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mqtt_publisher) target_include_directories(app PRIVATE - $ENV{ZEPHYR_BASE}/subsys/net/ip + ${ZEPHYR_BASE}/subsys/net/ip ) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/lib/mqtt_pubsub/CMakeLists.txt b/tests/net/lib/mqtt_pubsub/CMakeLists.txt index afc22ac9d8a..d8bb889faf0 100644 --- a/tests/net/lib/mqtt_pubsub/CMakeLists.txt +++ b/tests/net/lib/mqtt_pubsub/CMakeLists.txt @@ -2,11 +2,11 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mqtt_subscriber) target_include_directories(app PRIVATE - $ENV{ZEPHYR_BASE}/subsys/net/ip + ${ZEPHYR_BASE}/subsys/net/ip ) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/lib/mqtt_subscriber/CMakeLists.txt b/tests/net/lib/mqtt_subscriber/CMakeLists.txt index afc22ac9d8a..d8bb889faf0 100644 --- a/tests/net/lib/mqtt_subscriber/CMakeLists.txt +++ b/tests/net/lib/mqtt_subscriber/CMakeLists.txt @@ -2,11 +2,11 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mqtt_subscriber) target_include_directories(app PRIVATE - $ENV{ZEPHYR_BASE}/subsys/net/ip + ${ZEPHYR_BASE}/subsys/net/ip ) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/lib/tls_credentials/CMakeLists.txt b/tests/net/lib/tls_credentials/CMakeLists.txt index 4e27e39b099..16b58157528 100644 --- a/tests/net/lib/tls_credentials/CMakeLists.txt +++ b/tests/net/lib/tls_credentials/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tls_credentials) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/lib/tls_credentials) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/lib/tls_credentials) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/mgmt/CMakeLists.txt b/tests/net/mgmt/CMakeLists.txt index 6f1dab1e0ad..dcd346efdb2 100644 --- a/tests/net/mgmt/CMakeLists.txt +++ b/tests/net/mgmt/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mgmt) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/mld/CMakeLists.txt b/tests/net/mld/CMakeLists.txt index 0e84b3365fd..ad4b570a76e 100644 --- a/tests/net/mld/CMakeLists.txt +++ b/tests/net/mld/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mld) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/neighbor/CMakeLists.txt b/tests/net/neighbor/CMakeLists.txt index a6c6d25adac..48f3156428c 100644 --- a/tests/net/neighbor/CMakeLists.txt +++ b/tests/net/neighbor/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(neighbor) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/net_pkt/CMakeLists.txt b/tests/net/net_pkt/CMakeLists.txt index 162042cd90c..41c162a994c 100644 --- a/tests/net/net_pkt/CMakeLists.txt +++ b/tests/net/net_pkt/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(net_pkt) FILE(GLOB app_sources src/*.c) diff --git a/tests/net/ppp/driver/CMakeLists.txt b/tests/net/ppp/driver/CMakeLists.txt index f3704d49413..4f802380281 100644 --- a/tests/net/ppp/driver/CMakeLists.txt +++ b/tests/net/ppp/driver/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(iface) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/promiscuous/CMakeLists.txt b/tests/net/promiscuous/CMakeLists.txt index 2daaf87fa79..2479529c350 100644 --- a/tests/net/promiscuous/CMakeLists.txt +++ b/tests/net/promiscuous/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(promiscuous) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/ptp/clock/CMakeLists.txt b/tests/net/ptp/clock/CMakeLists.txt index 05f7711d999..70b04cb4431 100644 --- a/tests/net/ptp/clock/CMakeLists.txt +++ b/tests/net/ptp/clock/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(clock) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/route/CMakeLists.txt b/tests/net/route/CMakeLists.txt index 74b08a177ed..ebd4cb7cb0c 100644 --- a/tests/net/route/CMakeLists.txt +++ b/tests/net/route/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(route) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/shell/CMakeLists.txt b/tests/net/shell/CMakeLists.txt index 9eef1ebe944..b86b163c334 100644 --- a/tests/net/shell/CMakeLists.txt +++ b/tests/net/shell/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(udp) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/socket/af_packet/CMakeLists.txt b/tests/net/socket/af_packet/CMakeLists.txt index 06576e141f3..532700b43db 100644 --- a/tests/net/socket/af_packet/CMakeLists.txt +++ b/tests/net/socket/af_packet/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(socket_udp) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/socket/getaddrinfo/CMakeLists.txt b/tests/net/socket/getaddrinfo/CMakeLists.txt index 9e082c52bf1..d61a8d69034 100644 --- a/tests/net/socket/getaddrinfo/CMakeLists.txt +++ b/tests/net/socket/getaddrinfo/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(getaddrinfo) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/lib/dns) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/lib/dns) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/socket/getnameinfo/CMakeLists.txt b/tests/net/socket/getnameinfo/CMakeLists.txt index 2ca5bce9563..99eb1820dbb 100644 --- a/tests/net/socket/getnameinfo/CMakeLists.txt +++ b/tests/net/socket/getnameinfo/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(getnameinfo) FILE(GLOB app_sources src/*.c) diff --git a/tests/net/socket/misc/CMakeLists.txt b/tests/net/socket/misc/CMakeLists.txt index f51be36ce91..a203bcacb0e 100644 --- a/tests/net/socket/misc/CMakeLists.txt +++ b/tests/net/socket/misc/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(socket-misc) FILE(GLOB app_sources src/*.c) diff --git a/tests/net/socket/net_mgmt/CMakeLists.txt b/tests/net/socket/net_mgmt/CMakeLists.txt index 9e082c52bf1..d61a8d69034 100644 --- a/tests/net/socket/net_mgmt/CMakeLists.txt +++ b/tests/net/socket/net_mgmt/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(getaddrinfo) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/lib/dns) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/lib/dns) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/socket/poll/CMakeLists.txt b/tests/net/socket/poll/CMakeLists.txt index 03f535dfe85..e97951f0882 100644 --- a/tests/net/socket/poll/CMakeLists.txt +++ b/tests/net/socket/poll/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(socket_poll) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/socket/register/CMakeLists.txt b/tests/net/socket/register/CMakeLists.txt index 5b952fe48ee..73b61cd0c0c 100644 --- a/tests/net/socket/register/CMakeLists.txt +++ b/tests/net/socket/register/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(socket_register) FILE(GLOB app_sources src/*.c) diff --git a/tests/net/socket/select/CMakeLists.txt b/tests/net/socket/select/CMakeLists.txt index 9173dc8a657..ab5ede40236 100644 --- a/tests/net/socket/select/CMakeLists.txt +++ b/tests/net/socket/select/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(select) FILE(GLOB app_sources src/*.c) diff --git a/tests/net/socket/tcp/CMakeLists.txt b/tests/net/socket/tcp/CMakeLists.txt index ab7c7a1cab1..86d972ff1ba 100644 --- a/tests/net/socket/tcp/CMakeLists.txt +++ b/tests/net/socket/tcp/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(socket_tcp) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/socket/udp/CMakeLists.txt b/tests/net/socket/udp/CMakeLists.txt index 06576e141f3..532700b43db 100644 --- a/tests/net/socket/udp/CMakeLists.txt +++ b/tests/net/socket/udp/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(socket_udp) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/socket/websocket/CMakeLists.txt b/tests/net/socket/websocket/CMakeLists.txt index 13eaebdebea..7437b413a97 100644 --- a/tests/net/socket/websocket/CMakeLists.txt +++ b/tests/net/socket/websocket/CMakeLists.txt @@ -1,10 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(websocket) target_include_directories(app PRIVATE - $ENV{ZEPHYR_BASE}/subsys/net/lib/websocket) + ${ZEPHYR_BASE}/subsys/net/lib/websocket) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/tcp/CMakeLists.txt b/tests/net/tcp/CMakeLists.txt index 3f16364d50e..2391c4a509c 100644 --- a/tests/net/tcp/CMakeLists.txt +++ b/tests/net/tcp/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tcp) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/traffic_class/CMakeLists.txt b/tests/net/traffic_class/CMakeLists.txt index e9a45b75a00..16eeb577567 100644 --- a/tests/net/traffic_class/CMakeLists.txt +++ b/tests/net/traffic_class/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(traffic_class) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/trickle/CMakeLists.txt b/tests/net/trickle/CMakeLists.txt index f296e4566d5..d389943225d 100644 --- a/tests/net/trickle/CMakeLists.txt +++ b/tests/net/trickle/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(trickle) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/tx_timestamp/CMakeLists.txt b/tests/net/tx_timestamp/CMakeLists.txt index 3a00038e1af..33c08896136 100644 --- a/tests/net/tx_timestamp/CMakeLists.txt +++ b/tests/net/tx_timestamp/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tx_timestamp) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/udp/CMakeLists.txt b/tests/net/udp/CMakeLists.txt index 9eef1ebe944..b86b163c334 100644 --- a/tests/net/udp/CMakeLists.txt +++ b/tests/net/udp/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(udp) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/utils/CMakeLists.txt b/tests/net/utils/CMakeLists.txt index b649bf384aa..0d981c0f5f1 100644 --- a/tests/net/utils/CMakeLists.txt +++ b/tests/net/utils/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(utils) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/net/vlan/CMakeLists.txt b/tests/net/vlan/CMakeLists.txt index 56963a2dfe4..919f400ffcc 100644 --- a/tests/net/vlan/CMakeLists.txt +++ b/tests/net/vlan/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(vlan) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/net/ip) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/portability/cmsis_rtos_v1/CMakeLists.txt b/tests/portability/cmsis_rtos_v1/CMakeLists.txt index 99386035c0a..12be96be336 100644 --- a/tests/portability/cmsis_rtos_v1/CMakeLists.txt +++ b/tests/portability/cmsis_rtos_v1/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(cmsis_rtos_v1) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/include/cmsis_rtos_v1) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/cmsis_rtos_v1) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/portability/cmsis_rtos_v2/CMakeLists.txt b/tests/portability/cmsis_rtos_v2/CMakeLists.txt index f5dd3fb3687..2e7725f0e60 100644 --- a/tests/portability/cmsis_rtos_v2/CMakeLists.txt +++ b/tests/portability/cmsis_rtos_v2/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/include/cmsis_rtos_v2) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/cmsis_rtos_v2) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/tests/posix/common/CMakeLists.txt b/tests/posix/common/CMakeLists.txt index 8ad20ac3515..945ae222c70 100644 --- a/tests/posix/common/CMakeLists.txt +++ b/tests/posix/common/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(posix_common) FILE(GLOB app_sources src/*.c) diff --git a/tests/posix/fs/CMakeLists.txt b/tests/posix/fs/CMakeLists.txt index 863e2231b47..96a552cfbfe 100644 --- a/tests/posix/fs/CMakeLists.txt +++ b/tests/posix/fs/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fs) FILE(GLOB app_sources src/*.c) diff --git a/tests/shell/CMakeLists.txt b/tests/shell/CMakeLists.txt index a9863083453..25291ebc49e 100644 --- a/tests/shell/CMakeLists.txt +++ b/tests/shell/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(shell) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/canbus/frame/CMakeLists.txt b/tests/subsys/canbus/frame/CMakeLists.txt index 150fb359f6c..5755816d146 100644 --- a/tests/subsys/canbus/frame/CMakeLists.txt +++ b/tests/subsys/canbus/frame/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(can_frame) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/canbus/isotp/conformance/CMakeLists.txt b/tests/subsys/canbus/isotp/conformance/CMakeLists.txt index 445aaf12964..60e3e15be65 100644 --- a/tests/subsys/canbus/isotp/conformance/CMakeLists.txt +++ b/tests/subsys/canbus/isotp/conformance/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(integration) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/canbus/isotp/implementation/CMakeLists.txt b/tests/subsys/canbus/isotp/implementation/CMakeLists.txt index 445aaf12964..60e3e15be65 100644 --- a/tests/subsys/canbus/isotp/implementation/CMakeLists.txt +++ b/tests/subsys/canbus/isotp/implementation/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(integration) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/dfu/img_util/CMakeLists.txt b/tests/subsys/dfu/img_util/CMakeLists.txt index 9367a38bda3..e74e9a82d2c 100644 --- a/tests/subsys/dfu/img_util/CMakeLists.txt +++ b/tests/subsys/dfu/img_util/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(img_util) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/dfu/mcuboot/CMakeLists.txt b/tests/subsys/dfu/mcuboot/CMakeLists.txt index 0e81097c7aa..2706b6198db 100644 --- a/tests/subsys/dfu/mcuboot/CMakeLists.txt +++ b/tests/subsys/dfu/mcuboot/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mcuboot) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/fs/fat_fs_api/CMakeLists.txt b/tests/subsys/fs/fat_fs_api/CMakeLists.txt index c4c4b74b0aa..d2b2d5d62ed 100644 --- a/tests/subsys/fs/fat_fs_api/CMakeLists.txt +++ b/tests/subsys/fs/fat_fs_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fat_fs_api) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/fs/fat_fs_dual_drive/CMakeLists.txt b/tests/subsys/fs/fat_fs_dual_drive/CMakeLists.txt index e977baf6dbe..79ef0302081 100644 --- a/tests/subsys/fs/fat_fs_dual_drive/CMakeLists.txt +++ b/tests/subsys/fs/fat_fs_dual_drive/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fat_fs_dual_drive) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/fs/fcb/CMakeLists.txt b/tests/subsys/fs/fcb/CMakeLists.txt index f96cd15a7a4..e2b4eb33c41 100644 --- a/tests/subsys/fs/fcb/CMakeLists.txt +++ b/tests/subsys/fs/fcb/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fs_fcb) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/fs/fcb) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/fs/fcb) diff --git a/tests/subsys/fs/littlefs/CMakeLists.txt b/tests/subsys/fs/littlefs/CMakeLists.txt index 66c9b679af3..140ba49fe47 100644 --- a/tests/subsys/fs/littlefs/CMakeLists.txt +++ b/tests/subsys/fs/littlefs/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(littlefs) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/fs/multi-fs/CMakeLists.txt b/tests/subsys/fs/multi-fs/CMakeLists.txt index f3fede3546d..6caa2a876e9 100644 --- a/tests/subsys/fs/multi-fs/CMakeLists.txt +++ b/tests/subsys/fs/multi-fs/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(multi-fs) zephyr_compile_definitions( diff --git a/tests/subsys/fs/nvs/CMakeLists.txt b/tests/subsys/fs/nvs/CMakeLists.txt index 2e3c868acfa..b6bcb05441d 100644 --- a/tests/subsys/fs/nvs/CMakeLists.txt +++ b/tests/subsys/fs/nvs/CMakeLists.txt @@ -1,9 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fs_nvs) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/fs/nvs) +target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/fs/nvs) diff --git a/tests/subsys/jwt/CMakeLists.txt b/tests/subsys/jwt/CMakeLists.txt index 1d6da700097..1cadb7df3c0 100644 --- a/tests/subsys/jwt/CMakeLists.txt +++ b/tests/subsys/jwt/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/logging/log_core/CMakeLists.txt b/tests/subsys/logging/log_core/CMakeLists.txt index 00e831d5e5f..124bb83229e 100644 --- a/tests/subsys/logging/log_core/CMakeLists.txt +++ b/tests/subsys/logging/log_core/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(log_core) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/logging/log_immediate/CMakeLists.txt b/tests/subsys/logging/log_immediate/CMakeLists.txt index 3a492e7af2b..710049066d0 100644 --- a/tests/subsys/logging/log_immediate/CMakeLists.txt +++ b/tests/subsys/logging/log_immediate/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(log_immediate_test) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/logging/log_list/CMakeLists.txt b/tests/subsys/logging/log_list/CMakeLists.txt index 324967a3d2a..6ad4bfc4e93 100644 --- a/tests/subsys/logging/log_list/CMakeLists.txt +++ b/tests/subsys/logging/log_list/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(log_list) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/logging/log_msg/CMakeLists.txt b/tests/subsys/logging/log_msg/CMakeLists.txt index f3cc43f2705..0b3fb789f4d 100644 --- a/tests/subsys/logging/log_msg/CMakeLists.txt +++ b/tests/subsys/logging/log_msg/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(log_msg) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/logging/log_output/CMakeLists.txt b/tests/subsys/logging/log_output/CMakeLists.txt index 405f44adc44..4b0b0241721 100644 --- a/tests/subsys/logging/log_output/CMakeLists.txt +++ b/tests/subsys/logging/log_output/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(log_output) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/settings/fcb/base64/CMakeLists.txt b/tests/subsys/settings/fcb/base64/CMakeLists.txt index cf133a4d106..0bccdf285ca 100644 --- a/tests/subsys/settings/fcb/base64/CMakeLists.txt +++ b/tests/subsys/settings/fcb/base64/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(settings_fcb) add_subdirectory(../src fcb_test_bindir) diff --git a/tests/subsys/settings/fcb/raw/CMakeLists.txt b/tests/subsys/settings/fcb/raw/CMakeLists.txt index 1081ff997fe..278c3bcad91 100644 --- a/tests/subsys/settings/fcb/raw/CMakeLists.txt +++ b/tests/subsys/settings/fcb/raw/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) add_subdirectory(../src fcb_test_bindir) diff --git a/tests/subsys/settings/fcb/src/CMakeLists.txt b/tests/subsys/settings/fcb/src/CMakeLists.txt index b7ae71f1ea4..07eb1ab56be 100644 --- a/tests/subsys/settings/fcb/src/CMakeLists.txt +++ b/tests/subsys/settings/fcb/src/CMakeLists.txt @@ -7,9 +7,9 @@ add_subdirectory(../../src settings_test_bindir) target_link_libraries(settings_fcb_test PRIVATE settings_test) zephyr_include_directories( - $ENV{ZEPHYR_BASE}/subsys/settings/include - $ENV{ZEPHYR_BASE}/subsys/settings/src - $ENV{ZEPHYR_BASE}/tests/subsys/settings/fcb/src + ${ZEPHYR_BASE}/subsys/settings/include + ${ZEPHYR_BASE}/subsys/settings/src + ${ZEPHYR_BASE}/tests/subsys/settings/fcb/src ) FILE(GLOB mysources *.c) diff --git a/tests/subsys/settings/fcb_init/CMakeLists.txt b/tests/subsys/settings/fcb_init/CMakeLists.txt index e7fea73f3de..8dd1ca21d8c 100644 --- a/tests/subsys/settings/fcb_init/CMakeLists.txt +++ b/tests/subsys/settings/fcb_init/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(fcb_init) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/settings/functional/fcb/CMakeLists.txt b/tests/subsys/settings/functional/fcb/CMakeLists.txt index f8b49ba54cb..702b5a98c9e 100644 --- a/tests/subsys/settings/functional/fcb/CMakeLists.txt +++ b/tests/subsys/settings/functional/fcb/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) # The code is in the library common to several tests. diff --git a/tests/subsys/settings/functional/file/CMakeLists.txt b/tests/subsys/settings/functional/file/CMakeLists.txt index a9f7b959d23..4edc96f756e 100644 --- a/tests/subsys/settings/functional/file/CMakeLists.txt +++ b/tests/subsys/settings/functional/file/CMakeLists.txt @@ -1,14 +1,14 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) FILE(GLOB app_sources ../src/*.c) target_sources(app PRIVATE ${app_sources}) zephyr_include_directories( - $ENV{ZEPHYR_BASE}/subsys/settings/include - $ENV{ZEPHYR_BASE}/subsys/settings/src + ${ZEPHYR_BASE}/subsys/settings/include + ${ZEPHYR_BASE}/subsys/settings/src ) if(TEST) diff --git a/tests/subsys/settings/functional/nvs/CMakeLists.txt b/tests/subsys/settings/functional/nvs/CMakeLists.txt index f8b49ba54cb..702b5a98c9e 100644 --- a/tests/subsys/settings/functional/nvs/CMakeLists.txt +++ b/tests/subsys/settings/functional/nvs/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) # The code is in the library common to several tests. diff --git a/tests/subsys/settings/functional/src/CMakeLists.txt b/tests/subsys/settings/functional/src/CMakeLists.txt index 64a33c02c0d..ebf97663f2a 100644 --- a/tests/subsys/settings/functional/src/CMakeLists.txt +++ b/tests/subsys/settings/functional/src/CMakeLists.txt @@ -3,8 +3,8 @@ zephyr_library_named( settings_func_test) zephyr_include_directories( - $ENV{ZEPHYR_BASE}/subsys/settings/include - $ENV{ZEPHYR_BASE}/subsys/settings/src + ${ZEPHYR_BASE}/subsys/settings/include + ${ZEPHYR_BASE}/subsys/settings/src ) zephyr_library_sources(settings_basic_test.c) diff --git a/tests/subsys/settings/littlefs/base64/CMakeLists.txt b/tests/subsys/settings/littlefs/base64/CMakeLists.txt index 392459c3273..5784341fc1b 100644 --- a/tests/subsys/settings/littlefs/base64/CMakeLists.txt +++ b/tests/subsys/settings/littlefs/base64/CMakeLists.txt @@ -2,7 +2,7 @@ # Copyright (c) 2019 Nordic Semiconductor ASA cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(littlefs) add_subdirectory(../src littlefs_test_bindir) diff --git a/tests/subsys/settings/littlefs/raw/CMakeLists.txt b/tests/subsys/settings/littlefs/raw/CMakeLists.txt index 4b45a371fb1..120117ef218 100644 --- a/tests/subsys/settings/littlefs/raw/CMakeLists.txt +++ b/tests/subsys/settings/littlefs/raw/CMakeLists.txt @@ -2,7 +2,7 @@ # Copyright (c) 2019 Nordic Semiconductor ASA cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(NONE) add_subdirectory(../src littlefs_test_bindir) diff --git a/tests/subsys/settings/littlefs/src/CMakeLists.txt b/tests/subsys/settings/littlefs/src/CMakeLists.txt index 8965466fa73..b4d819f4330 100644 --- a/tests/subsys/settings/littlefs/src/CMakeLists.txt +++ b/tests/subsys/settings/littlefs/src/CMakeLists.txt @@ -11,10 +11,10 @@ target_link_libraries(settings_littlefs_test PRIVATE settings_test) target_link_libraries(settings_littlefs_test PRIVATE settings_test_fs) zephyr_include_directories( - $ENV{ZEPHYR_BASE}/subsys/settings/include - $ENV{ZEPHYR_BASE}/subsys/settings/src - $ENV{ZEPHYR_BASE}/tests/subsys/settings/fs/include - $ENV{ZEPHYR_BASE}/tests/subsys/settings/littlefs/src + ${ZEPHYR_BASE}/subsys/settings/include + ${ZEPHYR_BASE}/subsys/settings/src + ${ZEPHYR_BASE}/tests/subsys/settings/fs/include + ${ZEPHYR_BASE}/tests/subsys/settings/littlefs/src ) diff --git a/tests/subsys/settings/nvs/raw/CMakeLists.txt b/tests/subsys/settings/nvs/raw/CMakeLists.txt index ab891dc7206..b738b99c97c 100644 --- a/tests/subsys/settings/nvs/raw/CMakeLists.txt +++ b/tests/subsys/settings/nvs/raw/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(test_settings_nvs_raw) add_subdirectory(../src nvs_test_bindir) diff --git a/tests/subsys/settings/nvs/src/CMakeLists.txt b/tests/subsys/settings/nvs/src/CMakeLists.txt index b1fe6bc9239..1fefb95d15d 100644 --- a/tests/subsys/settings/nvs/src/CMakeLists.txt +++ b/tests/subsys/settings/nvs/src/CMakeLists.txt @@ -4,9 +4,9 @@ zephyr_library_named(settings_nvs_test) zephyr_include_directories( - $ENV{ZEPHYR_BASE}/subsys/settings/include - $ENV{ZEPHYR_BASE}/subsys/settings/src - $ENV{ZEPHYR_BASE}/tests/subsys/settings/nvs/src + ${ZEPHYR_BASE}/subsys/settings/include + ${ZEPHYR_BASE}/subsys/settings/src + ${ZEPHYR_BASE}/tests/subsys/settings/nvs/src ) zephyr_library_sources(settings_test_nvs.c) diff --git a/tests/subsys/shell/shell_history/CMakeLists.txt b/tests/subsys/shell/shell_history/CMakeLists.txt index a9863083453..25291ebc49e 100644 --- a/tests/subsys/shell/shell_history/CMakeLists.txt +++ b/tests/subsys/shell/shell_history/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(shell) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/storage/flash_map/CMakeLists.txt b/tests/subsys/storage/flash_map/CMakeLists.txt index f91381035af..aca46d865f1 100644 --- a/tests/subsys/storage/flash_map/CMakeLists.txt +++ b/tests/subsys/storage/flash_map/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(flash_map) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/tracing/CMakeLists.txt b/tests/subsys/tracing/CMakeLists.txt index 9d7ae0d4599..8bd837cf976 100644 --- a/tests/subsys/tracing/CMakeLists.txt +++ b/tests/subsys/tracing/CMakeLists.txt @@ -6,7 +6,7 @@ if(BOARD MATCHES "qemu_.*") list(APPEND QEMU_EXTRA_FLAGS -serial file:channel0_0) endif() -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(tracing_tests) target_sources(app PRIVATE src/main.c) diff --git a/tests/subsys/usb/bos/CMakeLists.txt b/tests/subsys/usb/bos/CMakeLists.txt index edb6c6898e4..1fd80266f08 100644 --- a/tests/subsys/usb/bos/CMakeLists.txt +++ b/tests/subsys/usb/bos/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(bos) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/usb/desc_sections/CMakeLists.txt b/tests/subsys/usb/desc_sections/CMakeLists.txt index 1ef0862a536..44dbf44e531 100644 --- a/tests/subsys/usb/desc_sections/CMakeLists.txt +++ b/tests/subsys/usb/desc_sections/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(os_desc) zephyr_library_include_directories( diff --git a/tests/subsys/usb/device/CMakeLists.txt b/tests/subsys/usb/device/CMakeLists.txt index a69ce66e570..651d6ed2a5d 100644 --- a/tests/subsys/usb/device/CMakeLists.txt +++ b/tests/subsys/usb/device/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(usb_device_test) FILE(GLOB app_sources src/*.c) diff --git a/tests/subsys/usb/os_desc/CMakeLists.txt b/tests/subsys/usb/os_desc/CMakeLists.txt index 1ef0862a536..44dbf44e531 100644 --- a/tests/subsys/usb/os_desc/CMakeLists.txt +++ b/tests/subsys/usb/os_desc/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(os_desc) zephyr_library_include_directories( diff --git a/tests/unit/base64/CMakeLists.txt b/tests/unit/base64/CMakeLists.txt index 9ae79204ee7..f13c212d3fc 100644 --- a/tests/unit/base64/CMakeLists.txt +++ b/tests/unit/base64/CMakeLists.txt @@ -2,4 +2,4 @@ project(base64) set(SOURCES main.c) -include($ENV{ZEPHYR_BASE}/subsys/testsuite/unittest.cmake) +find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/crc/CMakeLists.txt b/tests/unit/crc/CMakeLists.txt index 1861e04ff63..70babfa9657 100644 --- a/tests/unit/crc/CMakeLists.txt +++ b/tests/unit/crc/CMakeLists.txt @@ -2,4 +2,4 @@ project(crc) set(SOURCES main.c) -include($ENV{ZEPHYR_BASE}/subsys/testsuite/unittest.cmake) +find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/intmath/CMakeLists.txt b/tests/unit/intmath/CMakeLists.txt index 0a6c9fc90c1..88118230c13 100644 --- a/tests/unit/intmath/CMakeLists.txt +++ b/tests/unit/intmath/CMakeLists.txt @@ -4,4 +4,4 @@ project(base64) set(SOURCES main.c ) -include($ENV{ZEPHYR_BASE}/subsys/testsuite/unittest.cmake) +find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/list/CMakeLists.txt b/tests/unit/list/CMakeLists.txt index 902723352c1..11246ff7201 100644 --- a/tests/unit/list/CMakeLists.txt +++ b/tests/unit/list/CMakeLists.txt @@ -7,4 +7,4 @@ set(SOURCES dlist.c sflist.c ) -include($ENV{ZEPHYR_BASE}/subsys/testsuite/unittest.cmake) +find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/math_extras/CMakeLists.txt b/tests/unit/math_extras/CMakeLists.txt index 50c03484622..265e822a9a3 100644 --- a/tests/unit/math_extras/CMakeLists.txt +++ b/tests/unit/math_extras/CMakeLists.txt @@ -2,4 +2,4 @@ project(math_extras) set(SOURCES main.c portable.c) -include($ENV{ZEPHYR_BASE}/subsys/testsuite/unittest.cmake) +find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/rbtree/CMakeLists.txt b/tests/unit/rbtree/CMakeLists.txt index c9ae2f24874..13ff70f7fe5 100644 --- a/tests/unit/rbtree/CMakeLists.txt +++ b/tests/unit/rbtree/CMakeLists.txt @@ -2,4 +2,4 @@ project(rbtree) set(SOURCES main.c) -include($ENV{ZEPHYR_BASE}/subsys/testsuite/unittest.cmake) +find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/timeutil/CMakeLists.txt b/tests/unit/timeutil/CMakeLists.txt index abfe242b30e..d4478116413 100644 --- a/tests/unit/timeutil/CMakeLists.txt +++ b/tests/unit/timeutil/CMakeLists.txt @@ -2,4 +2,4 @@ project(timeutil) set(SOURCES main.c test_gmtime.c test_s32.c test_s64.c) -include($ENV{ZEPHYR_BASE}/subsys/testsuite/unittest.cmake) +find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/util/CMakeLists.txt b/tests/unit/util/CMakeLists.txt index 213c8c39cec..03f4dad0cfb 100644 --- a/tests/unit/util/CMakeLists.txt +++ b/tests/unit/util/CMakeLists.txt @@ -2,4 +2,4 @@ project(util) set(SOURCES main.c ../../../lib/os/dec.c) -include($ENV{ZEPHYR_BASE}/subsys/testsuite/unittest.cmake) +find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/ztest/base/CMakeLists.txt b/tests/ztest/base/CMakeLists.txt index 8ef9a91c3ae..5ab8318da66 100644 --- a/tests/ztest/base/CMakeLists.txt +++ b/tests/ztest/base/CMakeLists.txt @@ -4,10 +4,10 @@ cmake_minimum_required(VERSION 3.13.1) if(BOARD STREQUAL unit_testing) list(APPEND SOURCES src/main.c) - include($ENV{ZEPHYR_BASE}/subsys/testsuite/unittest.cmake) + find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) project(base) else() - include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) + find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(base) FILE(GLOB app_sources src/*.c) diff --git a/tests/ztest/custom_output/CMakeLists.txt b/tests/ztest/custom_output/CMakeLists.txt index de93007af8e..0260922db59 100644 --- a/tests/ztest/custom_output/CMakeLists.txt +++ b/tests/ztest/custom_output/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(integration) FILE(GLOB app_sources src/*.c) diff --git a/tests/ztest/mock/CMakeLists.txt b/tests/ztest/mock/CMakeLists.txt index 46bd8dd8ad3..0a61863e0d0 100644 --- a/tests/ztest/mock/CMakeLists.txt +++ b/tests/ztest/mock/CMakeLists.txt @@ -4,10 +4,10 @@ cmake_minimum_required(VERSION 3.13.1) if(BOARD STREQUAL unit_testing) list(APPEND SOURCES src/main.c) - include($ENV{ZEPHYR_BASE}/subsys/testsuite/unittest.cmake) + find_package(ZephyrUnittest HINTS $ENV{ZEPHYR_BASE}) project(mock) else() - include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) + find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(mock) FILE(GLOB app_sources src/*.c)