error.vs.devenv¶
What happens¶
CMake fatal error:
- version <= v0.23.95: with message
[hunter ** FATAL ERROR **] Incorrect CMAKE_VS_DEVENV_COMMAND ... - version >= v0.23.96: with message
[hunter ** FATAL ERROR **] Incorrect MSVC setup ...
- version <= v0.23.95: with message
Explanation¶
These paths can be used to determine tools which needed to build non-CMake projects (like Boost).
- CMAKE_VS_DEVENV_COMMAND contains full path to devenv.com tool when using full versions of Visual Studio.
- CMAKE_VS_MSBUILD_COMMAND contains full path to MSBuild.exe tool.
What to do¶
- For some reason the CMake version that came with Visual Studio doesn’t define this variable (see issue 751). As a workaround, use standard CMake version from https://cmake.org/download/
- If you are using Microsoft Build Tools, or a similar non-full Visual Studio installation, and Hunter version <= v0.23.95 then
CMAKE_VS_DEVENV_COMMANDmay not be available. Please try updating Hunter, which will also checkCMAKE_VS_MSBUILD_COMMAND. CMAKE_VS_DEVENV_COMMANDwill be used only if there is noVS*COMNTOOLSenvironment added after Visual Studio installation (this “feature” introduced since Visual Studio 15 2017). You can add such variable manually, e.g. for Visual Studio 15 2017 set environment variableVS150COMNTOOLSto valueC:\...\ide\msvc\2017\Common7\Tools