From 4de06c634f451e96b47f31324e34086b0e3a0d62 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 8 Jan 2021 11:22:33 +0100 Subject: Windows: Fix running the example tests in COIN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the logic expanding the Clang-related variables introduced by c3fc507d3b2a502273bd92472e1e7aa459c2d13e to the COIN scripts since they are needed when building the sample binding. c3fc507d3b2a502273bd92472e1e7aa459c2d13e should then be reverted. Task-number: PYSIDE-431 Change-Id: I1f118fdbd8989b7b9e3d24a249af81f4020c73f3 Reviewed-by: Simo Fält (cherry picked from commit 01b1d3218d70d128fe6c2f2ce3e6dce74608adaa) Reviewed-by: Cristian Maureira-Fredes --- build_scripts/utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'build_scripts/utils.py') diff --git a/build_scripts/utils.py b/build_scripts/utils.py index 767ed46af..0cf6f6676 100644 --- a/build_scripts/utils.py +++ b/build_scripts/utils.py @@ -667,6 +667,16 @@ def find_glob_in_path(pattern): return result +# Expand the __ARCH_ place holder in the CLANG environment variables +def expand_clang_variables(target_arch): + for var in 'LLVM_INSTALL_DIR', 'CLANG_INSTALL_DIR': + value = os.environ.get(var) + if value and '_ARCH_' in value: + value = value.replace('_ARCH_', target_arch) + os.environ[var] = value + print(f"{var} = {value}") + + # Add Clang to path for Windows for the shiboken ApiExtractor tests. # Revisit once Clang is bundled with Qt. def detect_clang(): -- cgit v1.2.3