<div dir="ltr"><div>Hello,</div><div><br></div><div>I'm trying to understand the discrepancy between the compiler version reported by Visual C++ and the compiler version reported by CMake.</div><div><br></div><div>I've posted a question on Stack Overflow [1] but since I didn't get a satisfactory answer yet, I figured I would dig into CMake's sources to figure it out myself. After an hour of grepping the source code, I'm still puzzled so I figured I would ask directly here.</div><div><br></div><div>FWIW, I'm using Visual Studio Enterprise 2017 version 15.3.0 and CMake version 3.8.1.<br></div><div><br></div><div>When I run</div><div><br></div><div>    cmake -G "Visual Studio 11 2012 Win64" .<br></div><div><br></div><div>I get:</div><div><br></div><div><div>    -- The C compiler identification is MSVC 17.0.60610.1</div><div>    -- The CXX compiler identification is MSVC 17.0.60610.1</div><div>    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe</div><div>    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe -- works</div></div><div><br></div><div>i.e. the compiler version is 17.0.60610.1. But when I run</div><div><div><br></div><div>    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\cl.exe</div><div><br></div><div>I instead get:</div><div><br></div><div>    Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50727.1 for x64</div></div><div><br></div><div>i.e. the compiler version is 17.00.50727.1. I'm assuming this is the correct version number, and I'm now wondering why CMake reports a different one.</div><div><br></div><div>Any idea?</div><div><br></div><div>Best,</div><div>Franz</div><div><br></div><div>[1] <a href="https://stackoverflow.com/questions/45763944/msvc-compiler-identification-with-cmake">https://stackoverflow.com/questions/45763944/msvc-compiler-identification-with-cmake</a></div></div>