[Development] Importing a module build in creator

Eike Ziller Eike.Ziller at qt.io
Fri Feb 4 09:20:57 CET 2022



> On 14 Jan 2022, at 11:44, Mitch Curtis <mitch.curtis at qt.io> wrote:
> 
> This is the same situation I’m in. Would be nice if they were built when you hit run, but as a workaround I use Alt+B, Alt+R (from memory… I think that’s right):
> 
> https://codereview.qt-project.org/c/qt-creator/qt-creator/+/330075

As a side note, you can also assign a “regular” shortcut to that via Options > Environment > Keyboard.

Br, Eike

> 
> That way you can do that key combination and then Ctrl+R to run the test.
> 
> On 11/1/2022, 13:25, "Development" <development-bounces at qt-project.org> wrote:
> 
> Am 11.01.2022 um 12:39 schrieb Edward Welbourne:
> > Arno Rehn (9 January 2022 15:59) wrote:
> >> I'm skipping building the tests by default and would like
> >> to build only a subset (the ones of the module I'm working on).
> >> QtCreator doesn't seem to support EXCLUDE_FROM_ALL tests at all, so I
> >> usually have to resort to the command line for that.
> > 
> > I suspect combining
> > 
> >    -DQT_BUILD_TESTS=ON
> >    -DQT_BUILD_TESTS_BY_DEFAULT=OFF
> > 
> > would help here.  CMake would know how to build the tests, but would
> > only do so on request, so you could tell ninja to build $submodule/test
> > (or indeed $subdirectory/test; see ninja -t targets for a full list) so
> > as to only build the tests you care about, or build tst_component_check
> > to (build and) run a specific test.
>  
> That's what I'm doing, actually. Works fine on he command line, like you
> said.
> But QtCreator does not know how to handle this case. You see all test
> targets in QtCreator's list, but running them does not build them first.
> So either you'll get a "file not found" error or maybe an outdated
> executable.
> You can only build them with a manual call to ninja.
>  
> Regards,
> Arno
>  
> -- 
> Arno Rehn
> Tel +49 89 189 166 0
> Fax +49 89 189 166 111
> a.rehn at menlosystems.com
> www.menlosystems.com <http://www.menlosystems.com>
>  
> Menlo Systems GmbH
> Bunsenstrasse 5, D-82152 Martinsried, Germany
> Amtsgericht München HRB 138145
> Geschäftsführung: Dr. Michael Mei, Dr. Ronald Holzwarth
> USt.-IdNr. DE217772017, St.-Nr. 14316170324
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development
>  
>  
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Straße 10
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B




More information about the Development mailing list