From 57a0bc2c066624717e5980657b03c1c0e46513dc 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 --- build_scripts/main.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build_scripts') 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") -- cgit v1.2.3