cmake: use find_package() instead of literal include in tests and samples

Convert remaining tests and samples to using find_package() instead of
literally including the CMake boilerplate code.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit is contained in:
Henrik Brix Andersen 2021-10-28 20:46:08 +02:00 committed by Anas Nashif
commit 265cdf8dc6
21 changed files with 21 additions and 21 deletions

View file

@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(smp_pktqueue) project(smp_pktqueue)
FILE(GLOB pktqueue_sources src/*.c) FILE(GLOB pktqueue_sources src/*.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(central_ht) project(central_ht)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(hci_usb_h4) project(hci_usb_h4)
target_sources(app PRIVATE src/main.c) target_sources(app PRIVATE src/main.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(ti_cc13x2_cc26x2_system_off) project(ti_cc13x2_cc26x2_system_off)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(clock_control_litex) project(clock_control_litex)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(i2s_litex) project(i2s_litex)
target_sources(app PRIVATE src/main.c) target_sources(app PRIVATE src/main.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(kscan) project(kscan)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(spi_flash_at45) project(spi_flash_at45)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(mpr) project(mpr)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.20.0)
# This application has its own Kconfig options. # This application has its own Kconfig options.
set(KCONFIG_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/Kconfig) set(KCONFIG_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/Kconfig)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(hawkbit) project(hawkbit)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(audio) project(audio)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(audio) project(audio)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(hello_world_user) project(hello_world_user)
target_sources(app PRIVATE src/main.c) target_sources(app PRIVATE src/main.c)

View file

@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(syscall_perf) project(syscall_perf)
set_property( set_property(

View file

@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(NONE) project(NONE)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(eventfd) project(eventfd)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(eventfd_basic) project(eventfd_basic)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(fs_api) project(fs_api)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(log_core_additional) project(log_core_additional)
if(${USERSPACE_TEST}) if(${USERSPACE_TEST})

View file

@ -1,6 +1,6 @@
# Boilerplate code, which pulls in the Zephyr build system. # Boilerplate code, which pulls in the Zephyr build system.
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(openthread_tests) project(openthread_tests)

View file

@ -5,7 +5,7 @@
# #
cmake_minimum_required(VERSION 3.20.0) cmake_minimum_required(VERSION 3.20.0)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(stream_flash) project(stream_flash)
FILE(GLOB app_sources src/*.c) FILE(GLOB app_sources src/*.c)