[Qt-creator] Qt Creator 4.3.0, Qt 5.9.0: problems with cmake support

Helmut Mülner helmut.muelner at gmail.com
Fri Jun 2 13:14:04 CEST 2017


Hi,

this is strange: 
If I use the kits manager to set the compilers to <No compiler> I get:
Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{e28feaba-544f-49ba-bfa6-5b0ee5ca1cec}" --experimental" in C:\Users\mue\AppData\Local\Temp\QtCreator-zxPK5t\qtc-cmake-XXp2hZsu.
Configuring done
CMake Error:
  The detected version of Ninja () is less than the version of Ninja required
  by CMake (1.3).


CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_CXX_COMPILER
    CMAKE_C_COMPILER
    CMAKE_PREFIX_PATH
    QT_QMAKE_EXECUTABLE

I have only one ninja.exe in the system. Ninja --version gives 1.7.2
(Also tried with 1.5.3 and 1.6.9).

BR,
Helmut

-----Ursprüngliche Nachricht-----
Von: Eike Ziller [mailto:Eike.Ziller at qt.io] 
Gesendet: Freitag, 2. Juni 2017 11:21
An: Helmut Mülner <helmut.muelner at gmail.com>
Cc: Tobias Hunger <tobias.hunger at gmail.com>; qt-creator <qt-creator at qt-project.org>
Betreff: Re: [Qt-creator] Qt Creator 4.3.0, Qt 5.9.0: problems with cmake support

Thanks for the additional information.
I’m able to reproduce your issue.

It looks like Qt Creator passes a wrong CMAKE_CXX_COMPILER setting in this specific case, even though the compilers are set up in the kit.
When I go to "Tools > Options > Build & Run > Kits" and either remove the CMAKE_CXX_COMPILER and CMAKE_C_COMPILER entries from the “CMake Configuration”, or set them to just “cl.exe” or the absolute path to cl.exe, then configuration works for my dummy CMake based project.

Br, Eike

> On Jun 2, 2017, at 10:39 AM, Helmut Mülner <helmut.muelner at gmail.com> wrote:
> 
> On Jun 1, 2017 18:19, "Helmut Mülner" <helmut.muelner at gmail.com> wrote:
>>> Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{cdb7ec38-096b-4a3d-9b84-fc91923889d4}" --experimental" in C:\Users\mue\AppData\Local\Temp\QtCreator-P1XkOA\qtc-cmake-XXF8mA7w.
>>> 
>>> The C compiler identification is unknown The CXX compiler identification is unknown CMake Error at CMakeLists.txt:3 (project):
>>> 
>>>   No CMAKE_C_COMPILER could be found.
>>> 
> Does your project contain files that need to be built with a c compiler? You might want to tell cmake not to bother checking for one if not:-) PROJECT has a way to do that.
>  
> This is not relevant here. The Microsoft-C-Compiler is always the same as the Microsoft-C++-Compiler.
>  
> The stuff is in profiles.xml. Do not bother to delete that, just fix it!
>  
> The profiles.xml looks ok as far as I can tell.
>  
> In QtCreator I have the following kits:
> -       Qt 5.8.0 (msvc2013)
> -       Qt 5.8.0 (msvc2013-64)
> -       Qt 5.9.0 (msvc2013-64)
> -       Qt 5.9.0 (msvc2015(
> -       Qt 5.9.0 (msvc2015_64)
> -       Qt 5.9.0 (msvc2017-64)
>  
> All of them except the last one work with the QtCreator cmake integration.
> All of them (including msvc2017-64)  work with qmake.
>  
> If I open a VS2017 developer console and run cmake (or cmake-gui) there I can generate a working VS2017 solution.
>  
> I suspect that QtCreator does not set up the environment correctly before calling cmake.
> I also tried to start QtCreator from a VS2017 developer console, but this also did not work.
> Also tried the “x64 Native Tools Command Prompt for VS 2017” and started QtCreator from there – without success.
>  
> I always get this output:
>  
> Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{7fc4b436-7358-4002-8feb-2380442290e4}" --experimental" in C:\Users\mue\AppData\Local\Temp\QtCreator-bE7tFd\qtc-cmake-XXqOkacn.
> The C compiler identification is unknown The CXX compiler 
> identification is unknown CMake Error at CMakeLists.txt:3 (project):
> No CMAKE_C_COMPILER could be found.
>  
> 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):
> No CMAKE_CXX_COMPILER could be found.
>  
> 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/mue/AppData/Local/Temp/QtCreator-bE7tFd/qtc-cmake-XXqOkacn/CMakeFiles/CMakeOutput.log".
> See also "C:/Users/mue/AppData/Local/Temp/QtCreator-bE7tFd/qtc-cmake-XXqOkacn/CMakeFiles/CMakeError.log".
>  
> If I use the “x64 Native Tools Command Prompt for VS 2017” and go to the Temp folder with the error logs, there is a subfolder “3.8.2”
> With two subfolders for the compiler checks.
> When I do “cl -c CMakeCCompilerId.c” I get the output:
> Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x86 
> Copyright (C) Microsoft Corporation.  All rights reserved.
>  
> CMakeCCompilerId.c
>  
>  
> And with “cl -c CMakeCXXCompilerId.cpp”:
> Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x86 
> Copyright (C) Microsoft Corporation.  All rights reserved.
>  
> CMakeCXXCompilerId.cpp
>  
> My conclusion: QtCreator/cmake did not find the compiler.
>  
> The BOOST mailing list had some discussion about problems with VS2017 some weeks ago.
> Some links:
> https://lists.boost.org/Archives/boost/2017/04/234552.php
> https://lists.boost.org/Archives/boost/2017/03/234024.php
> https://lists.boost.org/Archives/boost/2017/02/232805.php
>  
> Cheers,
> Helmut
>  
>  
>  
>  
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

--
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B





More information about the Qt-creator mailing list