title: Getting "cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)" warning during runtime
body: <p>Following <a href="https://stackoverflow.com/q/62272115/4999991">this</a> and <a href="https://stackoverflow.com/a/50667352/4999991">this</a> posts, I'm compiling the <code>main.c</code> code on <a href="https://gist.github.com/Foadsf/3ca81a9b6f4b5c51e93dcee34b434342" rel="nofollow noreferrer">this GitHub Gist</a>. </p>
  
  <p>Running CMake command <code>find_package(OpenCL REQUIRED)</code> I get this:</p>
  
  <pre>
  -- Looking for CL_VERSION_2_2 - found
  -- Found OpenCL: C:/Program Files (x86)/IntelSWTools/system_studio_2020/OpenCL/sdk/lib/x86/OpenCL.lib (found version "2.2")
  </pre>
  
  <p>indicating that an OpenCL SDK version 2.2 was found. This is in contradiction with what I get from <code>clinfo</code> tool, detecting a 1.2 OpenCL for Intel's SDK/platforms. Now when running the executable I get:</p>
  
  <blockquote>
    <p>cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)</p>
  </blockquote>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Why I get two different versions of OpenCL from CMake and <code>clinfo</code>?</li>
  <li>What is the warning I'm getting at runtime and how to fix that?</li>
  </ol>
  
  <p><strong>P.S.</strong> <a href="https://pastebin.com/X4g2GtVt" rel="nofollow noreferrer">Here</a> is the output of <code>cmake .. --debug-find</code></p>