Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-18378

CMake 3.8.2 not working with QtCreator 4.3.1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • Qt Creator 4.3.1
    • None
    • Windows 10 64-bit

    Description

      All the settings are just out of the box. 

      CMakeLists.txt

      cmake_minimum_required(VERSION 2.8)
      
      project(CppApp)
      add_executable(${PROJECT_NAME} "main.cpp")
      

      main.cpp 

      #include <iostream>
      
      using namespace std;
      
      int main()
      {
          cout << "Hello World!" << endl;
          return 0;
      }
      

      However, neither Qt with Visual Studio 2017 nor 2015 will work.

      When I click "Run Cmake" with VS2017, the result is as follow: 

      Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{63d11569-689c-41b3-b4fd-381649a8582f}" --experimental" in C:\Users\grayfox\AppData\Local\Temp\QtCreator-P1XkOA\qtc-cmake-XX33gNcQ.
      The C compiler identification is MSVC 19.10.25019.0
      The CXX compiler identification is MSVC 19.10.25019.0
      CMake Error at CMakeLists.txt:3 (project):
      The CMAKE_C_COMPILER:
      
      cl
      
      is not a full path and was not found in the PATH.
      
      To use the NMake generator with Visual C++, cmake must be run from a shell
      that can use the compiler cl from the command line. This environment is
      unable to invoke the cl compiler. To fix this problem, run cmake from the
      Visual Studio Command Prompt (vcvarsall.bat).
      
      Tell CMake where to find the compiler by setting either the environment
      variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
      the compiler, or to the compiler name if it is in the PATH.
      
      
      CMake Error at CMakeLists.txt:3 (project):
      The CMAKE_CXX_COMPILER:
      
      cl
      
      is not a full path and was not found in the PATH.
      
      To use the NMake generator with Visual C++, cmake must be run from a shell
      that can use the compiler cl from the command line. This environment is
      unable to invoke the cl compiler. To fix this problem, run cmake from the
      Visual Studio Command Prompt (vcvarsall.bat).
      
      Tell CMake where to find the compiler by setting either the environment
      variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
      to the compiler, or to the compiler name if it is in the PATH.
      
      
      Configuring incomplete, errors occurred!
      See also "C:/Users/grayfox/AppData/Local/Temp/QtCreator-P1XkOA/qtc-cmake-XX33gNcQ/CMakeFiles/CMakeOutput.log".
      See also "C:/Users/grayfox/AppData/Local/Temp/QtCreator-P1XkOA/qtc-cmake-XX33gNcQ/CMakeFiles/CMakeError.log".
      

      When I click "Run Cmake" with VS2015, the result is as follow:

       

      Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{7d3e5a49-8676-4885-b310-2bdd9d600066}" --experimental" in C:\Users\grayfox\AppData\Local\Temp\QtCreator-P1XkOA\qtc-cmake-XXs6CSxP.
      The C compiler identification is MSVC 19.0.23918.0
      The CXX compiler identification is MSVC 19.0.23918.0
      Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.exe
      Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/cl.exe -- broken
      CMake Error at C:/Program Files/CMake/share/cmake-3.8/Modules/CMakeTestCCompiler.cmake:51 (message):
      The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
      14.0/VC/BIN/amd64/cl.exe" is not able to compile a simple test program.
      
      It fails with the following output:
      
      Change Dir: C:/Users/grayfox/AppData/Local/Temp/QtCreator-P1XkOA/qtc-cmake-XXs6CSxP/CMakeFiles/CMakeTmp
      
      
      
      Run Build Command:"nmake" "/NOLOGO" "cmTC_22ac4\fast"
      
      "C:\Program Files (x86)\Microsoft Visual Studio
      14.0\VC\BIN\amd64\nmake.exe" -f CMakeFiles\cmTC_22ac4.dir\build.make
      /nologo -L CMakeFiles\cmTC_22ac4.dir\build
      
      Building C object CMakeFiles/cmTC_22ac4.dir/testCCompiler.c.obj
      
      C:\PROGRA~2\MICROS~3.0\VC\BIN\amd64\cl.exe
      @C:\Users\grayfox\AppData\Local\Temp\nm9E94.tmp
      
      testCCompiler.c
      
      Linking C executable cmTC_22ac4.exe
      
      "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe
      --intdir=CMakeFiles\cmTC_22ac4.dir --manifests --
      C:\PROGRA~2\MICROS~3.0\VC\bin\amd64\link.exe /nologo
      @CMakeFiles\cmTC_22ac4.dir\objects1.rsp
      @C:\Users\grayfox\AppData\Local\Temp\nm9EE3.tmp
      
      RC Pass 1 failed to run.
      
      NMAKE : 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
      14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
      
      Stop.
      
      
      
      
      
      CMake will not be able to correctly generate this project.
      Call Stack (most recent call first):
      CMakeLists.txt:3 (project)
      
      
      Configuring incomplete, errors occurred!
      See also "C:/Users/grayfox/AppData/Local/Temp/QtCreator-P1XkOA/qtc-cmake-XXs6CSxP/CMakeFiles/CMakeOutput.log".
      See also "C:/Users/grayfox/AppData/Local/Temp/QtCreator-P1XkOA/qtc-cmake-XXs6CSxP/CMakeFiles/CMakeError.log".
      

       

       

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              davschul David Schulz
              grayfox grayfox
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes