Cmake不会制作sln文件(Visual Studio 2017)

时间:2018-10-08 12:36:14

标签: c++ cmake visual-studio-2017

我正在努力使用CMake生成*.sln文件,但不幸的是,我收到了如下所示的错误消息。请注意,上述文件夹中存在CMakeCXXCompilerId.cppCompilerIdCXX.vcxproj文件。 我已经安装了通用Windows平台开发和具有C ++的桌面开发,并且我还尝试了以管理员身份运行脚本。

命令如下:cmake.exe -G“ Visual Studio 15 2017 Win64”。

谢谢。

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:  
Build flags: 
Id flags:  

The output was:
1
Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 10/8/2018 2:30:02 PM.
Project "C:\projects\EuropeanCoDiOptimization\dispatching\src\CMakeFiles\3.12.3\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets).
PrepareForBuild:
  Creating directory "Debug\".
  Creating directory "Debug\CompilerIdCXX.tlog\".
InitializeBuildStatus:
  Creating "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:classic /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc141.pdb" /Gd /TP /FC /errorReport:queue CMakeCXXCompilerId.cpp
  CMakeCXXCompilerId.cpp
c1xx : fatal error C1083: Cannot open source file: 'CMakeCXXCompilerId.cpp': No such file or directory [C:\projects\EuropeanCoDiOptimization\dispatching\src\CMakeFiles\3.12.3\CompilerIdCXX\CompilerIdCXX.vcxproj]
Done Building Project "C:\projects\EuropeanCoDiOptimization\dispatching\src\CMakeFiles\3.12.3\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\projects\EuropeanCoDiOptimization\dispatching\src\CMakeFiles\3.12.3\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) ->
(ClCompile target) -> 
  c1xx : fatal error C1083: Cannot open source file: 'CMakeCXXCompilerId.cpp': No such file or directory [C:\projects\EuropeanCoDiOptimization\dispatching\src\CMakeFiles\3.12.3\CompilerIdCXX\CompilerIdCXX.vcxproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.61


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:  
Build flags: 
Id flags:  

The output was:
1
Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 10/8/2018 2:30:05 PM.
Project "C:\projects\EuropeanCoDiOptimization\dispatching\src\CMakeFiles\3.12.3\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets).
PrepareForBuild:
  Creating directory "Debug\".
  Creating directory "Debug\CompilerIdCXX.tlog\".
InitializeBuildStatus:
  Creating "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:classic /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc141.pdb" /Gd /TP /FC /errorReport:queue CMakeCXXCompilerId.cpp
  CMakeCXXCompilerId.cpp
c1xx : fatal error C1083: Cannot open source file: 'CMakeCXXCompilerId.cpp': No such file or directory [C:\projects\EuropeanCoDiOptimization\dispatching\src\CMakeFiles\3.12.3\CompilerIdCXX\CompilerIdCXX.vcxproj]
Done Building Project "C:\projects\EuropeanCoDiOptimization\dispatching\src\CMakeFiles\3.12.3\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\projects\EuropeanCoDiOptimization\dispatching\src\CMakeFiles\3.12.3\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) ->
(ClCompile target) -> 
  c1xx : fatal error C1083: Cannot open source file: 'CMakeCXXCompilerId.cpp': No such file or directory [C:\projects\EuropeanCoDiOptimization\dispatching\src\CMakeFiles\3.12.3\CompilerIdCXX\CompilerIdCXX.vcxproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.65

0 个答案:

没有答案