From aad6b6c33ee64cbde409618a67d18e8d0315d705 Mon Sep 17 00:00:00 2001 From: Lars-Ove Karlsson Date: Wed, 26 Feb 2025 14:35:36 +0100 Subject: [PATCH] tests: kernel: Fixed disabling of __deprecated macros When disabling the __deprecated macros in tests/kernel/pipe/deprecated, the macros was set to ''. For IAR tools this was expanded to '' which caused a compilation error. I have replaced them with /* deprecated */ which should work for all toolchains. Signed-off-by: Lars-Ove Karlsson --- tests/kernel/pipe/deprecated/pipe/CMakeLists.txt | 2 +- tests/kernel/pipe/deprecated/pipe_api/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/kernel/pipe/deprecated/pipe/CMakeLists.txt b/tests/kernel/pipe/deprecated/pipe/CMakeLists.txt index 6fc89d2497a..2624f4be400 100644 --- a/tests/kernel/pipe/deprecated/pipe/CMakeLists.txt +++ b/tests/kernel/pipe/deprecated/pipe/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.20.0) -set(CMAKE_C_FLAGS "-D__deprecated='' -D__DEPRECATED_MACRO=''") +set(CMAKE_C_FLAGS "-D__deprecated=\"/* deprecated */\" -D__DEPRECATED_MACRO=\"/* deprecated_macro*/\"") find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(pipe) diff --git a/tests/kernel/pipe/deprecated/pipe_api/CMakeLists.txt b/tests/kernel/pipe/deprecated/pipe_api/CMakeLists.txt index b132b179c9c..44f65534e3f 100644 --- a/tests/kernel/pipe/deprecated/pipe_api/CMakeLists.txt +++ b/tests/kernel/pipe/deprecated/pipe_api/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.20.0) -set(CMAKE_C_FLAGS "-D__deprecated='' -D__DEPRECATED_MACRO=''") +set(CMAKE_C_FLAGS "-D__deprecated=\"/* deprecated */\" -D__DEPRECATED_MACRO=\"/* deprecated_macro*/\"") find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(pipe_api)