diff options
| author | Egor Tensin <egor@tensin.name> | 2026-10-09 12:08:53 +0500 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-10-09 12:08:53 +0500 |
| commit | b6078e1d19235301948766721a7d9f4903b98745 (patch) | |
| tree | 1ccc8ea3988fc23f543e7955a047335ffadee3ba /project/platform.py | |
| parent | minor imports refactoring (diff) | |
| download | cmake-common-b6078e1d19235301948766721a7d9f4903b98745.tar.gz cmake-common-b6078e1d19235301948766721a7d9f4903b98745.zip | |
ugprade to StrEnum
Diffstat (limited to 'project/platform.py')
| -rw-r--r-- | project/platform.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/project/platform.py b/project/platform.py index cae02a4..5091f7f 100644 --- a/project/platform.py +++ b/project/platform.py @@ -4,23 +4,20 @@ # Distributed under the MIT License. import argparse -from enum import Enum +from enum import auto, StrEnum import os.path import platform from project.os import on_windows -class Platform(Enum): +class Platform(StrEnum): # I only build for x86(-64), so here it goes. - X86 = "x86" - X64 = "x64" + X86 = auto() + X64 = auto() # 'auto' means that no additional arguments will be passed to either # Boost's b2 nor CMake (except on Windows, see below). - AUTO = "auto" - - def __str__(self): - return str(self.value) + AUTO = auto() @staticmethod def windows_native(): |
