Simplify code a bit and add a test for line continuation fixup.
Change-Id: If865bc94d7d419c65d3280b5f9613ebc0d3db74a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Handle for loops with a single line of instructions and add a test
for that.
Change-Id: I041ae30f64abcbd3db7df29933647f047b92ede3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This broke somewhere along the way. Add a test for this.
Change-Id: I106ddff6eb86a51ef132285d1bc623f3b5cf71fb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Ignore for loops in the pro2cmake.py parser and add a unit test for that.
Change-Id: I2a0c075c45cf56f4f24ada2d53e8e8e94ce19f26
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Warn on broken line continuation in .pro-files, but fix up the issue
and proceed.
Change-Id: Ibe68011b312bcea25620ce790a0b44b2983fbd88
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Two changes were needed:
- correctly link against frameworks
- use qcore_mac.cpp instead of qcore_mac_objc.mm, because we don't
link against AppKit
Change-Id: Ibd9d6d367a7fcdf7dce277c1b06d36c491294eeb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Improve the code that simplifies conditions to take "OS families"
into account. E.g. if a system must be ANDROID, then it is redundant
to express that it is NOT APPLE_OSX.
Change-Id: Ib7e62726c309bf84b9e5e0d6a6e3465511db0ead
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Parse conditions more exactly as before, enabling proper handling
of else scopes.
Change-Id: Icb5dcc73010be4833b2d1cbc1396191992df1ee4
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Since the dependency on moc is in CorePrivate (o Core) we need
the target to depend on it otherwise cmake will try to use moc before
it is built.
This is because what we do with cmake is say "moc is in this
path, you can use it", but it's actually not built yet so
we need to depend on a target that depends on moc directly otherwise
cmake will trust us and try to use a cmake that doesn't exist and just
hang forever when running make -jN
Change-Id: Icf55c62092fd3fd3754a4f4f28c8c313bf374615
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
And add the eglfs_x11 plugin
We need to actually try to compile the test as the comment it it says
that having x11 and egl is not enough since sometimes they are actually
incompatible
Change-Id: If6bdc08c21b91fa9c41663f2fa653fd59e5ddd2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Only has warnings for now
Next to come is the support for developer-build and enabling Werror
Change-Id: I8070dc06eb439c2a03007cce975c8147ff7e1582
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Because the default "empty" CMAKE_BUILD_TYPE is a weird default
Change-Id: I5768f67aa85dce4108e421d2f4eacdfb1cb5beb0
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
This amends d885226544.
Change-Id: Ia7b2fb6e0e762c73d3c0775cdd106c1dec646ab2
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Use the same approach as with qmake, by using readelf -l /bin/ls and
then a regular expression to extract the program interpreter path. It's
a little simpler in cmake because we can avoid the perl dance and quotes
and just use cmake's built-in regular expression matching.
This change also excludes static builds, as with qmake.
Change-Id: I699e166c4b38b3fe98e6390316206109ad6363f9
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Upstream commit 7c64db9568296e1caafcfd7163cea3ab1b1626ae fixed the
suffix path checking and thus the build on FreeBSD.
Change-Id: I0cceeac0639c2899c617ffd6359098d2154acf5b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Pass -DQT_USE_CCACHE=ON to enable the use of ccache. This avoids having
to set up symlinks, which is useful when cross-compiling against
different targets.
Change-Id: I023fff105baaa538730997948aa122d2678887ce
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Don't try to build uic but instead import it. This is done centrally now
in add_qt_tool.
Change-Id: I241fbb924de68549e9c0320e157351bd7b1bf5c3
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
so use map_qt_library instead of map_qt_base_library
Change-Id: I4dd0097fff3ffd9ec4aad36d11d79ea23a08cb90
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Makes sure qobject.cpp.o also sees -DQT_BUILD_CORE_LIB
Change-Id: I2aaf1cec62eeab07bbec6e4135bbe144d4ae7fba
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Public interface libraries of the private target need to be first looked
up via `find_dependency(...)` in the CMake config files as well.
This patch is just changing the foreach() loop and defer the package
config file generation.
Change-Id: Iecaf7f778379b526f12ac6a42e76d714d9349b2c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Lifetime of the variable is bound to the function body. Use a CACHE
variable to escape it (and to speed up future calls to the function).
Change-Id: I2d164a1c94e64cc652e65c1eea0522f3d911ad82
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
... when QtBuild.cmake is being included from another Qt module
Change-Id: Ia55e03422cc84a56dd9eac640621e5b2ee9681bd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The ECM version now also does a compile test, which was the only real
"functional" difference.
Change-Id: I1d5cd590359feba7c7a38ff374992349d5943070
Reviewed-by: Volker Krause <volker.krause@kdab.com>