diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-12-09 07:38:22 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-12-09 13:06:35 +0100 |
| commit | bda973a2b0a288d0bc7390244ce6b563fe8dbe34 (patch) | |
| tree | 0aa975ce2b2fa470938874297af4099651000d93 /build_scripts/main.py | |
| parent | bd1ad4d23d18132446a936841dc82e444e8e240d (diff) | |
Windows: Fix the build against complete LLVM packages
When compiling a dummy project for determining config values,
CMake is fooled to use clang++ as a compiler if it finds it.
Force it to use MSVC as is done for the build.
Pick-to: 6.2
Change-Id: Ic1031a9aa078c0d05adf6495b4db665a0813e3f9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'build_scripts/main.py')
| -rw-r--r-- | build_scripts/main.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py index a0b9335bb..82b0f31aa 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -76,7 +76,7 @@ from setuptools import Command from .qtinfo import QtInfo from .utils import (rmtree, detect_clang, copyfile, copydir, run_process_output, run_process, update_env_path, init_msvc_env, filter_match, macos_fix_rpaths_for_library, - linux_fix_rpaths_for_library) + linux_fix_rpaths_for_library, platform_cmake_options) from .platforms.unix import prepare_packages_posix from .platforms.windows_desktop import prepare_packages_win32 from .wheel_override import wheel_module_exists, get_bdist_wheel_override @@ -652,6 +652,8 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin): cmake_cmd.append("-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes") cmake_cmd.append("-DUSE_PYTHON_VERSION=3.6") + cmake_cmd += platform_cmake_options() + if sys.platform == 'darwin': if OPTION["MACOS_ARCH"]: # also tell cmake which architecture to use @@ -688,10 +690,6 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin): deployment_target = macos_pyside_min_deployment_target() cmake_cmd.append(f"-DCMAKE_OSX_DEPLOYMENT_TARGET={deployment_target}") os.environ['MACOSX_DEPLOYMENT_TARGET'] = deployment_target - elif sys.platform == 'win32': - # Prevent cmake from auto-detecting clang if it is in path. - cmake_cmd.append("-DCMAKE_C_COMPILER=cl.exe") - cmake_cmd.append("-DCMAKE_CXX_COMPILER=cl.exe") if not OPTION["SKIP_DOCS"]: # Build the whole documentation (rst + API) by default |
