CMake 一問

我有個open source project想compile
在Visual Studio內佢有post build event
  1. setlocal
  2. "C:\Program Files (x86)\CMake\bin\cmake.exe" -E copy D:/Programming/C++/3D/IK/OpenTissue/built/third_party/bundled/Triangle/debug/TriangleD.lib D:/Programming/C++/3D/IK/OpenTissue/third_party/lib/windows
  3. if %errorlevel% neq 0 goto :cmEnd
  4. :cmEnd
  5. endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  6. :cmErrorLevel
  7. exit /b %1
  8. :cmDone
  9. if %errorlevel% neq 0 goto :VCEnd
  10. setlocal
  11. "C:\Program Files (x86)\CMake\bin\cmake.exe" -E copy D:/Programming/C++/3D/IK/OpenTissue/built/third_party/bundled/Triangle/release/Triangle.lib D:/Programming/C++/3D/IK/OpenTissue/third_party/lib/windows
  12. if %errorlevel% neq 0 goto :cmEnd
  13. :cmEnd
  14. endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  15. :cmErrorLevel
  16. exit /b %1
  17. :cmDone
  18. if %errorlevel% neq 0 goto :VCEnd
  19. setlocal
  20. "C:\Program Files (x86)\CMake\bin\cmake.exe" -E copy D:/Programming/C++/3D/IK/OpenTissue/third_party/bundled/Triangle/triangle.h D:/Programming/C++/3D/IK/OpenTissue/third_party/include/Triangle/
  21. if %errorlevel% neq 0 goto :cmEnd
  22. :cmEnd
  23. endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  24. :cmErrorLevel
  25. exit /b %1
  26. :cmDone
  27. if %errorlevel% neq 0 goto :VCEnd
複製代碼
我有elevate permission for Visual Studio + CMake
(Run as administrator)
但仍有以下的Error
  1. Error        1        error MSB3075: The command "setlocal
  2. "C:\Program Files (x86)\CMake\bin\cmake.exe" -E copy D:/Programming/C++/3D/IK/OpenTissue/built/third_party/bundled/TinyXML/debug/TinyXMLD.lib D:/Programming/C++/3D/IK/OpenTissue/third_party/lib/windows
  3. if %errorlevel% neq 0 goto :cmEnd
  4. :cmEnd
  5. endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  6. :cmErrorLevel
  7. exit /b %1
  8. :cmDone
  9. if %errorlevel% neq 0 goto :VCEnd
  10. setlocal
  11. "C:\Program Files (x86)\CMake\bin\cmake.exe" -E copy D:/Programming/C++/3D/IK/OpenTissue/built/third_party/bundled/TinyXML/release/TinyXML.lib D:/Programming/C++/3D/IK/OpenTissue/third_party/lib/windows
  12. if %errorlevel% neq 0 goto :cmEnd
  13. :cmEnd
  14. endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  15. :cmErrorLevel
  16. exit /b %1
  17. :cmDone
  18. if %errorlevel% neq 0 goto :VCEnd
  19. setlocal
  20. "C:\Program Files (x86)\CMake\bin\cmake.exe" -E copy D:/Programming/C++/3D/IK/OpenTissue/third_party/bundled/TinyXML/tinystr.h D:/Programming/C++/3D/IK/OpenTissue/third_party/include/TinyXML/
  21. if %errorlevel% neq 0 goto :cmEnd
  22. :cmEnd
  23. endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  24. :cmErrorLevel
  25. exit /b %1
  26. :cmDone
  27. if %errorlevel% neq 0 goto :VCEnd
  28. setlocal
  29. "C:\Program Files (x86)\CMake\bin\cmake.exe" -E copy D:/Programming/C++/3D/IK/OpenTissue/third_party/bundled/TinyXML/tinyxml.h D:/Programming/C++/3D/IK/OpenTissue/third_party/include/TinyXML/
  30. if %errorlevel% neq 0 goto :cmEnd
  31. :cmEnd
  32. endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  33. :cmErrorLevel
  34. exit /b %1
  35. :cmDone
  36. if %errorlevel% neq 0 goto :VCEnd
  37. :VCEnd" exited with code 5. Please verify that you have sufficient rights to run this command.        C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets        132        5        TinyXML
複製代碼
應該點好?
THX