Haocheng,

Yes, if I go to the CMake GUI, use that to set all the CMake variables so that 
the configure succeeds, and then load that configuration into Qt Creator, 
everything works fine. The problem is only when CMake configuration fails 
because a variable needs to change. The common case where you have 
configuration code like the following:

find_package(foo)
if (NOT foo_FOUND)
  message(SEND_ERROR “Need package foo”)
endif()

Often on the first run of CMake, you’ll get the error about not finding package 
foo. Then you set the foo_DIR variable (or whatever CMake needs to find the 
library) and the configure succeed. But Qt Creator is not letting me set those 
variables, which is clearly wrong.

One more data point, this is on Windows 10. I don’t know if there is a 
difference on different systems.

-Ken

From: Haocheng Liu <haocheng....@kitware.com>
Date: Tuesday, February 20, 2018 at 3:50 PM
To: "Moreland, Kenneth" <kmo...@sandia.gov>
Cc: "cmake@cmake.org" <cmake@cmake.org>
Subject: [EXTERNAL] Re: [CMake] Latest versions of CMake/Qt Creator lock up 
configuration on CMake error

Hi Ken,

On Tue, Feb 20, 2018 at 4:08 PM, Moreland, Kenneth 
<kmo...@sandia.gov<mailto:kmo...@sandia.gov>> wrote:
This might be a question for the folks at Qt, but I thought I would float it 
here first as other CMake users might have run into it.

This morning I updated to the most recent versions of CMake (3.10.2) and Qt 
Creator (4.5.1). I then tried to use Qt Creator to configure a non-trivial 
CMake project from scratch and ran into an issue. The problem is that any time 
CMake fails to configure, the Qt Creator Build Settings GUI becomes 
non-responsive. This is a serious issue since it is common for CMake to fail 
because it cannot find some required component (like a library it depends on), 
and then to use the GUI to point CMake to the proper location of the library. 
However, once CMake fails to configure, Qt Creator doesn’t let you change the 
CMake variables to point it in the right direction.

Out of curiosity, I updated my Qt Creator to 4.5.1 and tested it with 
CMake(3.10.1) on my Ubuntu 16.04 laptop and it works fine. I'm able to modify 
the CMake variables.
I suspect this is caused by the ne w server-mode feature of CMake. My guess is 
that once the CMake server fails to configure, it stops providing any 
information to Qt Creator, which then becomes nonresponsive until the configure 
succeeds.

Since CMake introduces its server mode in 3.7, ideally my CMake(3.10.1) should 
also be affected. Humm.
Has anyone seen this behavior or have any workarounds?

Have you tried to tweak the CMake variables via ccmake or cmake-gui then right 
click your project in Qt Creator ->  call `Run CMake` in the context menu?

best regards
Haocheng
-Ken

   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmo...@sandia.gov<mailto:kmo...@sandia.gov>
**  ***  **  phone: (505) 844-8919<tel:(505)%20844-8919>
    ***      web:   http://kennethmoreland.com



--

Powered by www.kitware.com<http://www.kitware.com>

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake



--
Best regards
Haocheng

Haocheng LIU
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4421<tel:(518)%20881-4421>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to