diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-30 02:34:03 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-30 02:53:51 +0300 |
commit | 39902041e7671a94abcf691fa4a769b5cb4fc4fb (patch) | |
tree | 9ea5e61c6f49913aa81c7ba0bddb85127c8fc0dd /project/platform.py | |
parent | project.cmake.build: refactoring (diff) | |
download | cmake-common-39902041e7671a94abcf691fa4a769b5cb4fc4fb.tar.gz cmake-common-39902041e7671a94abcf691fa4a769b5cb4fc4fb.zip |
project.cmake: make it --platform aware
Diffstat (limited to '')
-rw-r--r-- | project/platform.py | 8 |
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}') |