我尝试在Windows上构建Clang,因为http://clang.llvm.org/get_started.html中的指南 但是,当我尝试使用cmake:
创建LLVM.sln文件时发生错误CMake Warning at CMakeLists.txt:48 (message):
Visual Studio generators use the x86 host compiler by default, even for
64-bit targets. This can result in linker instability and out of memory
errors. To use the 64-bit host compiler, pass -Thost=x64 on the CMake
command line.
CMake Error at CMakeLists.txt:54 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
Configuring incomplete, errors occurred!
See also "H:/build/CMakeFiles/CMakeOutput.log".
如何解决此问题并生成Visual Studio 2017文件?
答案 0 :(得分:1)
答案 1 :(得分:0)
"Failed to run MSBuild command" indicates that CMake can't find Visual Studio at all, and probably means that you selected the wrong version of Visual Studio in the dropdown. It might mean that you didn't install Visual Studio correctly.
The warning you're seeing is not an error, just a warning. Since CMake is stupid, and doesn't know that it was run from within the GUI, the error message is non-helpful, as is tradition in the world of building C/C++. In order to fix it, you delete the cache, and then click on 'Generate' again. Then you can specify in a text field the argument to -T, where you enter "host=x64".