VS: CMake doesn't detect VS2019 Preview 4.1 SVC1
I'm running CMake version 3.14.0-rc4
against Visual Studio 2019 Preview 4.1 SVC1
, both are at the latest version currently. When generating, I'm running into the general error of:
No CMAKE_C_COMPILER could be found.
I'm using the following commandline: cmake -G "Visual Studio 16 2019" -A x64 ..\glfw-3.2.1
In particular, it seems to have issues finding the Universal CRT (snippet from CMakeError.log):
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.20.27404\bin\HostX64\x64\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:X64 Debug\CMakeCCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\dev\glfw-build\CMakeFiles\3.14.0-rc4\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "C:\dev\glfw-build\CMakeFiles\3.14.0-rc4\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
My Windows SDKs are installed in the default location of C:\Program Files (x86)\Windows Kits\10
, and I have the following versions installed:
- 10.0.10240.0
- 10.0.16299.0
- 10.0.17763.0
All of these have the ucrtd.lib (and ucrt.lib) present in their
lib/%version%/ucrt/x64
folders. I've checked the VS installer to ensure that the "Windows Universal C Runtime", as well as the v141 and v142 Toolsets for x64/x86 are installed as well.
I'm seeing this occur against different CMake projects, particularly I tested against GLFW. I've also tried fully uninstalling VS2019 and installing again to no avail.
I've attached the CMake build output here: glfw-build.zip
Note: When generating for VS 2017 (which is also installed) with cmake 3.14.0-rc4
, it succeeds. I've not been able to get any prior CMake 3.14.0 preview versions to work with any VS2019 preview versions, so this hasn't been a regression AFAIK.
Note2: Running under the VS2019 Developer Command Prompt doesn't seem to make a difference.