나는 특정 문제에 직면 해 있으며 조언이나 디버깅 방법을 원합니다.Debug CMake Project Creation
소스에서 다음을 사용하여 Allegro 라이브러리를 구축합니다. Windows 10, CMake 및 Visual Studio 2015 빌드 도구 (msbuild).
출처 :. https://github.com/liballeg/allegro5
문제는 그 내가 실행할 때`cmake --build ' v100 도구 세트가 설치되어 있지 않다는 오류가 나타납니다. 그러나 2010 년이 아니라 Visual Studio 2015 용입니다. 솔루션을 열거 나 msbuild를 직접 실행하면 완벽하게 정상적으로 빌드됩니다.
문제를 확인하는 데 도움이되는 CMake 디버깅 방법이 있습니까?
실패 명령 :
mkdir _build
pushd _build
cmake.exe ..
cmake --build .
popd
오류 :
"C:\Users\matthew\repos\allegro5_build\ALL_BUILD.vcxproj" (default target) (1) -> "C:\Users\matthew\repos\allegro5_build\ZERO_CHECK.vcxproj" (default target) (2) -> (PlatformPrepareForBuild target) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(55,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\matthew\repos\allegro5 _build\ZERO_CHECK.vcxproj]
작업 명령 :
mkdir _build
pushd _build
cmake.exe ..
msbuild ALLEGRO.sln
popd
나는 또한 같은 명령으로 비주얼 스튜디오 2015을 강제로 시도했다 :
cmake.exe -G "Visual Studio 14" ..
참고 : 나는 CMake 내 자신의 작은 프로젝트를 구축했고 올바르게 CMake 그것이 알레그로 cmake 빌드 미친 뭔가 것 같아 나에게
을 --build 사용하여 빌드. 나는 소스를 통해 v100과 MSVC_2010에 대한 참조를 찾으려고했지만, 걱정거리는 발견되지 않았습니다. ExternalProject_Add에 allegro를 포함시키고 싶기 때문에 MSBuild를 직접 사용하고 싶지 않고 cmake - build로 빌드 할 때와 같은 이유로 실패합니다.어떻게이 문제를 해결할 수 있습니까?
[Debugging CMakeLists.txt] (http://stackoverflow.com/questions/22803607/debugging-cmakelists-txt)) – usr1234567
도움이 될 수도 있습니다. http://stackoverflow.com/a/38869455/2799037 – usr1234567
알레그로가 v100 도구를 사용한다고 확신한다면 (왜 그렇게했을까요?) 'ExternalProject_Add' 접근 방식으로 가서 알레그로를 찾아보십시오. cmake 파일. https://crascit.com/2016/10/18/test-fixtures-with-cmake-ctest/는 외부 프로젝트 기능을 사용하는 깔끔한 방법입니다. – NameRakes