SWDEV-366831 - Compile time flag to switch between #warning and #error message

Using backward compatibility paths will provide an #error message. Compile time option added to enable/disable the #error message.
Disabling the same will provide a #warning message

Change-Id: I6abc236e810ccc38d3636074e0e8f5a9657c2e9a
This commit is contained in:
Ranjith Ramakrishnan committed 2023-03-10 09:12:20 -08:00
1 parent 4edc9727bd
commit ea061be2d1
2 files changed
+22 -1

No files matched your search

+14
Vedi File
@@ -247,5 +247,19 @@ if(NOT ENABLE_ASAN_PACKAGING)
endif()
if(FILE_REORG_BACKWARD_COMPATIBILITY)
## To enable/disable #error in wrapper header files
if(NOT DEFINED ROCM_HEADER_WRAPPER_WERROR)
if(DEFINED ENV{ROCM_HEADER_WRAPPER_WERROR})
set(ROCM_HEADER_WRAPPER_WERROR "$ENV{ROCM_HEADER_WRAPPER_WERROR}"
CACHE STRING "Header wrapper warnings as errors.")
else()
set(ROCM_HEADER_WRAPPER_WERROR "ON" CACHE STRING "Header wrapper warnings as errors.")
endif()
endif()
if(ROCM_HEADER_WRAPPER_WERROR)
set(deprecated_error 1)
else()
set(deprecated_error 0)
endif()
include(${PROJECT_SOURCE_DIR}/roctracer-backward-compat.cmake)
endif()