From 57a5bc7a850dc0ce7f2d13f58823dee966af3c46 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 10 Nov 2020 15:59:35 +0100 Subject: 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 (cherry picked from commit 57a0bc2c066624717e5980657b03c1c0e46513dc) --- build_scripts/main.py | 4 ++++ 1 file changed, 4 insertions(+) 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") -- cgit v1.2.3