From e6f3945503b09ec86fc508e133bc496a89f85d64 Mon Sep 17 00:00:00 2001 From: Ranjith Ramakrishnan Date: Thu, 17 Nov 2022 09:29:18 -0800 Subject: [PATCH] SWDEV-366823 - Change pragma message to warning File reorganization feature was implemented with backward compatibility The backward compatibility support will be deprecated in future release. Changed the #pragma message to #warning for a smooth transition Change-Id: I281ad17949435fee4b508a2a7e112b6fa3365838 [ROCm/rocm_smi_lib commit: e7ed902fd68085ecd20b0fa5e00011e53273856f] --- .../rocm-smi-lib/rocm_smi-backward-compat.cmake | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/projects/rocm-smi-lib/rocm_smi-backward-compat.cmake b/projects/rocm-smi-lib/rocm_smi-backward-compat.cmake index aa8fd9c49e..c5c40da29c 100644 --- a/projects/rocm-smi-lib/rocm_smi-backward-compat.cmake +++ b/projects/rocm-smi-lib/rocm_smi-backward-compat.cmake @@ -57,7 +57,20 @@ function(create_header_template) LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */\n\n#ifndef @include_guard@\n#define @include_guard@ \n\n#pragma message(\"This file is deprecated. Use file from include path /opt/rocm-ver/include/ and prefix with @prefix_name@\")\n@include_statements@ \n\n#endif") + */ + +#ifndef @include_guard@ +#define @include_guard@ + +#if defined(__GNUC__) +#warning \"This file is deprecated. Use file from include path /opt/rocm-ver/include/ and prefix with @prefix_name@\" +#else +#pragma message(\"This file is deprecated. Use file from include path /opt/rocm-ver/include/ and prefix with @prefix_name@\") +#endif + +@include_statements@ + +#endif") endfunction() #use header template file and generate wrapper header files