intel / cm-compiler

MIT License
146 stars 54 forks source link

CMake Error: Failed to run MSBuild command #47

Closed MarcelYuhsin closed 3 years ago

MarcelYuhsin commented 3 years ago

I am new to this tool and want to build it on Windows with Cygwin. When I run the command with support/scripts/build.bash -s vs2015 -d -m --32, it causes an error as follows. I further download the MSBuild tools 2015 on Microsoft, and set the environmental variable C:\Program Files (x86)\MSBuild\14.0\Bin. CMake version is 3.20.0-windows-x86_64. While the error still exists. Can anyone help? Thanks

$ support/scripts/build.bash -s vs2015 -d -m --32
support/scripts/build.bash: line 287: [: too many arguments
Running script with the following properties:
Visual Studio mode for vs2015
Running cmake
Configuration Debug
Cmake being used : /cygdrive/c/Program Files/CMake/bin/cmake in out of source dir build.32.vs2015
/cygdrive/c/Program Files/CMake/bin/cmake -G Visual Studio 14 -DLLVM_USE_CRT_DEBUG=MTd -    DLLVM_USE_CRT_MINSIZEREL=MT -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_CRT_RELWITHDEBINFO=MT -DLLVM_INSTALL_TOOLCHAIN_ONLY=1 -DCMAKE_CXX_FLAGS= -DHAVE_SVN_VERSION_INC -DLLVM_TARGETS_TO_BUILD=GenX;X86 D:\Cygwin\home\admin\Projects\cm-compiler\llvm
CMake Deprecation Warning at CMakeLists.txt:14 (cmake_policy):
The OLD behavior for policy CMP0051 will be removed from a future version of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances.  Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

CMake Warning at CMakeLists.txt:39 (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.

-- Selecting Windows SDK version  to target Windows 10.0.19041.
CMake Error at CMakeLists.txt:45 (project):
  Failed to run MSBuild command:

    C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

  to get the value of VCTargetsPath:

Microsoft (R) Build Engine version 14.0.23107.0
Copyright (C) Microsoft Corporation. 著作權所有,並保留一切權利。

已經開始建置於 2021/4/7 下午 03:16:33。
節點 1 (預設目標) 上的專案 "D:\Cygwin\home\admin\Projects\cm-  compiler\build.32.vs2015\CMakeFiles\3.20.0\VCTargetsPath.vcxproj"。
D:\Cygwin\home\admin\Projects\cm-compiler\build.32.vs2015\CMakeFiles\3.20.0\VCTargetsPath.vcxproj(14,2): error MSB4019: 找不到匯入的專案 "D:\Microsoft.Cpp.Default.props"。請確認 <Import>
宣告中的路徑正確,而且檔案存在於磁碟上。
專案 "D:\Cygwin\home\admin\Projects\cm-compiler\build.32.vs2015\CMakeFiles\3.20.0\VCTargetsPath.vcxproj" (預設目標) 建置完成 -- 失敗。

建置失敗。

"D:\Cygwin\home\admin\Projects\cm-compiler\build.32.vs2015\CMakeFiles\3.20.0\VCTargetsPath.vcxproj" (預設目標) (1) ->
 D:\Cygwin\home\admin\Projects\cm-compiler\build.32.vs2015\CMakeFiles\3.20.0\VCTargetsPath.vcxproj(14,2): error MSB4019: 找不到匯入的專案 "D:\Microsoft.Cpp.Default.props"。請確認 <Import>
 宣告中的路徑正確,而且檔案存在於磁碟上。

  0 個警告
  1 個錯誤

經過時間 00:00:00.21

Exit code: 1

-- Configuring incomplete, errors occurred!
See also "D:/Cygwin/home/admin/Projects/cm-compiler/build.32.vs2015/CMakeFiles/CMakeOutput.log".
Cmake didn't work - exiting
MSBUILD : error MSB1009: 專案檔不存在。
參數: tools/llvm-as/llvm-as.vcxproj
llvm-as VS build step failed - exiting
MarcelYuhsin commented 3 years ago

I used vs2017 and MSBuild tools 2017 then the problem been solved.