Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: add toolchain_ld_<name> macros to FindDeprecated #78335

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions cmake/modules/FindDeprecated.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,54 @@ if("PYTHON_PREFER" IN_LIST Deprecated_FIND_COMPONENTS)
endif()
endif()

if("toolchain_ld_base" IN_LIST Deprecated_FIND_COMPONENTS)
# This code was deprecated after Zephyr v4.0.0
list(REMOVE_ITEM Deprecated_FIND_COMPONENTS toolchain_ld_base)

if(COMMAND toolchain_ld_base)
message(DEPRECATION
"The macro/function 'toolchain_ld_base' is deprecated. "
"Please use '${LINKER}/linker_flags.cmake' and define the appropriate "
"linker flags as properties instead. "
"See '${ZEPHYR_BASE}/cmake/linker/linker_flags_template.cmake' for "
"known linker properties."
)
toolchain_ld_base()
endif()
endif()

if("toolchain_ld_baremetal" IN_LIST Deprecated_FIND_COMPONENTS)
# This code was deprecated after Zephyr v4.0.0
list(REMOVE_ITEM Deprecated_FIND_COMPONENTS toolchain_ld_baremetal)

if(COMMAND toolchain_ld_baremetal)
message(DEPRECATION
"The macro/function 'toolchain_ld_baremetal' is deprecated. "
"Please use '${LINKER}/linker_flags.cmake' and define the appropriate "
"linker flags as properties instead. "
"See '${ZEPHYR_BASE}/cmake/linker/linker_flags_template.cmake' for "
"known linker properties."
)
toolchain_ld_baremetal()
endif()
endif()

if("toolchain_ld_cpp" IN_LIST Deprecated_FIND_COMPONENTS)
# This code was deprecated after Zephyr v4.0.0
list(REMOVE_ITEM Deprecated_FIND_COMPONENTS toolchain_ld_cpp)

if(COMMAND toolchain_ld_cpp)
message(DEPRECATION
"The macro/function 'toolchain_ld_cpp' is deprecated. "
"Please use '${LINKER}/linker_flags.cmake' and define the appropriate "
"linker flags as properties instead. "
"See '${ZEPHYR_BASE}/cmake/linker/linker_flags_template.cmake' for "
"known linker properties."
)
toolchain_ld_cpp()
endif()
endif()

if(NOT "${Deprecated_FIND_COMPONENTS}" STREQUAL "")
message(STATUS "The following deprecated component(s) could not be found: "
"${Deprecated_FIND_COMPONENTS}")
Expand Down
Loading