From aae692c674b01d8f0f2568c0660bdbbaea7cb1fd Mon Sep 17 00:00:00 2001 From: Ranjith Ramakrishnan Date: Tue, 15 Nov 2022 16:30:53 -0800 Subject: [PATCH] SWDEV-368058 - 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: Ieb7726ef219af20b9260c1e35444813a36cd8508 --- rocprofiler-backward-compat.cmake | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/rocprofiler-backward-compat.cmake b/rocprofiler-backward-compat.cmake index 1d7f8dc50c..ee57bd9739 100644 --- a/rocprofiler-backward-compat.cmake +++ b/rocprofiler-backward-compat.cmake @@ -48,7 +48,18 @@ 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 rocprofiler\")\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 rocprofiler\" +#else +#pragma message(\"This file is deprecated. Use file from include path /opt/rocm-ver/include/ and prefix with rocprofiler\") +#endif + +@include_statements@ +#endif") endfunction() #use header template file and generate wrapper header files