[Development] qmake command line assignments are not considered by config.tests

Roland Winklmeier roland.m.winklmeier at gmail.com
Thu Oct 30 15:32:50 CET 2014


2014-10-30 15:26 GMT+01:00 Roland Winklmeier <roland.m.winklmeier at gmail.com>
:

> Dear Qt devs,
>
> I addressed the question below first to the interest list. But since
> nobody replied, I did some investigations and found out this behavior
> is caused by the macro qtCompileTest defined in
> qtbase/mkspecs/features/configure.prf.
>
> I also found a codereview similar to what I had planned to submit (
> https://codereview.qt-project.org/#/c/96521/ ) but it was abandoned
> with the explanation the tests should be self-contained and I agree
> with that. However, I'm still missing a feature to add custom include
> and linker paths. Otherwise qtCompileTest is just not usable on
> Windows.
>
> Cheers R.
>

Forgot to copy the original email. Is now appended.

Dear list,

I'm using qmake project files for a library project. On Linux with a
standard pathes for installed headers and libraries, there was rarely
the need to add a non-standard path. If that happened, a command line
assignment did the job:

qmake "INCLUDEPATH+=C:/path/to/
headers" file.pro

I used the same approach on Windows, due to the lack of a default header
path. I want to keep the project files clean from local path changes as
much as possible, because it used to produce conflicts when pulling from
origin.

Recently I found qtCompileTest(test) macro and loved it. So I added
config tests to my latest project. On Linux config tests are building
successfully and everything is fine. But on Windows even though I passed
the custom include as commandline assignment to qmake, the tests fail.
Looking into the produced Makefile, I see that config.tests were lacking
the custom include and failed of course. Commenting the tests the build
is fine.
Is this intended behaviour? I would expect the tests use the same
include path settings as the actual builds. Otherwise a test wouldn't
make much sense, would it?

Did I do something wrong or is it worth a bug report?

Cheers Roland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20141030/1d8c68a3/attachment.html>


More information about the Development mailing list