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-10 19:47:37 +0000 |
commit | 57a0bc2c066624717e5980657b03c1c0e46513dc (patch) | |
tree | 423b5dc3240edede6524c20cdb9a099a0ec74ddf /build_scripts | |
parent | 1ef022dc40a859390182a2bfaac311ee1843d9a2 (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>
Diffstat (limited to 'build_scripts')
-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 9b25f7631..e9b3be51e 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -863,6 +863,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") |