diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-11-10 15:59:35 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-11-26 09:42:33 +0100 |
commit | 57a5bc7a850dc0ce7f2d13f58823dee966af3c46 (patch) | |
tree | 93f06b5d66e230364c1f2be630e434b54bd3b107 | |
parent | ed0571df854a232e8506228780561b2dda95d281 (diff) |
Windows: Prevent cmake from auto-detecting the clang compiler
cmake tends to auto-detect the clang compiler from the path
and then fails the build. Force it to use cl.exe.
Change-Id: Ic58cc0e734dd42bba0ad383842ef73f23de50c76
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 57a0bc2c066624717e5980657b03c1c0e46513dc)
-rw-r--r-- | build_scripts/main.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py index ea91ef751..796ea2040 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -900,6 +900,10 @@ class PysideBuild(_build, DistUtilsCommandMixin): deployment_target = macos_pyside_min_deployment_target() cmake_cmd.append("-DCMAKE_OSX_DEPLOYMENT_TARGET={}".format(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 OPTION["DOC_BUILD_ONLINE"]: log.info("Output format will be HTML") |