CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:20 (project)

0

I want to install protocol buffers in my Windows system while running below command:

cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../../../../install ../.. 

I got this error:

-- The C compiler identification is MSVC 19.22.27905.0
-- The CXX compiler identification is MSVC 19.22.27905.0

-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe

-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- broken

CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):

The C compiler:

    "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe"

is not able to compile a simple test program. It fails with the following output:

 Change Dir: C:/ProtoBuff/protobuf-3.9.0/cmake/build/release/CMakeFiles/CMakeTmp

Run Build Command(s):nmake /nologo cmTC_5d4c2\fast &&       "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX64\x64\nmake.exe" -f CMakeFiles\cmTC_5d4c2.dir\build.make /nologo -L                  CMakeFiles\cmTC_5d4c2.dir\build
Building C object CMakeFiles/cmTC_5d4c2.dir/testCCompiler.c.obj
    C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1422~1.279\bin\Hostx64\x64\cl.exe @C:\Users\shubh\AppData\Local\Temp\nm4F4E.tmp
testCCompiler.c
Linking C executable cmTC_5d4c2.exe
    "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_5d4c2.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1422~1.279\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\cmTC_5d4c2.dir\objects1.rsp @C:\Users\shubh\AppData\Local\Temp\nm50F5.tmp
RC Pass 1: command "rc /fo CMakeFiles\cmTC_5d4c2.dir/manifest.res CMakeFiles\cmTC_5d4c2.dir/manifest.rc" failed (exit code 0) with the following output:
The system cannot find the file specifiedNMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.

CMake will not be able to correctly generate this project. Call Stack (most recent call first):

CMakeLists.txt:20 (project)

-- Configuring incomplete, errors occurred!
See also "C:/ProtoBuff/protobuf-3.9.0/cmake/build/release/CMakeFiles/CMakeOutput.log".
See also "C:/ProtoBuff/protobuf-3.9.0/cmake/build/release/CMakeFiles/CMakeError.log".

Can anybody suggest me why it's happening? How do I fix this?

windows
cmake
asked on Stack Overflow Aug 4, 2019 by Shubham Tiwari • edited Aug 6, 2019 by Shamrai Aleksander

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0