summaryrefslogtreecommitdiffstats
path: root/conanfile.py
diff options
context:
space:
mode:
authorIikka Eklund <iikka.eklund@qt.io>2021-09-07 11:48:11 +0300
committerIikka Eklund <iikka.eklund@qt.io>2021-09-21 10:41:01 +0300
commitd96fe5e7537cdd9eadb3fe6359d3c86e5dc1cb56 (patch)
treeb62b77abb5e561c63f185c8b815e15e59e59d18b /conanfile.py
parent30e2f51dab3dbf86f81b299eea515872e10286ef (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. Pick-to: 6.2 Task-number: QTBUG-96230 Change-Id: I076a57427614fdf4bf9138402e247d63f1ce15d9 Reviewed-by: Toni Saario <toni.saario@qt.io>
Diffstat (limited to 'conanfile.py')
-rw-r--r--conanfile.py7
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