[Development] Importing a module build in creator
Arno Rehn
a.rehn at menlosystems.com
Tue Jan 11 13:23:16 CET 2022
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
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
More information about the Development
mailing list