vtk msvc14 installation fails when building INSTALL

匿名 (未验证) 提交于 2019-12-03 02:38:01

问题:

I have successfully built the VTK libraries: using the cmake configure and generate, plus the building in release and debug of the msvc 14 solution. More precisely I was able to build the ALL BUILD project. But when it comes to building the INSTALL project it fails.

the error is:

Severity Code Description Project File Line Suppression State Error MSB3073 The command

"setlocal "C:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone :cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd :VCEnd" 

exited with code 1. INSTALL C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets 133

How can I either debug this problem or shortcut the msvc INSTALL build step?

I am working on windows7 using microsoft visual studio 14 2015.

回答1:

This error commonly happens because the default cmake install location requires admin privileges (normally C:/Program Files/).

There are two simple ways around this:

  1. Run visual studio as Administrator
  2. Override the CMAKE_INSTALL_PREFIX variable to point somewhere not requiring admin privileges

Personally, I'd recommend the second option (When configuring cmake, the command would be something like: cmake . -DCMAKE_INSTALL_PREFIX=D:/Some/Path)



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!