When I open CMake in Visual Studio 2022 , I got this error:
CMake Error at C: /VisualStudio/Common7 / IDE / CommonExtensions / Microsoft / CMake / CMake / share / cmake - 3.25 / Modules / CMakeTestCCompiler.cmake: 70(message): The C compiler "C:/VisualStudio/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
It fails with the following output: Change Dir: C: /VisualStudio/Common7 / IDE / CommonExtensions / Microsoft / CMake / CMake / bin / CMakeProject1 / out / build / x64 - debug / CMakeFiles / CMakeScratch / TryCompile - ytu82w
Run Build Command(s): C: \VISUALSTUDIO\ COMMON7\ IDE\ COMMONEXTENSIONS\ Microsoft\ CMake\ Ninja\ ninja.exe cmTC_d465b && [1 / 2] Building C object CMakeFiles\ cmTC_d465b.dir\ testCCompiler.c.obj[2 / 2] Linking C executable cmTC_d465b.exe
FAILED: cmTC_d465b.exe
cmd.exe / C "cd . && C:\VisualStudio\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_d465b.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\VisualStudio\VC\Tools\MSVC\14.35.32215\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_d465b.dir\testCCompiler.c.obj /out:cmTC_d465b.exe /implib:cmTC_d465b.lib /pdb:cmTC_d465b.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
RC Pass 1: command "rc /fo CMakeFiles\cmTC_d465b.dir/manifest.res CMakeFiles\cmTC_d465b.dir/manifest.rc"
failed(exit code 0) with the following output: The system cannot find the file specified
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Any help would be appreciated