Review Request 129756: Upgrade ECM version to 5.23.0.

Shaheed Haque srhaque at theiet.org
Tue Jan 3 11:13:42 UTC 2017


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129756/
-----------------------------------------------------------

Review request for Extra Cmake Modules.


Repository: extra-cmake-modules


Description
-------

Upgrade ECM version to 5.24.0.


Use "${BIN_INSTALL_DIR}/data" for DATAROOTDIR on Windows.

Summary:
Instead of using "share" use "${BIN_INSTALL_DIR}/data" on Windows,
this is the location provided by QStandardPaths for GenericDataLocation
on Windows.

Reviewers: dfaure

Reviewed By: dfaure

Subscribers: kfunk

Differential Revision: https://phabricator.kde.org/D1873

Integrate relative library paths to APK

Needed for many unit tests to add them to APK files.

REVIEW: 128175

Upgrade ECM version to 5.25.0.


Appstream data changed its preferred location

Update preferred path of appstream data files to /usr/share/metainfo

Requires modern versions of appstream metadata generators.

FEATURE
REVIEW: 128174

Make sure ECMGeneratePriFile.cmake behaves like the rest of ECM

In KDEInstallDirs we have some code to make sure that qmake is asked when
the project shares the prefix with the installed Qt, to make sure that if
something was changed in the distribution it would reflect on the projects.

Make sure PRI files are installed using the same reasoning.

REVIEW: 128427

Add a fallback method for query_qmake() when there's no Qt5 installation

Addresses its usage on systems where Qt5 isn't installed, it allows for
modules using it to decide what they should do.

REVIEW: 128488

Fix inclusion when there's no Qt5

ECMQueryQmake will fail as it's designed to only work with Qt5. We
don't want to terminate the execution there, just to spit a warning
and leave. If we suggest qmake-qt5 as a command, we'll end up performing
the call anyway.

This will fix the ExecuteCoreModules test under latest-qt4 build.

trivial: Fix documentation


Create a test that validates projects' appstream information

At the moment, we're validating it in build.kde.org, but I feel it will be
easier for developers to test if we do so locally.
This patch does it by seeing which *.appdata.xml files are being installed
and validating them. This way we can keep it generic for all KDE projects.

REVIEW: 128533

Document ARGS variable in the create-apk-* targets

Explains how to install and sign apks

REVIEW: 128634

Fix the harmless warnings

GIT_SILENT

add full license text REVIEW: 128780


The default level for logging categories should be Info rather than Warning.

The whole point of Info is to be used by apps who want to print out some
info for the user, not disabled by default.

Example use case: ksmserver could output the name of the autostart
files it's starting, so user can check their own scripts are started,
and associate any errors with the corresponding script.

In other words:
Debug = debugging for the developer
Info = debugging for the user :-)

This commit shows the benefit of having a central place for changing this
(many category definitions do not use this macro though)

REVIEW: 128232

Android.cmake: fix typo in comment


ecm_process_po_files_as_qm: Skip fuzzy translations

REVIEW: 128823

Upgrade ECM version to 5.26.0.


Add .arcconfig file


Upgrade ECM version to 5.27.0.


Make sure we don't add the appstream test twice

Guard variable we used to ensure this doesn't happen was not scopped to
parent and hence was being reset when funciton returns

REVIEW: 128917

Teach KDECompilerSettings about clang-cl, a mode of Clang compiler that simulates MSVC.

REVIEW: 128779

Revert "Teach KDECompilerSettings about clang-cl, a mode of Clang compiler that simulates MSVC."

This reverts commit 4b8e8dcc8856d8f438860783e7641d02d1c05630.

Upgrade ECM version to 5.28.0.


Add the rules_engine and sip_generator

These files process C++ headers with libclang and python-clang bindings,
using the AST to generate SIP files for PyQt binding library generation.

The design allows for further extensions which can process other
artifacts found in headers.  This iteration of the design is a simple
minimum which suffices to generate headers for KItemModels and some
other libraries.

Add Qt5 Ruleset.

The ruleset is used to transform or omit artifacts in C++ header files
when determining the SIP content to generate.  Some content common to
all Qt-using libraries can be processed by using the rule set present
here.  For example, most Q_METATYPE internal declarations should be
discarded.

Add a sip wrapper

When sip is executed it is passed one .sip file.  However, it uses that
to generate multiple cpp source files, one per class in the sip file.

Buildsystems need to know the outputs of commands, so this does not work
well as the output can't easily be predicted.

So, create a unity build of all files to compile into the python module.

Add the PythonModuleGeneration module

This can be used by KF5 libraries to generate python 2 and 3 bindings.

Don't require the python bindings dependencies for ECM

It should be optional.

Make KDECMakeSettings work with KDE_INSTALL_DIRS_NO_DEPRECATED

REVIEW: 128806

Add ecm_win_resolve_symlinks module.

REVIEW: 128112

Print path to Qtcoremod.sip file if there is a problem


Add missing includes

Don't rely on transitive inclusion

Reduce the CMake minimum required

This works with 3.2, and I don't remember why I made it 3.3.

Only add the test if python is found


Skip Python bindings test if PyQt isn't installed


Upgrade ECM version to 5.29.0.


Use commits.kde.org in links instead of now outdated quickgit.kde.org

also correct link to clazy's README.md (former README)

Use the generic redirect and add the doc link

https://commits.kde.org/<repo>?path=...&branch=... is guaranteed to
redirect to the proper repository browser.
Add a link to the generated ECM documentation.

REVIEW: 129367

Minor: Remove extra new line

Triggered my OCD

Fix typo

GIT_SILENT

Find the correct path to the cmake command

Summary: When running tests with hardcoded `cmake`, it get's suffixed to the project's build path. Setting it with an absolute path ensures using the right cmake binary.

Test Plan: Compiled, installed. Used to generate tests for kdev-embedded. `cmake` binary is now prefixed with the absolute system path, and no longer with the project's build dir.

Reviewers: kfunk, #frameworks, apol

Reviewed By: kfunk, apol

Subscribers: kfunk

Differential Revision: https://phabricator.kde.org/D3568

Accept AppleClang as an alternative to Clang

Apple's clang v3.1 corresponds to clang 3.1 and started following the
Xcode versioning scheme from 4.4 onwards (though loosely). An overview
of the version correspondance can be found here:
https://gist.github.com/yamaya/2924292

Never use -Wl,--no-undefined on Mac (APPLE).

While unusual it is not impossible to use GCC on Macs, esp. not when
using older OS X versions. Intel also makes compilers for Mac, so it may
in fact be better to rewrite the check ((GNU or Clang or Intel) IF NOT
(APPLE or WIN32)).

Upgrade ECM version to 5.30.0.


Document usage of gnustl_shared with Android toolchain

Reviewers: #frameworks, cordlandwehr, apol

Reviewed By: apol

Differential Revision: https://phabricator.kde.org/D3732

Ignore host libs/includes/cmakeconfig files in Android toolchain

Summary:
Currently (since 123d0d14017a25fb387efd8fe3c2c1323f9c3815) any
find_library() and find_path() calls look both at the host and the toolchain
paths, which often results in includes and/or libraries wrongly being picked
up from the host system, which then results in a failed build.
CMake config files have always been also looked for on the host, which
most often also is not wanted and resulting in a failed build.

This patch fixes that by changing the mode for finding libraries,
includes & packages to ONLY (again), as also recommended in the
cmake-toolchains documentation.

While before CMAKE_PREFIX_PATH was recommended to let cmake e.g.
discover the Qt5 for Android libs, this patch wants a custom
variable ECM_ADDITIONAL_FIND_ROOT_PATH to be used instead.
Reason is that CMAKE_PREFIX_PATH would be subject to the root
handling, while here instead the root paths themselves are
wanted.
This patch does not add backward compatibility for still passing
the Qt5 install prefix via CMAKE_PREFIX_PATH, as there are not
that many users known yet and the old code did not work for many
anyway, so the extra code hassle is not worth it. Instead the few
build instructions would need to be updated (and should ask to use
latest ECM in any case).

Test Plan:
Building Marble now works without trying to use stuff from the
host system.

Reviewers: #frameworks, #gcompris, #minuet, mutlaqja, sandsmark, cordlandwehr, nienhueser, apol

Reviewed By: cordlandwehr, nienhueser, apol

Differential Revision: https://phabricator.kde.org/D3646

Fix missing :: in API docs to trigger code styling


Add Clang Sanitizer CMAKE_C_FLAGS for C project

BUG: 374195
REVIEW: 129708
Reviewers: #extracmakemodules, alexmerry
Reviewed By: dfaure

Revert "Add Clang Sanitizer CMAKE_C_FLAGS for C project"

This reverts commit 1e7f3d5ba91e79a47d69a48e8f991ee0e7794b53.

It's breaking compilation of anything that uses pthreads

Enable colored warnings in ninja's output

Summary:
Colored compiler warnings in ninja output only work with the
`-fdiagnostics-color=always` flag.
See https://github.com/ninja-build/ninja/issues/814 for a rationale.

This commit adds such flag in ecm for gcc >= 4.9 and clang >= 3.5,
and only if the CMAKE_GENERATOR is Ninja.

Test Plan: ninja+gcc and ninja+clang now show nice colored compiler warnings.

Reviewers: #frameworks

Differential Revision: https://phabricator.kde.org/D3733

Enable -Wsuggest-override for g++ >= 5.0.0

REVIEW: 129724

Add Clang Sanitizer CMAKE_C_FLAGS for C project

Test plan: Clang and GCC for simple C project, kcoreaddons, kjs, etc.

BUG: 374195
REVIEW: 129708
Reviewers: #extracmakemodules, alexmerry
Reviewed By: dfaure, aacid

appstreamtest: handle non-installed programs

Summary:
If you just built the software without installing it and then run ctest,
this will systematically fail while trying to read install_manifest.txt.
With this patch this case is now handled gracefully, not forcing to
install to have a test suite which fully passes.

Reviewers: #frameworks, apol

Differential Revision: https://phabricator.kde.org/D3860

Fix the extraction of parameter initialisation by reverting a change not tracked in this repository. Without this change, we get for example:

sip: .../kfontutils.sip:14: Compulsory argument given after optional argument

Where the .h file says:

============
qreal KGUIADDONS_EXPORT adaptFontSize(QPainter &painter,
                                      const QString &text,
                                      qreal width,
                                      qreal height,
                                      qreal maxFontSize = 28.0,
                                      qreal minFontSize = 1.0,
                                      AdaptFontSizeOptions flags = NoFlags);
============

while the SIP file says (note the flags parameter is missing its initialiser):

    qreal adaptFontSize(QPainter & painter, ..., double minFontSize = 1.0, QFlags<KFontUtils::AdaptFontSizeOption> flags);

With this change, the SIP file says:

    qreal adaptFontSize(QPainter & painter, ..., double minFontSize = 1.0, QFlags<KFontUtils::AdaptFontSizeOption> flags = NoFlags);

There are many instances of this issue, but in only a handful of cases such
as this example from kguiaddons, the resulting SIP code does not compile. That
is the subject of a pending fix local to kguiaddons.


Diffs
-----

  .arcconfig PRE-CREATION 
  CMakeLists.txt 78e5985cf737db81f86d998bfc422bb7b6b308a6 
  README.rst f3e98aab2582bd4700d6fdd7204f94960201ce0d 
  docs/CMakeLists.txt 1f307855f06de060d0e5fb3e36b0c97b29177603 
  docs/manual/ecm-developer.7.rst 3ed3f786db2918d101c68937808da19f40e9d026 
  find-modules/FindPythonModuleGeneration.cmake PRE-CREATION 
  find-modules/Qt5Ruleset.py PRE-CREATION 
  find-modules/rules_engine.py PRE-CREATION 
  find-modules/run-sip.py PRE-CREATION 
  find-modules/sip_generator.py PRE-CREATION 
  kde-modules/KDECMakeSettings.cmake dd37e7f1e36babd1158a735ab571f65594aad5fc 
  kde-modules/KDECompilerSettings.cmake 6cecefd117746b66d7c8093af8f300b64068e3c8 
  kde-modules/KDEFrameworkCompilerSettings.cmake e41003d6b4781b99b478c32a9b915456b8dca2a3 
  kde-modules/KDEInstallDirs.cmake d9c3b78123746b400da02268d61aec54c29d83f9 
  kde-modules/KDEPackageAppTemplates.cmake c0eb8b9066df046f3de457f9b3d1f4104073a459 
  kde-modules/appstreamtest.cmake PRE-CREATION 
  modules/ECMAddAppIcon.cmake ca643142be28321c5404b849392a4504776bc4f6 
  modules/ECMAddTests.cmake e9e2fc53852ec245a76fd586aab9f1472a54f0c7 
  modules/ECMCoverageOption.cmake 4c1db9dee65be0a78fce6f3bc748971e1762b7f3 
  modules/ECMCreateQmFromPoFiles.cmake b419472318df5c0ab8df329188c9367031fe8968 
  modules/ECMEnableSanitizers.cmake aa7092df181d20193032fccc693529c59ea5fc35 
  modules/ECMFindModuleHelpers.cmake 6a08b04e3d02b3db1e44c2926c52f3848825a546 
  modules/ECMGenerateHeaders.cmake cefc82dfb782d978d96892e0e68d830dde1ffd32 
  modules/ECMGeneratePkgConfigFile.cmake eaef7b416773b269b77a08a89ba87d04ce5a22d6 
  modules/ECMGeneratePriFile.cmake af4b8771bc969b61f81e59bfae3c8c9609295a4f 
  modules/ECMInstallIcons.cmake 730bde7ace79cf28d9f470cb8a8cf0413d9f41a1 
  modules/ECMMarkAsTest.cmake 9027bf30d9123b4b3eeac4d815b3bb4ce7c99679 
  modules/ECMMarkNonGuiExecutable.cmake 59737d4c239500f3ad9b0604d98f3a6363f153b9 
  modules/ECMOptionalAddSubdirectory.cmake 2b890055450008e6ec38102b83fd14c4cbdab7b9 
  modules/ECMPackageConfigHelpers.cmake d1d0408f42482df4fda661ff3577939048d503d3 
  modules/ECMPoQmTools.cmake 2547df1a571ccb6e8a111e152dfeb8bed4f69fc9 
  modules/ECMQtDeclareLoggingCategory.cmake c125949a46c4b83544413f23d5e04b2d8ea2c4cf 
  modules/ECMQueryQmake.cmake 8f4cf177ac41883d4c6b0648bd107d091fde6ff5 
  modules/ECMSetupVersion.cmake 33d0ada154fad1602fc14ecedf667fc99a60e92c 
  modules/ECMUninstallTarget.cmake 1e9bb91e270b0c355d0af686fe63d748a872527b 
  modules/ECMUseFindModules.cmake 0a8a40fb9dc052ca8c943c99e76c57774f098e8f 
  modules/ECMVersionHeader.h.in ee033cd2ced28f21cce24679977edcdd477b57ec 
  modules/ECMWinResolveSymlinks.cmake PRE-CREATION 
  tests/CMakeLists.txt a3fbe2e01c9a1ef7fb69ff3657d5b717de0ead9b 
  tests/ECMToolchainAndroidTest/CMakeLists.txt PRE-CREATION 
  tests/ECMToolchainAndroidTest/main.c PRE-CREATION 
  tests/ECMToolchainAndroidTest/testlinkfile/CMakeFiles/testtarget.dir/link.txt PRE-CREATION 
  tests/ECMToolchainAndroidTest/testlinkfile/outputfake.json PRE-CREATION 
  tests/GenerateSipBindings/CMakeLists.txt PRE-CREATION 
  tests/GenerateSipBindings/cpplib.h PRE-CREATION 
  tests/GenerateSipBindings/cpplib.cpp PRE-CREATION 
  tests/GenerateSipBindings/rules_SipTest.py PRE-CREATION 
  tests/GenerateSipBindings/testscript.py PRE-CREATION 
  toolchain/Android.cmake 20e65f87ac5a4fe9a0089c596d1d392214053817 
  toolchain/specifydependencies.cmake e01c61a7177c5868f26cb6233d9cb44fc757b6e3 

Diff: https://git.reviewboard.kde.org/r/129756/diff/


Testing
-------


Thanks,

Shaheed Haque

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20170103/e3ef6524/attachment-0001.html>


More information about the Kde-buildsystem mailing list