From 52ff0cf208d3a8c77f024b97f885dbf61e90aa73 Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Sat, 18 Dec 2021 00:21:13 +0100 Subject: [PATCH] cmake: tests: add cmake_minimum_required() to tests Adding cmake_minimum_required() as this is required by CMake. CMP0000 is a deprecated policy which allows to omit this function call, however doing so will result in CMake printing a warning. Adding cmake_minimum_required() to tests missing this call will remove the warning and also allow us to remove the policy setting. Signed-off-by: Torsten Rasmussen --- tests/unit/base64/CMakeLists.txt | 2 ++ tests/unit/cbprintf/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/net_timeout/CMakeLists.txt | 2 ++ tests/unit/rbtree/CMakeLists.txt | 2 ++ tests/unit/timeutil/CMakeLists.txt | 2 ++ tests/unit/util/CMakeLists.txt | 2 ++ 10 files changed, 20 insertions(+) diff --git a/tests/unit/base64/CMakeLists.txt b/tests/unit/base64/CMakeLists.txt index 36919da9f15..e1e9d434e90 100644 --- a/tests/unit/base64/CMakeLists.txt +++ b/tests/unit/base64/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +cmake_minimum_required(VERSION 3.20.0) + project(base64) set(SOURCES main.c) find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/cbprintf/CMakeLists.txt b/tests/unit/cbprintf/CMakeLists.txt index b5f4ed09100..da17fc20ead 100644 --- a/tests/unit/cbprintf/CMakeLists.txt +++ b/tests/unit/cbprintf/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +cmake_minimum_required(VERSION 3.20.0) + project(lib_os_cbprintf) set(SOURCES main.c) find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/crc/CMakeLists.txt b/tests/unit/crc/CMakeLists.txt index 323a57d8ce5..a064ad29223 100644 --- a/tests/unit/crc/CMakeLists.txt +++ b/tests/unit/crc/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +cmake_minimum_required(VERSION 3.20.0) + project(crc) set(SOURCES main.c) find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/intmath/CMakeLists.txt b/tests/unit/intmath/CMakeLists.txt index a8d4621b262..4a0b5e2eb6e 100644 --- a/tests/unit/intmath/CMakeLists.txt +++ b/tests/unit/intmath/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +cmake_minimum_required(VERSION 3.20.0) + project(base64) set(SOURCES main.c diff --git a/tests/unit/list/CMakeLists.txt b/tests/unit/list/CMakeLists.txt index 61a1357803a..3495f67415e 100644 --- a/tests/unit/list/CMakeLists.txt +++ b/tests/unit/list/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +cmake_minimum_required(VERSION 3.20.0) + project(list) set(SOURCES main.c diff --git a/tests/unit/math_extras/CMakeLists.txt b/tests/unit/math_extras/CMakeLists.txt index 5c2fec54398..1cbbc11c7cb 100644 --- a/tests/unit/math_extras/CMakeLists.txt +++ b/tests/unit/math_extras/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +cmake_minimum_required(VERSION 3.20.0) + project(math_extras) set(SOURCES main.c portable.c) find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/net_timeout/CMakeLists.txt b/tests/unit/net_timeout/CMakeLists.txt index 4edcb61e5f9..2c497986579 100644 --- a/tests/unit/net_timeout/CMakeLists.txt +++ b/tests/unit/net_timeout/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +cmake_minimum_required(VERSION 3.20.0) + project(lib_net_timeout) set(SOURCES main.c) find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/rbtree/CMakeLists.txt b/tests/unit/rbtree/CMakeLists.txt index daeafb18be1..55dad5ba00e 100644 --- a/tests/unit/rbtree/CMakeLists.txt +++ b/tests/unit/rbtree/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +cmake_minimum_required(VERSION 3.20.0) + project(rbtree) set(SOURCES main.c) find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/timeutil/CMakeLists.txt b/tests/unit/timeutil/CMakeLists.txt index 5a60184a0c3..b01305bd586 100644 --- a/tests/unit/timeutil/CMakeLists.txt +++ b/tests/unit/timeutil/CMakeLists.txt @@ -1,6 +1,8 @@ # Copyright 2019-2020 Peter Bigot Consulting # SPDX-License-Identifier: Apache-2.0 +cmake_minimum_required(VERSION 3.20.0) + project(timeutil) set(SOURCES main.c test_gmtime.c test_s32.c test_s64.c test_sync.c) find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/tests/unit/util/CMakeLists.txt b/tests/unit/util/CMakeLists.txt index debb233a819..3b5099a37f7 100644 --- a/tests/unit/util/CMakeLists.txt +++ b/tests/unit/util/CMakeLists.txt @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +cmake_minimum_required(VERSION 3.20.0) + project(util) set(SOURCES main.c maincxx.cxx ../../../lib/os/dec.c) find_package(ZephyrUnittest REQUIRED HINTS $ENV{ZEPHYR_BASE})