From 39902041e7671a94abcf691fa4a769b5cb4fc4fb Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 30 Mar 2020 02:34:03 +0300 Subject: project.cmake: make it --platform aware --- project/platform.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'project/platform.py') diff --git a/project/platform.py b/project/platform.py index 249238e..8eb7f3e 100644 --- a/project/platform.py +++ b/project/platform.py @@ -45,3 +45,11 @@ class Platform(Enum): if self is Platform.X64: return 64 raise NotImplementedError(f'unsupported platform: {self}') + + def get_cmake_arch(self): + '''Maps to CMake's -A argument for MSVC.''' + if self is Platform.X86: + return 'Win32' + if self is Platform.X64: + return 'x64' + raise NotImplementedError(f'unsupported platform: {self}') -- cgit v1.2.3