From 9e8ab0a549fe44c2cd6165b42545dc5e7e0592ba Mon Sep 17 00:00:00 2001 From: Slawomir Cygan Date: Fri, 23 Aug 2019 14:33:19 +0200 Subject: [PATCH] Explicitly use -A Win32 platform in CMake Visual Studio 2019 builds There is a new CMake switch "-A" for selecting a platform in Visual Studion CMake generators. It was set only for 64-bit builds (to x64), however it seems it does not default to Win32 - so it must be set also for 32-bit builds. Components: Framework VK-GL-CTS Issue: 1950 Change-Id: I4d0e9f1a9c8dd0f3060e138f613c8e5326b6fc9f (cherry picked from commit a653debe1b4bc8a6d0c94c774aad4f3fcdda1595) --- scripts/build/config.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/build/config.py b/scripts/build/config.py index 11cda47..29ba84f 100644 --- a/scripts/build/config.py +++ b/scripts/build/config.py @@ -129,11 +129,14 @@ class VSProjectGenerator(CMakeGenerator): platform = None - if arch == self.ARCH_64BIT: - if version >= 16: - # From VS2019 onwards, the architecture is given by -A switch + if version >= 16: + # From VS2019 onwards, the architecture is given by -A switch + if arch == self.ARCH_64BIT: platform = "x64" - else: + elif arch == self.ARCH_32BIT: + platform = "Win32" + else: + if arch == self.ARCH_64BIT: name += " Win64" CMakeGenerator.__init__(self, name, isMultiConfig = True, extraBuildArgs = ['/m'], platform = platform) -- 2.7.4