Commit Graph

39957 Commits

Author SHA1 Message Date
Simon Hausmann
8fa646dbe2 Add basic support for compiling applications with qmake
* Generate module .pri files
* Generate qconfig.pri
* Propagate MODULE_CONFIG from the .pro files

This enables the basic use-case of simple application builds that for
example use the moc. Omitted from the patch is support for private
module configurations, prl files (should we do this?) and possibly more
hidden gems that need to be implemented to for example support building
Qt modules with qmake.

Task-number: QTBUG-75666
Change-Id: Icbf0d9ccea4cd683e4c38340b9a2320bf7951d0d
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-31 12:53:09 +00:00
Simon Hausmann
fc6d4af08d Fix Android build
Make sure that we can qplatformdefs.h.

Change-Id: I781fe77d1332ab97b8711e25cc819862ccf28fd0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-29 14:27:22 +00:00
Simon Hausmann
c965137448 Fix build against sysroots
Toolchain files from sysroots (such as Yocto or Android) typically set
the CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to ONLY to ensure that no external
packages are accidentally found. Similar to how we discover the Qt tools
packages for cross-compiling, we need to temporarily change the mode to
BOTH to locate our build internals.

Change-Id: Ib4374ee4a974379213218b7ec430637857ed02e7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-29 14:21:48 +00:00
Simon Hausmann
c9c5ca9997 Fix linker flag detection on Android
Since LINUX is not set when targeting Android, we must extend these
conditions manually.

Change-Id: Ie78167d452e0806bfa64773c1e311a99f4a28f8c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-29 13:28:35 +00:00
Simon Hausmann
bcca649440 Fix architecture detection when targeting plain arm
We record extra CPU features such as neon, etc. in the sub-architecture
field, which may very well be empty. Allow for that and avoid cmake
warnings about indexed string access beyond the string boundaries.

Change-Id: I63e61c6427d156180039b8ac6f5b0f5f55c36ee8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-29 13:28:30 +00:00
Leander Beernaert
d908e0a47d Fix uncessary relative dir suffix in pro2cmake.py
When we replace the PWD key from qmake files and both the base and
current directory are the same, there's no need to add an extra './' to
the current working directory.

This also fixes a unit test in qtsvg as it requires the passed in path
to match exactly to the one outputed in the log files.

Change-Id: Ide9ca6a70493e8039d3af84a9e576d8f6a313f2a
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-29 08:58:52 +00:00
Alexandru Croitor
9864ff22aa Optionally include ${repo}Setup.cmake file in qt_build_repo_begin
This is meant to keep repo specific functions and macros that should
not pollute QtSetup.cmake. For example QtDeclarativeSetup.cmake
will automatically be included when building qtdeclarative.

Change-Id: I4d26cbb1a7ffafb153a888fc918af337000d5e41
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-05-28 17:03:55 +00:00
Alexandru Croitor
c3663076dc Fix syncqt call and injected file forwarding and add comments about it
The location of the forwarding headers when not yet installed, depends
on whether we do a prefix or non prefix build.
In a prefix build the /include folder should be in the current repo
build dir.
In a non prefix build, it should be under qtbase/include.

But the actual generated files to which the forwarding headers point,
are always in the current repo build directory.

Also syncqt needs to know both the current repo build directory
specified by -builddir, and the output directory specified by
-outdir.
In a prefix build, both are the same.
In a non-prefix build, builddir should be the current repo build dir,
and outddir should be qtbase's build dir.

Also for non-qtbase repo build directories (like declarative),
examples need to have the current_repo_build_dir/include directory
as an include path, so that framework style includes like
 #include <QtQml/QQmlEngine>
work correctly.

Take care of all that, and add a bunch of comments explaining the whole
injected / generated headers interaction.

Change-Id: I612ad7549ce499c4979ee994e998b558716d45ca
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-28 17:03:45 +00:00
Alexandru Croitor
3122e7c01a Fix qt_build_repo to be more robust
Check for the existence of CMakeLists.txt files before trying
to call add_subdirectory on examples, tests and src folders.

Change-Id: I7be76de5f7520c1dd181c610fd1dc2200ac74672
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-05-28 17:02:38 +00:00
Leander Beernaert
d843bceb0c Add Library Mapping for QtNetworkAuth
Added library mapping information for any projects referencing the
QtNetworkAuth project.

Change-Id: I9c4309d26ee9895f94995d4844ffde4ee4444766
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-28 15:07:25 +00:00
Alexandru Croitor
499771f3ea Enhance the porting scripts with some new functionality
These were some hard requirements while porting QtQml .pro files so
that the generated CMake code is syntactically correct and the result
buildable.

This include handling of a few more different condition scopes
and disabling the c++ make_unique feature test.

Change-Id: Iae875ffaf8d100296e8b56b57d076455e5d72006
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-28 14:04:40 +00:00
Alexandru Croitor
cae4c5c2ce Add some qtdeclarative related functions to QtBuild
QtQml uses QLALR to generate a grammar, but the qmake qlalr feature
seems to be a general one, so the corresponding CMake implementations
are kept in qtbase for now.

Change-Id: Ibe916878b18155ddc5bb08793dd2075ebfa8f282
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-05-28 14:04:31 +00:00
Simon Hausmann
f96778dee2 Enable export of compile commands database
For developer builds, enable the compile commands database by default.
This allows Qt developers to use tools that utilize these (such as
clang-tidy, etc.) without any extra setup.

Change-Id: I79d70ef7dbe7c59864e93593c75f9ff6cd67c2ce
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-05-27 18:21:00 +00:00
Alexandru Croitor
cbb143e9f1 Improve configurejson2cmake.py to handle non-compliant qmake JSON
Some configure.json files contain new lines inside quoted strings,
which is not conformant with the JSON spec.

Add a new json_parser python module which uses pyparsing to preprocess
the json files to remove the new lines inside the quoted strings, and
then hands over the preprocessed content to the regular json module.

Change-Id: I5f8938492068dda5640465cc78f5a7b6be0e709a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-05-27 07:48:51 +00:00
Simon Hausmann
e4f0680c4a Fix static zstd linkage
Upstream's cmake build system installs libzstd_static for static builds,
so look for that as well. Now we can also recommend installing it via
vcpkg.

Change-Id: I0ba4c45ecd90bf7b1c9f1e5f84a440caa976a23c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-24 14:19:51 +00:00
Simon Hausmann
13e9d88e56 Update vcpkg instructions
Let's recommend vcpkg only on Windows for now. That's best maintained
and works best there.

Change-Id: Ied06b6a3cb26d9e56d3f525c1d5a410223754fba
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-05-24 14:16:54 +00:00
Alexandru Croitor
bfed22e3b7 Remove all line continuations when processing qmake syntax
We constantly had to adjust the qmake grammar to handle line
continuations (\\\n) in weird places. Instead of doing that,
just do a preprocess step to remove all the LCs like we do with
comments, and simplify the grammar not to take into account the
LCs.

From some manual testing it doesn't look like we get any regressions.

Change-Id: I2017d59396004cf67b6cb54977583db65c65e7d3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-23 14:19:22 +00:00
Alexandru Croitor
a2e0f19b61 Make debug token output actually work for the pro2cmake qmake parser
setName() and setDebug() need to be called on a parser element before
the parser element is used as a sub-element in another parser element,
otherwise the debug output is not shown.

Hence the "iterate over all locals" approach works only partially.
Instead add a new decorating function add_element() for the
construction of each parser element, and make sure to enable debugging
inside that function.

Unfortunately there is no clean way to avoid duplicating the parser
element name both in the local variable and in the function argument.

Change-Id: Iaa9ed9b7dbb22ec084070b9c049cf51c841d442c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-23 14:19:11 +00:00
Alexandru Croitor
6dfeb81bcb Improve qmake syntax parser in pro2cmake.py
Some qtdeclarative pro files caused exceptions when trying to parse
them using the script. This included the following:
- handling conditions divided by newlines and backslashes
- handling conditions that have no scope

The parser has been fixed to deal with those cases and relevant
tests were added.

After the change, all qtdeclarative project files are parseable by
the script.

Change-Id: Ib9736423f7fb3bcc1944b26cfb3114306b4db9a7
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-23 14:17:46 +00:00
Alexandru Croitor
80271e8280 Improve qmake parser debug output in pro2cmake
Override the default debug actions to be decorated with proper
indentation for easier reading.

The setup only has to be done once, and not on each QMakeParser
creation.

Change-Id: If5f965b462c782c654ee8ebfdd33570e8f94b084
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-23 14:17:34 +00:00
Alexandru Croitor
837f592c5e Regenerate more projects that are using uic
Amends fa21d29b75

Change-Id: I54d9cca77122d61016e06c4057949747b19472bb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-23 08:59:35 +00:00
Alexandru Croitor
fa21d29b75 Rerun pro2cmake on projects that use .ui files
Task-number: QTBUG-75875
Change-Id: I95109b07fc4a6e09fe7911a21fc5f27f2c895d77
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-05-22 14:58:24 +00:00
Alexandru Croitor
0425ee0610 Change the default enabled AUTOGEN tools list to contain only moc
Before this patch we enabled AUTOMOC, AUTORCC, AUTOUIC for all targets
that did not opt out.

Aside from being wasteful from a performance point of view,
this also caused issues when trying to build qtimageformats which
does not depend on Widgets which is the package that exposes uic.

To avoid this, enable only AUTOMOC for all targets by default, and
UIC and RCC can be opted in via the ENABLE_AUTOGEN_TOOLS option.

To facilitate this some refactoring had to be done, like moving some
common setup for all autogen tools into a separate call, and making
sure that extend_target understands the autogen options, because some
ui files are only added conditionally.

Also the conversion script has been adapted to output the
ENABLE_AUTOGEN_TOOLS option whenever a .pro file contains at least
one FORMS += foo assignment.

Note that we don't really use AUTORCC while building Qt, so nothing
opts into that at the moment.

Task-number: QTBUG-75875
Change-Id: I889c4980e9fb1b74ba361abed4044737f8842ea4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-22 14:58:08 +00:00
Jędrzej Nowacki
87bb219a72 Move some configure arguments from qt5 configuration file
These arguments are specific to the build and changes to them are _not_
affecting configuration.

Change-Id: I8c46a0dbea8978f13e78c5cb8f41987f4fde09c8
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-05-22 14:52:01 +00:00
Alexandru Croitor
8aab0cfaba Reset main_module_tool_deps in QtPostProcess
The variable was not reset when interating through all the Qt targets,
which resulted in QtTest wronlgy depending on QtWidgetTools.

Task-number: QTBUG-75875
Change-Id: I24da495fa53e9163992a1ed53f5cd7e1c6da5e51
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-22 14:31:23 +00:00
Jędrzej Nowacki
d932ac44df Adjust timeouts in module_config.yaml
Signing package may take more then 10s while calling echo really
should take less then 60s ;-)

Change-Id: I1798981492d1467bb8b20099ea705b08ea9b0914
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-05-22 14:16:07 +00:00
Jędrzej Nowacki
b611936ca8 Cleanup module_config.yaml
The number of CPUs is set implicitly by MAKEFLAGS and NIJAFLAGS.

Change-Id: Ie9296f9a7872253c696536d7b3d6235c7881d42b
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-05-22 14:14:54 +00:00
Alexandru Croitor
c7fd10a022 Allow building the tests directory as a standalone CMake project
At the moment, Coin builds tests as a separate qmake invocation
against an installed Qt. We need to support the same with CMake.

Change the tests subdirectory to be a standalone CMake project when
CMake does not detect an existing QtTest target while processing the
subdirectory. If the target exists, it means we are building the whole
repo, if the target does not exist, we need to call find_package
to find the installed Qt.

Refactor and move around a few things to make standalone tests build
successfully:
- add a new macro to set up paths to find QtSetup
- add a new macro to find all macOS frameworks
- add a new macro to set up building tests
- add a new macro that actually builds the tests
- export the INSTALL_CMAKE_NAMESPACE value into the BuildInternals
  Config file
- export the CMAKE_BUILD_TYPE value, because a test project doesn't
  have a .git subdir and thus defaults to be built in Release
  mode, even though qtbase might have been built in Debug, so to
  avoid the mixing, the propagate the build type
- stop overriding INSTALL_CMAKE_NAMESPACE and
  QT_CMAKE_EXPORT_NAMESPACE inside QtSetup if they are set, because
  the tests project doesn't specify a major version, and if we
  override the values, the moc / uic targets don't get the correct
  major version prefix and configuration fails

Change-Id: Ibdb03687302567fe325a15f6d1cb922c76240675
Fixes: QTBUG-75090
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-22 11:12:54 +00:00
Alexandru Croitor
774088b677 Build and use double-conversion library shipped by Qt when needed
Some Linux distros might not have a double-conversion library. Because
it is such an essential library for QtCore, compile and use the
the copy of the library bundled with Qt.

Also change library name to be a proper target with double colons,
so that in case the library is not found for some reason, the CMake
configure step would fail, instead of failing at link time.

Task-number: QTBUG-74133
Change-Id: I9f3b4298ae6e952891a7a89541d46878176bf1ce
Fixes: QTBUG-75891
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-22 07:25:41 +00:00
Alexandru Croitor
4e7756a6cd Add a few more 3rd party libraries to helper.py
Handle a few more libraries that are used in qtimageformats repi.

Change-Id: Ia3b9a845bc6cb8ce98a477b9355011bbadc32c1a
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-21 15:28:24 +00:00
Simon Hausmann
f8e4f94a14 Avoid accidental clash with .qrc files that are checked in
Add a prefix for generated .qrc files so for in-source builds we don't
end up overwriting htem.

Change-Id: I8eef582479eb45d67585f6aab87b288393bbadb5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-21 08:35:40 +00:00
Simon Hausmann
d61ca95fc0 Simplify top-level CMakeLists.txt for modules
Implement some aspects of qt_parts.prf to simplify the top-level
CMakeLists.txt for repositories that follow the common qt structure
(src, tools, tests, examples).

Change-Id: Ia35f4e9207e92c1cf0406353561b0cc52dcb0e59
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-21 08:05:44 +00:00
Alexandru Croitor
a859cb508c Automatically install repo specific cmake find modules
Some qt modules need to find 3rd party packages for which there
are no Config files. We need to write custom CMake Find modules to
find those packages. These find modules need to be installed so that
they are used when a user consumes the Qt packages.

Automatically include and install these find modules if they exist,
as part of qt_build_repo_end().

Change-Id: I14aad35ed2999cac8bdda65ca4aeaf74d04fdb71
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-05-20 13:48:16 +00:00
Alexandru Croitor
76f5b784ce Fix the fix to correctly handle comments in multi-line assignments
The previous fix where the Grammar comment style was changed to
remove the newlines was incorrect, because if you have

 foo=1#comment
 bar=2

after the Grammar comment ignoring, it would transform into

 foo=1bar=2

which will clearly fail to parse, so the new line has to stay.

But we would still have the following case which would fail:
 foo=a \
 # comment
 b

Apparently qmake things that's the equivalent of
foo=a b

but the grammar parses it as
 foo=a \
 \n (newline)
 b

Thus the parsing fails because there's a newline and then some
weird 'b' token which the grammar does not expect.

The best fix I found is to preprocess the source, to remove
completely commented out lines.

So:
 foo=a \
 # comment
 b

gets transformed into

 foo=a \
 b

Change-Id: I2487a0dbf94a6ad4d917d0a0ce05247341e9b7da
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 13:18:11 +00:00
Alexandru Croitor
e4b8c488bd Improve configure2cmake to find_package only in certain conditions
It doesn't make much sense to look for X11 related packages on
macOS and Windows by default. Usually they would not be there, and
as a result the configuration step would show a long list of scary
not found packages, and also eat precious configure time.

Change the conversion script to allow putting conditions around
generated find_package calls.

These conditions can be manually set in the conversion script
library mapping, using the emit_if argument,
which we do for the X11 and Wayland related packages.

They are also computed by checking which features use a given library,
and if the feature is protected by a simple emitIf condition like
config.linux, the relevant library find_package call will be protected
by the same condition.

If a developer still wishes to look for all packages, they can define
the CACHE variable QT_FIND_ALL_PACKAGES_ALWAYS to ON.

The relevant configure.cmake files are regenerated in this patch.

Change-Id: I6f918a94f50257ec41d6216305dae9774933389a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 13:15:16 +00:00
Alexandru Croitor
42c8c38564 Regenerate corelib
And add the first version of the .prev file.

Change-Id: I5d8f2354f86bc279e185e31173df4aeeb6e46116
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 13:15:00 +00:00
Jędrzej Nowacki
f1d428b643 Fix typo in module_config.yaml
The command executed is jom not nmake.

Change-Id: Ieae487a3b50884d901ca2a431f3c3ea615a80e8b
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-05-20 11:42:27 +00:00
Alexandru Croitor
fbbfbcf360 Regenerate sql
Change-Id: I495678a5c77557ae297b7dd028f1253ebcce9ef7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:38:07 +00:00
Alexandru Croitor
8cf45a6848 Regenerate printsupport
No .prev file cause it's a clean conversion.

Change-Id: I33e02dccb9c8da336891c36cd0e1454d29152065
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:37:51 +00:00
Alexandru Croitor
17865396bf Regenerate platformheaders
And add the first version of the .prev file.

Change-Id: I87d33dd175ddcbccd202f068f469f260944e4ada
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:37:30 +00:00
Alexandru Croitor
a937632258 Regenerate concurrent
Change-Id: Iccb993e7e38dc04be2e3960d0f49ddf241c675e7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:36:50 +00:00
Alexandru Croitor
0711d497d9 Regenerate dbus
And add the first version of the .prev file.

Change-Id: I8375591a8cfc087291774370b8308c808dd5f0b4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:36:37 +00:00
Alexandru Croitor
79d820f8a9 Regenerate opengl
And add the first version of the .prev file.

Change-Id: I96f27bce6d1c3107fb8c7b3758b29cfd944cf374
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:35:53 +00:00
Alexandru Croitor
b1746c1da1 Regenerate network
And add the first version of the .prev file.

Change-Id: I9d298e483032081a02a63b4f887f4d682ea7ccd4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:35:38 +00:00
Alexandru Croitor
7f68437296 Regenerate widgets
And add the first version of the .prev file.

Change-Id: I901c413997dcc497da5e45b1675726180c84e709
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:35:19 +00:00
Alexandru Croitor
a701be5652 Regenerate gui
And add the first version of the .prev file.

Change-Id: Ie5fba879b8fdb670d4331d4df524ffb5bad3303e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:34:54 +00:00
Alexandru Croitor
846adfe079 Handle the new cmdline config feature in pro2cmake
cmdline implies console, so use that also to determine if a binary
should get a GUI flag.

Change-Id: I084e0a45785df96a7dc2c101af5305fbb39efbc3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:23:14 +00:00
Alexandru Croitor
826821658d Workaround fix in pro2cmake Operation __init__ method
There are still call sites that call Operation.__init__ with a string
instead of a list. Restore the handling of such a case.

Amends 5fe8a38af3

Change-Id: I2a4d5c5cb5b460bf02b6da02d42d8cc8d5eb4192
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:18:56 +00:00
Alexandru Croitor
c454e622a1 Don't exclude QtCore from dependencies when generating modules
and plugins.

src/network/network.pro for instance depends on core-private, but
because we ignore adding QtCore as a public dependency, the exported
Config file for Network doesn't depend on QtCore anymore, so if a user
only links against Network, they won't automatically link against
Core.

Change-Id: I4a60ffae7e071927360b8ccf6b1b7479ab391060
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:15:31 +00:00
Alexandru Croitor
e0a6e9f3aa Fix parsing qmake assignments that have comments in between
For some reason the python comment regex that we used does not ignore
the line break at the end of a comment line.

This caused issues when parsing multi line assignments with comments
in between.

Use our own regex for comments to circumvent the issue. It was found
while trying to port the qtimageformats repo.

Added a pytest as well.

Change-Id: Ie4bbdac2d1e1c133bc787a995224d0bbd8238204
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-17 13:31:03 +00:00