Search code examples
visual-studioqtcmakecgal

CGAL - building INSTALL .sln ,error MSB3073: The command "setlocal"


I have a problem while compiling CGAL I followed the steps here : http://www.cse.msu.edu/~ytong/CGAL_installation.ppt I'm using VS2013 , cgal 4.9.1 , BOOST 1.59.0 ,Qt5.7.1

but when I reach at building INSTALL .sln step it show the following error:

Error   1   error MSB3073: The command "setlocal
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -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. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets  132 5   INSTALL

output message :

   1>------ Rebuild All started: Project: INSTALL, Configuration: Debug Win32 ------
1>  -- Install configuration: "Debug"
1>  -- Up-to-date: C:/Program Files (x86)/CGAL/share/doc/CGAL-4.9.1/AUTHORS
1>  -- Up-to-date: C:/Program Files (x86)/CGAL/share/doc/CGAL-4.9.1/CHANGES
1>  CMake Error at cmake_install.cmake:39 (file):
1>    file INSTALL cannot set permissions on "C:/Program Files
1>    (x86)/CGAL/share/doc/CGAL-4.9.1/CHANGES"
1>  
1>  
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: The command "setlocal
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: :cmEnd
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: :cmErrorLevel
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: exit /b %1
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: :cmDone
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: :VCEnd" exited with code 1.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

any help please?


Solution

  • file INSTALL cannot set permissions on "C:/Program Files

    Building the INSTALL target must create files in the Program Files directory, and this requires elevated privileges.

    The solution is to run Visual Studio as Administrator when you do the INSTALL build.