From 0bafb4683ab3e33d0f8a6e97b02666e0cf4265e5 Mon Sep 17 00:00:00 2001 From: Ranjith Ramakrishnan Date: Wed, 16 Nov 2022 17:17:54 -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: If917a0bef9bbc347f08ca02435d70d517f175afc --- opencl/opencl-backward-compat.cmake | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/opencl/opencl-backward-compat.cmake b/opencl/opencl-backward-compat.cmake index e159924b5e..92e08898ca 100644 --- a/opencl/opencl-backward-compat.cmake +++ b/opencl/opencl-backward-compat.cmake @@ -48,7 +48,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 CL\")\n@include_statements@ \n\n#endif") + */ + +#ifndef @include_guard@ +#define @include_guard@ + +#if defined(_MSC_VER) +#pragma message(\"This file is deprecated. Use file from include path /opt/rocm-ver/include/ and prefix with CL\") +#elif defined(__GNUC__) +#warning \"This file is deprecated. Use file from include path /opt/rocm-ver/include/ and prefix with CL\" +#endif + +@include_statements@ + +#endif") endfunction()