All, I have been adding support for VS2019 to our build and ran into some CMake code that was hard coded for a specific version related to MSVC. Specifically, it is the folder under the VS install dir with version like "14.23.28105". It is in the path for where the compiler is found but I can't find an actual variable that contains this version, is there one? I need access to this folder because we ship the vc_redist and MergeModules and need to install those. Since they are different between VS2017 and VS2019 (and we have support for building in multiple VS versions at a time), I need a way to get this version. I know I can parse it but was hoping it was exposed some other way... FWIW: I already get the path to VS version to use as a generator with vswhere so I am open to using that as well if need be.
Here is the output of CMake with the version bolded for what I am referring to. --- -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0. -- The C compiler identification is MSVC 19.23.28106.4 -- The CXX compiler identification is MSVC 19.23.28106.4 -- The ASM compiler identification is MSVC -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/*14.23.28105*/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/*14.23.28105*/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/*14.23.28105*/bin/Hostx64/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/*14.23.28105*/bin/Hostx64/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/*14.23.28105*/bin/Hostx64/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done <snip> --- Thanks, Caleb
-- Powered by kitware.com/cmake Kitware offers various services to support the CMake community. For more information on each offering, please visit https://cmake.org/services Visit other Kitware open-source projects at https://www.kitware.com/platforms Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake This mailing list is deprecated in favor of https://discourse.cmake.org