commit extra-cmake-modules for openSUSE:Factory
Hello community, here is the log from the commit of package extra-cmake-modules for openSUSE:Factory checked in at 2017-01-31 11:54:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/extra-cmake-modules (Old) and /work/SRC/openSUSE:Factory/.extra-cmake-modules.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "extra-cmake-modules" Changes: -------- --- /work/SRC/openSUSE:Factory/extra-cmake-modules/extra-cmake-modules.changes 2016-12-17 11:02:33.818097057 +0100 +++ /work/SRC/openSUSE:Factory/.extra-cmake-modules.new/extra-cmake-modules.changes 2017-02-03 17:36:36.230019659 +0100 @@ -1,0 +2,7 @@ +Sun Jan 8 23:36:41 UTC 2017 - hrvoje.senjan@gmail.com + +- Update to 5.30.0 + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.30.0.php + +------------------------------------------------------------------- Old: ---- extra-cmake-modules-5.29.0.tar.xz New: ---- extra-cmake-modules-5.30.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ extra-cmake-modules.spec ++++++ --- /var/tmp/diff_new_pack.yt4oFP/_old 2017-02-03 17:36:36.653959655 +0100 +++ /var/tmp/diff_new_pack.yt4oFP/_new 2017-02-03 17:36:36.657959089 +0100 @@ -1,7 +1,7 @@ # # spec file for package extra-cmake-modules # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,23 +16,23 @@ # -%define _tar_path 5.29 +%define _tar_path 5.30 Name: extra-cmake-modules Summary: CMake modules License: BSD-3-Clause Group: Development/Tools/Other Url: https://projects.kde.org/projects/kdesupport/extra-cmake-modules -Version: 5.29.0 +Version: 5.30.0 Release: 0 Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: cmake >= 2.8.12 +BuildRequires: cmake >= 3.0 BuildRequires: gcc-c++ BuildRequires: kf5-filesystem >= 5.6.0 %if %suse_version != 1315 BuildRequires: python-Sphinx %endif -Requires: cmake >= 2.8.12 +Requires: cmake >= 3.0 Requires: gcc-c++ Requires: kf5-filesystem Provides: kf5umbrella = 4.99.0 ++++++ extra-cmake-modules-5.29.0.tar.xz -> extra-cmake-modules-5.30.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/.gitignore new/extra-cmake-modules-5.30.0/.gitignore --- old/extra-cmake-modules-5.29.0/.gitignore 2016-12-03 21:25:10.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -/build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/CMakeLists.txt new/extra-cmake-modules-5.30.0/CMakeLists.txt --- old/extra-cmake-modules-5.29.0/CMakeLists.txt 2016-12-03 21:25:10.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/CMakeLists.txt 2017-01-06 16:34:40.000000000 +0100 @@ -32,7 +32,7 @@ # Preliminary setup # -set(VERSION "5.29.0") # handled by release scripts +set(VERSION "5.30.0") # handled by release scripts if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/Jenkinsfile_master_kf5-qt5_linux_gcc new/extra-cmake-modules-5.30.0/Jenkinsfile_master_kf5-qt5_linux_gcc --- old/extra-cmake-modules-5.29.0/Jenkinsfile_master_kf5-qt5_linux_gcc 1970-01-01 01:00:00.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/Jenkinsfile_master_kf5-qt5_linux_gcc 2017-01-06 16:34:40.000000000 +0100 @@ -0,0 +1,134 @@ +#!groovy + +/* +The MIT License +Copyright (c) 2015-, CloudBees, Inc., and a number of other of contributors +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +node(linux) { + // We want Timestamps on everything + timestamps { + // First Thing: Checkout Sources + stage('Checkout Sources') { + // Actual Application Sources + checkout changelog: true, poll: true, scm: [ + $class: 'GitSCM', + branches: [[name: ${branch}]], + browser: [$class: 'CGit', repoUrl: 'https://cgit.kde.org/extra-cmake-modules.git'], + extensions: [[$class: 'CloneOption', timeout: 120]], + userRemoteConfigs: [[url: 'https://anongit.kde.org/extra-cmake-modules.git']] + ] + + // Our CI scripts + checkout changelog: false, poll: false, scm: [ + $class: 'GitSCM', + branches: [[name: 'master']], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/']], + userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/ci-tools-experimental.git']] + ] + + // Dependency Metadata + checkout changelog: false, poll: false, scm: [ + $class: 'GitSCM', + branches: [[name: 'master']], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/dependencies/']], + userRemoteConfigs: [[url: 'https://anongit.kde.org/kde-build-metadata']] + ] + + // KApiDox: For api.kde.org metadata extraction + checkout changelog: false, poll: false, scm: [ + $class: 'GitSCM', + branches: [[name: 'master']], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kapidox/']], + userRemoteConfigs: [[url: 'https://anongit.kde.org/kapidox']] + ] + + // kde-dev-scripts: For packager metadata extraction + checkout changelog: false, poll: false, scm: [ + $class: 'GitSCM', + branches: [[name: 'master']], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'ci-tooling/kde-dev-scripts/']], + userRemoteConfigs: [[url: 'https://anongit.kde.org/kde-dev-scripts']] + ] + } + // Now Prepare to Build: Get the dependencies ready + stage('Setup Dependencies') { + // Now we can determine what our dependencies are + // Then update to the latest version of the dependencies available from the master server + // Finally extract all of those dependencies in turn into the given 'installTo' directory + sh 'python helpers/prepare-dependencies.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --installTo + "$WORKSPACE/install-prefix/" + } + // Now we can configure our build + stage('Configuring Build') { + // This is delegated through a helper script to handle minor special cases like inSourceBuilds, non-CMake build systems, etc + sh 'python helpers/configure-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux '--installTo + "$WORKSPACE/install-prefix/" + } + // Finally we can build it! (Once again, through a helper) + stage('Compiling') { + // We use a helper here so we can determine the appropriate number of CPUs (-j) to build with + sh 'python helpers/compile-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux + } + // Now ensure that it installs.... + stage('Installing') { + // The helper ensures that DESTDIR and INSTALL_ROOT are set to 'divertTo' + // This allows us to capture the install at the next stage for later reuse in the Setup Dependencies step + sh 'python helpers/install-build.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --divertTo + "$WORKSPACE/install-divert/" + } + // Looks like it built okay - let's capture this for later use + // We'll also take the opportunity to extract metadata from CMake used by packagers and api.kde.org + stage('Capturing Installation') { + // First we create a tar archive of the installation which was diverted + // Then we upload a copy of that to the master server and have it publish the new archive + // Finally to save bandwidth our copy of the tar archive is moved to our local cache for reuse on later builds on this node + sh 'python helpers/capture-install.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux --divertedTo "$WORKSPACE/install-divert/" --installTo "$WORKSPACE/install-prefix/" + // Now we extract the CMake metadata and upload that to the appropriate hosts + sh 'python helpers/extract-cmake-metadata.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux + } + // Now we can run our tests + stage('Running Tests') { + // Run the unit tests for this project + // Tests are run in a basic environment (X, DBus) + sh 'python helpers/run-tests.py --project extra-cmake-modules --branchGroup kf5-qt5 --platform linux + // Collect our results + junit allowEmptyResults: true, testResults: 'build/JUnitTestResults.xml' + } + // Final thing to do: some code quality checks + stage('Checking Code Quality') { + + // cppcheck is not supported by Pipeline at the moment, so we don't run that for now + // See https://issues.jenkins-ci.org/browse/JENKINS-35096 + + // Cobertura doesn't support Pipeline either, so no code coverage publishing... + // See https://issues.jenkins-ci.org/browse/JENKINS-30700 + + // Scan the logs and publish a warnings report + step( [$class: 'WarningsPublisher', consoleParsers: [[parserName: 'GNU Make + GNU C Compiler (gcc)'], [parserName: 'Appstreamercli']], excludePattern: '/tmp/**'] ) + } + // Send an email notification of this + emailext( + to: 'ci-builds@kde.org', + body: '${JELLY_SCRIPT,template="text"}', + subject: 'KDE CI: ${PROJECT_NAME} - Build # ${BUILD_NUMBER} - ${BUILD_STATUS}!', + attachLog: true + ) +// IRC Notifications are currently not supported by Pipeline +// See https://issues.jenkins-ci.org/browse/JENKINS-33922 +// We can probably workaround this using Pursuivant and the emails Jenkins sends out +// This would allow subscribing to build notifications for IRC channels in much the same way one subscribes for Commits and Bugzilla changes +} +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/find-modules/FindPythonModuleGeneration.cmake new/extra-cmake-modules-5.30.0/find-modules/FindPythonModuleGeneration.cmake --- old/extra-cmake-modules-5.29.0/find-modules/FindPythonModuleGeneration.cmake 2016-12-03 21:25:10.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/find-modules/FindPythonModuleGeneration.cmake 2017-01-06 16:34:40.000000000 +0100 @@ -185,7 +185,7 @@ find_library(libclang_LIBRARY clang-3.${_LIBCLANG3_MAX_VERSION}) if (libclang_LIBRARY) - message(FATAL_ERROR "The max python version in ${CMAKE_FIND_PACKAGE_NAME} must be updated.") + message(FATAL_ERROR "The max libclang-3 version in ${CMAKE_FIND_PACKAGE_NAME} must be updated.") endif() set(_LIBCLANG3_FIND_VERSION ${_LIBCLANG3_MAX_VERSION}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/find-modules/rules_engine.py new/extra-cmake-modules-5.30.0/find-modules/rules_engine.py --- old/extra-cmake-modules-5.29.0/find-modules/rules_engine.py 2016-12-03 21:25:10.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/find-modules/rules_engine.py 2017-01-06 16:34:40.000000000 +0100 @@ -69,7 +69,11 @@ class Rule(object): def __init__(self, db, rule_number, fn, pattern_zip): - self.db = db + # + # Derive a useful name for diagnostic purposes. + # + caller = os.path.basename(inspect.stack()[3][1]) + self.name = "{}:{}[{}],{}".format(caller, type(db).__name__, rule_number, fn.__name__) self.rule_number = rule_number self.fn = fn self.usage = 0 @@ -86,10 +90,22 @@ return self.matcher.match(candidate) def trace_result(self, parents, item, original, modified): + """ + Record any modification both in the log and the returned result. If a rule fired, but + caused no modification, that is logged. + + :return: Modifying rule or None. + """ fqn = parents + "::" + original["name"] + "[" + str(item.extent.start.line) + "]" - self._trace_result(fqn, original, modified) + return self._trace_result(fqn, original, modified) def _trace_result(self, fqn, original, modified): + """ + Record any modification both in the log and the returned result. If a rule fired, but + caused no modification, that is logged. + + :return: Modifying rule or None. + """ if not modified["name"]: logger.debug(_("Rule {} suppressed {}, {}").format(self, fqn, original)) else: @@ -102,9 +118,11 @@ logger.debug(_("Rule {} modified {}, {}->{}").format(self, fqn, original, modified)) else: logger.warn(_("Rule {} did not modify {}, {}").format(self, fqn, original)) + return None + return self def __str__(self): - return "[{},{}]".format(self.rule_number, self.fn.__name__) + return self.name class AbstractCompiledRuleDb(object): @@ -117,7 +135,7 @@ if len(raw_rule) != len(parameter_names) + 1: raise RuntimeError(_("Bad raw rule {}: {}: {}").format(db.__name__, raw_rule, parameter_names)) z = zip(raw_rule[:-1], parameter_names) - self.compiled_rules.append(Rule(db, i, raw_rule[-1], z)) + self.compiled_rules.append(Rule(self, i, raw_rule[-1], z)) self.candidate_formatter = _SEPARATOR.join(["{}"] * len(parameter_names)) def _match(self, *args): @@ -139,7 +157,7 @@ def dump_usage(self, fn): """ Dump the usage counts.""" for rule in self.compiled_rules: - fn(self.__class__.__name__, str(rule), rule.usage) + fn(str(rule), rule.usage) class ContainerRuleDb(AbstractCompiledRuleDb): @@ -199,17 +217,19 @@ def apply(self, container, sip): """ - Walk over the rules database for functions, applying the first matching transformation. + Walk over the rules database for containers, applying the first matching transformation. :param container: The clang.cindex.Cursor for the container. - :param sip: The SIP dict. + :param sip: The SIP dict (may be modified on return). + :return: Modifying rule or None (even if a rule matched, it may not modify things). """ parents = _parents(container) matcher, rule = self._match(parents, sip["name"], sip["template_parameters"], sip["decl"], sip["base_specifiers"]) if matcher: before = deepcopy(sip) rule.fn(container, sip, matcher) - rule.trace_result(parents, container, before, sip) + return rule.trace_result(parents, container, before, sip) + return None class FunctionRuleDb(AbstractCompiledRuleDb): @@ -277,14 +297,17 @@ :param container: The clang.cindex.Cursor for the container. :param function: The clang.cindex.Cursor for the function. - :param sip: The SIP dict. + :param sip: The SIP dict (may be modified on return). + :return: Modifying rule or None (even if a rule matched, it may not modify things). """ parents = _parents(function) matcher, rule = self._match(parents, sip["name"], ", ".join(sip["template_parameters"]), sip["fn_result"], ", ".join(sip["parameters"])) if matcher: + sip.setdefault("code", "") before = deepcopy(sip) rule.fn(container, function, sip, matcher) - rule.trace_result(parents, function, before, sip) + return rule.trace_result(parents, function, before, sip) + return None class ParameterRuleDb(AbstractCompiledRuleDb): @@ -350,14 +373,17 @@ :param container: The clang.cindex.Cursor for the container. :param function: The clang.cindex.Cursor for the function. :param parameter: The clang.cindex.Cursor for the parameter. - :param sip: The SIP dict. + :param sip: The SIP dict (may be modified on return). + :return: Modifying rule or None (even if a rule matched, it may not modify things). """ parents = _parents(function) matcher, rule = self._match(parents, function.spelling, sip["name"], sip["decl"], sip["init"]) if matcher: + sip.setdefault("code", "") before = deepcopy(sip) rule.fn(container, function, parameter, sip, matcher) - rule.trace_result(parents, parameter, before, sip) + return rule.trace_result(parents, parameter, before, sip) + return None class VariableRuleDb(AbstractCompiledRuleDb): @@ -415,14 +441,17 @@ :param container: The clang.cindex.Cursor for the container. :param variable: The clang.cindex.Cursor for the variable. - :param sip: The SIP dict. + :param sip: The SIP dict (may be modified on return). + :return: Modifying rule or None (even if a rule matched, it may not modify things). """ parents = _parents(variable) matcher, rule = self._match(parents, sip["name"], sip["decl"]) if matcher: + sip.setdefault("code", "") before = deepcopy(sip) rule.fn(container, variable, sip, matcher) - rule.trace_result(parents, variable, before, sip) + return rule.trace_result(parents, variable, before, sip) + return None class RuleSet(object): @@ -474,11 +503,12 @@ def dump_unused(self): """Usage statistics, to identify unused rules.""" - def dumper(db_name, rule, usage): + def dumper(rule, usage): if usage: - logger.info(_("Rule {}::{} used {} times".format(db_name, rule, usage))) + logger.info(_("Rule {} used {} times".format(rule, usage))) else: - logger.warn(_("Rule {}::{} unused".format(db_name, rule))) + logger.warn(_("Rule {} was not used".format(rule))) + for db in [self.container_rules(), self.function_rules(), self.parameter_rules(), self.variable_rules()]: db.dump_usage(dumper) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/find-modules/sip_generator.py new/extra-cmake-modules-5.30.0/find-modules/sip_generator.py --- old/extra-cmake-modules-5.29.0/find-modules/sip_generator.py 2016-12-03 21:25:10.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/find-modules/sip_generator.py 2017-01-06 16:34:40.000000000 +0100 @@ -304,16 +304,19 @@ sip["decl"] = container_type sip["base_specifiers"] = ", ".join(base_specifiers) sip["body"] = body - self.rules.container_rules().apply(container, sip) + modifying_rule = self.rules.container_rules().apply(container, sip) pad = " " * (level * 4) if sip["name"]: - decl = pad + sip["decl"] + decl = "" + if modifying_rule: + decl += "// Modified {} (by {}):\n".format(SipGenerator.describe(container), modifying_rule) + decl += pad + sip["decl"] if "External" in sip["annotations"]: # # SIP /External/ does not seem to work as one might wish. Suppress. # body = decl + " /External/;\n" - body = pad + "// Discarded {}\n".format(SipGenerator.describe(container)) + body = pad + "// Discarded {} (by {})\n".format(SipGenerator.describe(container), "/External/ handling") else: if sip["base_specifiers"]: decl += ": " + sip["base_specifiers"] @@ -325,7 +328,7 @@ decl += "%TypeHeaderCode\n#include <{}>\n%End\n".format(include_filename) body = decl + sip["body"] + pad + "};\n" else: - body = pad + "// Discarded {}\n".format(SipGenerator.describe(container)) + body = pad + "// Discarded {} (by {})\n".format(SipGenerator.describe(container), modifying_rule) return body def _get_access_specifier(self, member, level): @@ -344,8 +347,11 @@ decl = pad + "enum {} {{\n".format(enum.displayname) enumerations = [] for enum in enum.get_children(): - enumerations.append(pad + " {}".format(enum.displayname)) - assert enum.kind == CursorKind.ENUM_CONSTANT_DECL + # + # Skip visibility attributes and the like. + # + if enum.kind == CursorKind.ENUM_CONSTANT_DECL: + enumerations.append(pad + " {}".format(enum.displayname)) decl += ",\n".join(enumerations) + "\n" decl += pad + "}" return decl @@ -375,6 +381,7 @@ "name": function.spelling, } parameters = [] + parameter_modifying_rules = [] template_parameters = [] for child in function.get_children(): if child.kind == CursorKind.PARM_DECL: @@ -391,7 +398,9 @@ "init": self._fn_get_parameter_default(function, child), "annotations": set() } - self.rules.parameter_rules().apply(container, function, child, child_sip) + modifying_rule = self.rules.parameter_rules().apply(container, function, child, child_sip) + if modifying_rule: + parameter_modifying_rules.append("// Modified {} (by {}):\n".format(SipGenerator.describe(child), modifying_rule)) decl = child_sip["decl"] if child_sip["annotations"]: decl += " /" + ",".join(child_sip["annotations"]) + "/" @@ -430,11 +439,18 @@ sip["fn_result"] = function.result_type.spelling sip["parameters"] = parameters sip["prefix"], sip["suffix"] = self._fn_get_decorators(function) - self.rules.function_rules().apply(container, function, sip) + modifying_rule = self.rules.function_rules().apply(container, function, sip) pad = " " * (level * 4) if sip["name"]: + decl = "" + if modifying_rule: + decl += "// Modified {} (by {}):\n".format(SipGenerator.describe(function), modifying_rule) + pad + decl += pad.join(parameter_modifying_rules) + if parameter_modifying_rules: + decl += pad + sip["template_parameters"] = ", ".join(sip["template_parameters"]) - decl = sip["name"] + "(" + ", ".join(sip["parameters"]) + ")" + decl += sip["name"] + "(" + ", ".join(sip["parameters"]) + ")" if sip["fn_result"]: decl = sip["fn_result"] + " " + decl decl = pad + sip["prefix"] + decl + sip["suffix"] @@ -442,7 +458,7 @@ decl = pad + "template <" + sip["template_parameters"] + ">\n" + decl decl += ";\n" else: - decl = pad + "// Discarded {}\n".format(SipGenerator.describe(function)) + decl = pad + "// Discarded {} (by {})\n".format(SipGenerator.describe(function), modifying_rule) return decl def _fn_get_decorators(self, function): @@ -607,7 +623,7 @@ # decl = "{} {}".format(variable.type.spelling, variable.spelling) sip["decl"] = decl - self.rules.variable_rules().apply(container, variable, sip) + modifying_rule = self.rules.variable_rules().apply(container, variable, sip) pad = " " * (level * 4) if sip["name"]: @@ -620,7 +636,7 @@ else: decl = pad + decl + ";\n" else: - decl = pad + "// Discarded {}\n".format(SipGenerator.describe(variable)) + decl = pad + "// Discarded {} (by {})\n".format(SipGenerator.describe(variable), modifying_rule) return decl def _read_source(self, extent): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/kde-modules/KDECompilerSettings.cmake new/extra-cmake-modules-5.30.0/kde-modules/KDECompilerSettings.cmake --- old/extra-cmake-modules-5.29.0/kde-modules/KDECompilerSettings.cmake 2016-12-03 21:25:10.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/kde-modules/KDECompilerSettings.cmake 2017-01-06 16:34:40.000000000 +0100 @@ -100,7 +100,7 @@ else() _kde_compiler_min_version("4.5") endif() -elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") _kde_compiler_min_version("3.1") else() message(WARNING "${CMAKE_CXX_COMPILER_ID} is not a supported C++ compiler.") @@ -332,7 +332,7 @@ # Better diagnostics (warnings, errors) ############################################################ -if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR +if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT APPLE) OR (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)) # Linker warnings should be treated as errors @@ -458,5 +458,13 @@ set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--export-all-symbols") endif() +if (CMAKE_GENERATOR STREQUAL "Ninja" AND + ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) OR + (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5))) + # Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support. + # Rationale in https://github.com/ninja-build/ninja/issues/814 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") +endif() + include("${ECM_MODULE_DIR}/ECMEnableSanitizers.cmake") include("${ECM_MODULE_DIR}/ECMCoverageOption.cmake") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/kde-modules/appstreamtest.cmake new/extra-cmake-modules-5.30.0/kde-modules/appstreamtest.cmake --- old/extra-cmake-modules-5.29.0/kde-modules/appstreamtest.cmake 2016-12-03 21:25:10.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/kde-modules/appstreamtest.cmake 2017-01-06 16:34:40.000000000 +0100 @@ -1,5 +1,11 @@ -file(READ "${INSTALL_FILES}" out) -string(REPLACE "\n" ";" out "${out}") +file(GLOB install_done "${INSTALL_FILES}") +if (install_done) + file(READ "${INSTALL_FILES}" out) + string(REPLACE "\n" ";" out "${out}") +else() + message("Not installed yet, skipping") + set(out "") +endif() set(metadatafiles) foreach(file IN LISTS out) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/modules/ECMEnableSanitizers.cmake new/extra-cmake-modules-5.30.0/modules/ECMEnableSanitizers.cmake --- old/extra-cmake-modules-5.29.0/modules/ECMEnableSanitizers.cmake 2016-12-03 21:25:10.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/modules/ECMEnableSanitizers.cmake 2017-01-06 16:34:40.000000000 +0100 @@ -151,6 +151,10 @@ string(TOLOWER ${CUR_SANITIZER} CUR_SANITIZER) # check option and enable appropriate flags enable_sanitizer_flags ( ${CUR_SANITIZER} ) + # TODO: GCC will not link pthread library if enabled ASan + if(CMAKE_C_COMPILER_ID MATCHES "Clang") + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XSAN_COMPILE_FLAGS}" ) + endif() set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XSAN_COMPILE_FLAGS}" ) if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") link_libraries(${XSAN_LINKER_FLAGS}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/tests/GenerateSipBindings/cpplib.h new/extra-cmake-modules-5.30.0/tests/GenerateSipBindings/cpplib.h --- old/extra-cmake-modules-5.29.0/tests/GenerateSipBindings/cpplib.h 2016-12-03 21:25:10.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/tests/GenerateSipBindings/cpplib.h 2017-01-06 16:34:40.000000000 +0100 @@ -47,6 +47,8 @@ int fwdDecl(const FwdDecl& f); int fwdDeclRef(FwdDecl& f); + mode_t dummyFunc(QObject* parent) { return 0; } + signals: void publicSlotCalled(); @@ -93,6 +95,8 @@ Q_DISABLE_COPY(NonCopyableByMacro) }; +Q_DECLARE_METATYPE(NonCopyableByMacro*) + class HasPrivateDefaultCtor { public: @@ -113,3 +117,8 @@ }; } + +enum __attribute__((visibility("default"))) EnumWithAttributes { + Foo, + Bar = 2 +}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/tests/GenerateSipBindings/testscript.py new/extra-cmake-modules-5.30.0/tests/GenerateSipBindings/testscript.py --- old/extra-cmake-modules-5.29.0/tests/GenerateSipBindings/testscript.py 2016-12-03 21:25:10.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/tests/GenerateSipBindings/testscript.py 2017-01-06 16:34:40.000000000 +0100 @@ -26,6 +26,12 @@ assert(mo.qtEnumTest(QtCore.Qt.MatchContains | QtCore.Qt.MatchStartsWith) == 3) assert(mo.localEnumTest(PyTest.CppLib.MyObject.Val2) == 2) +# +# Verify that an enum with attributes can be read. +# +assert(PyTest.CppLib.Foo == 0) +assert(PyTest.CppLib.Bar == 2) + class Reactor(QtCore.QObject): def __init__(self, obj): QtCore.QObject.__init__(self) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/extra-cmake-modules-5.29.0/toolchain/Android.cmake new/extra-cmake-modules-5.30.0/toolchain/Android.cmake --- old/extra-cmake-modules-5.29.0/toolchain/Android.cmake 2016-12-03 21:25:10.000000000 +0100 +++ new/extra-cmake-modules-5.30.0/toolchain/Android.cmake 2017-01-06 16:34:40.000000000 +0100 @@ -51,6 +51,24 @@ # ``ANDROID_SDK_BUILD_TOOLS_REVISION`` # The build tools version to use. Default: ``21.1.1``. # +# For integrating other libraries which are not part of the Android toolchain, +# like Qt5, and installed to a separate prefix on the host system, the install +# prefixes of those libraries would be passed as alternative roots as list via +# ``ECM_ADDITIONAL_FIND_ROOT_PATH``. Since 5.30.0. +# +# For example, for integrating a Qt5 for Android with armv7 target present at +# ``/opt/android/Qt5/5.7/android_armv7`` and some other libraries installed to +# the prefix ``/opt/android/foo``, you would use:: +# +# cmake \ +# -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/AndroidToolchain.cmake \ +# -DECM_ADDITIONAL_FIND_ROOT_PATH="/opt/android/Qt5/5.7/android_armv7;/opt/android/foo" +# +# If your project uses ``find_package()`` to locate build tools on the host +# system, make sure to pass ``CMAKE_FIND_ROOT_PATH_BOTH`` or +# ``NO_CMAKE_FIND_ROOT_PATH`` as argument in the call. See the +# ``find_package()`` documentation for more details. +# # Deploying Qt Applications # ========================= # @@ -142,10 +160,23 @@ SET(CMAKE_SYSTEM_NAME Android) SET(CMAKE_SYSTEM_VERSION 1) +SET(CMAKE_FIND_ROOT_PATH ${ANDROID_NDK} ${ECM_ADDITIONAL_FIND_ROOT_PATH}) +SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(ANDROID_TOOLCHAIN_ROOT "${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN}-${ANDROID_GCC_VERSION}/prebuilt/${_HOST}/bin") set(ANDROID_LIBS_ROOT "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VERSION}") -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM "${ANDROID_TOOLCHAIN_ROOT}") +# includes +include_directories(SYSTEM + "${CMAKE_SYSROOT}/usr/include" + "${ANDROID_LIBS_ROOT}/include/" + "${ANDROID_LIBS_ROOT}/libs/${ANDROID_ABI}/include" +) + +# libraries set(ANDROID_LIBRARIES_PATH "${CMAKE_SYSROOT}/usr/lib") set(CMAKE_SYSTEM_LIBRARY_PATH @@ -154,29 +185,22 @@ ) set(CMAKE_FIND_LIBRARY_SUFFIXES ".so") set(CMAKE_FIND_LIBRARY_PREFIXES "lib") + +# Settling hard on gnustl_shared as C++ helper runtime for now, +# given this is most similar to what is on GNU/Linux, which is what +# the average software targetted by this toolchain is built against otherwise. +# If requested by devs, the used helper runtime could be made an option later. +# Related info: https://developer.android.com/ndk/guides/cpp-support.html find_library(GNUSTL_SHARED gnustl_shared) if(NOT GNUSTL_SHARED) - message(FATAL_ERROR "you need gnustl_shared: ${CMAKE_SYSTEM_LIBRARY_PATH}") + message(FATAL_ERROR "Selected Android platform does not provide gnustl_shared: ${CMAKE_SYSTEM_LIBRARY_PATH}") endif() -include_directories(SYSTEM - "${CMAKE_SYSROOT}/usr/include" - "${ANDROID_LIBS_ROOT}/include/" - "${ANDROID_LIBS_ROOT}/libs/${ANDROID_ABI}/include" -) - -# needed for Qt to define Q_OS_ANDROID -add_definitions(-DANDROID) link_directories(${CMAKE_SYSTEM_LIBRARY_PATH}) set(CMAKE_C_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN}-gcc") set(CMAKE_CXX_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN}-g++") -SET(CMAKE_FIND_ROOT_PATH ${ANDROID_NDK}) -SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) -SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) - set(CMAKE_EXE_LINKER_FLAGS "${GNUSTL_SHARED} -Wl,-rpath-link,${ANDROID_LIBRARIES_PATH} -llog -lz -lm -ldl -lc -lgcc" CACHE STRING "") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "") @@ -186,6 +210,10 @@ "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" ) +# needed for Qt to define Q_OS_ANDROID +add_definitions(-DANDROID) + + ######### generation set(CREATEAPK_TARGET_NAME "create-apk-${QTANDROID_EXPORTED_TARGET}")
participants (1)
-
root@hilbertn.suse.de