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 <lars-ove.karlsson@iar.com>
This commit is contained in:
Lars-Ove Karlsson 2025-02-26 14:35:36 +01:00 committed by Benjamin Cabé
commit aad6b6c33e
2 changed files with 2 additions and 2 deletions

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)
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}) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(pipe) project(pipe)

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)
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}) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(pipe_api) project(pipe_api)