aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project/platform.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-03-30 02:34:03 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-03-30 02:53:51 +0300
commit39902041e7671a94abcf691fa4a769b5cb4fc4fb (patch)
tree9ea5e61c6f49913aa81c7ba0bddb85127c8fc0dd /project/platform.py
parentproject.cmake.build: refactoring (diff)
downloadcmake-common-39902041e7671a94abcf691fa4a769b5cb4fc4fb.tar.gz
cmake-common-39902041e7671a94abcf691fa4a769b5cb4fc4fb.zip
project.cmake: make it --platform aware
Diffstat (limited to '')
-rw-r--r--project/platform.py8
1 files changed, 8 insertions, 0 deletions
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}')