diff --git a/opencl/opencl-backward-compat.cmake b/opencl/opencl-backward-compat.cmake index 84a9cdf388..92e08898ca 100644 --- a/opencl/opencl-backward-compat.cmake +++ b/opencl/opencl-backward-compat.cmake @@ -53,10 +53,10 @@ function(create_header_template) #ifndef @include_guard@ #define @include_guard@ -#if defined(__GNUC__) -#error \"This file is deprecated. Use file from include path /opt/rocm-ver/include/ and prefix with CL\" -#else +#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@