diff options
author | Iikka Eklund <iikka.eklund@qt.io> | 2021-09-07 11:48:11 +0300 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-21 09:17:47 +0000 |
commit | 0c362f77b3097c83b0ab454ea19531d6bb81c187 (patch) | |
tree | 1dec3ec9b90a65efa99b8a5cd28c8d55c6461d8d /conanfile.py | |
parent | 2c9a2db08dfb6fc2dbd05f421457416c319633e7 (diff) |
Conan: Filter cmake_args that should not be included in package_id
The qtbase Conan recipe has 'cmake_args_qtbase" option to pass cmake
arguments. Some of the cmake arguments should not be included in the
package_id checksum of the Conan package. Filter these out when
generating the package_id.
Examples:
- -DCMAKE_C_COMPILER_LAUNCHER=sccache
- -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
- -DFEATURE_headersclean=..
- -DPostgreSQL_ROOT=..
Those arguments which are specific to Qt CI build environment are
filtered out. This makes the pre-built Conan binary packages more
usable for the end users because Conan would enforce a build
from sources if the checksum(s) would not match.
Task-number: QTBUG-96230
Change-Id: I076a57427614fdf4bf9138402e247d63f1ce15d9
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit d96fe5e7537cdd9eadb3fe6359d3c86e5dc1cb56)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'conanfile.py')
-rw-r--r-- | conanfile.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/conanfile.py b/conanfile.py index 531fa59f3b..a75c31dd22 100644 --- a/conanfile.py +++ b/conanfile.py @@ -460,6 +460,13 @@ class QtBase(ConanFile): for item in rm_list: if item in self.info.options: delattr(self.info.options, item) + # filter also those cmake options that should not end up in the package_id + if hasattr(self.info.options, "cmake_args_qtbase"): + _filter = self.python_requires[ + "qt-conan-common" + ].module.filter_cmake_args_for_package_id + + self.info.options.cmake_args_qtbase = _filter(self.info.options.cmake_args_qtbase) def deploy(self): self.copy("*") # copy from current package |