CMake 3.14.0-rc1 fails to detect VS2017 when reqesting 64bit compiler
Hello,
when configuring a minimal CMake project with 3.13.2 it works as expected:
C:\git\localbuilds\ExternalLibs\CMake\3.13.2\Tools_Windows\bin\cmake.exe -G"Visual Studio 15 2017" -T host=x64 ..
-- Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.17763.
-- The C compiler identification is MSVC 19.16.27026.1
-- The CXX compiler identification is MSVC 19.16.27026.1
...
but with CMake 3.14.0-rc1 compiler detection fails:
C:\git\localbuilds\ExternalLibs\CMake\3.14.0-rc1\Tools_Windows\bin\cmake.exe -G"Visual Studio 15 2017" -T host=x64 ..
-- Selecting Windows SDK version 10.0.16299.0 to target Windows 10.0.17763.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:1 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:1 (project):
No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
The CMakeError.log
shows the following:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11.02.2019 09:05:31.
Project "C:\git\cmake-vs-bug\_build\CMakeFiles\3.14.0-rc1\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x86\CL.exe /c /nologo /W0 /WX- /diagnostics:classic /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc141.pdb" /Gd /TC /analyze- /FC /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x86\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X86 /SAFESEH Debug\CMakeCCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\git\cmake-vs-bug\_build\CMakeFiles\3.14.0-rc1\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "C:\git\cmake-vs-bug\_build\CMakeFiles\3.14.0-rc1\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
Build FAILED.
you'll find a screenshot of the installed workloads.
Thanks, Gregor