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/configuration.py | |
| parent | minor imports refactoring (diff) | |
| download | cmake-common-b6078e1d19235301948766721a7d9f4903b98745.tar.gz cmake-common-b6078e1d19235301948766721a7d9f4903b98745.zip | |
ugprade to StrEnum
Diffstat (limited to 'project/configuration.py')
| -rw-r--r-- | project/configuration.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/project/configuration.py b/project/configuration.py index e98b9c1..69dfe10 100644 --- a/project/configuration.py +++ b/project/configuration.py @@ -4,19 +4,16 @@ # Distributed under the MIT License. import argparse -from enum import Enum +from enum import auto, StrEnum -class Configuration(Enum): +class Configuration(StrEnum): """Correspond to CMake's default CMAKE_BUILD_TYPE values.""" - DEBUG = "Debug" - MINSIZEREL = "MinSizeRel" - RELWITHDEBINFO = "RelWithDebInfo" - RELEASE = "Release" - - def __str__(self): - return str(self.value) + DEBUG = auto() + MINSIZEREL = auto() + RELWITHDEBINFO = auto() + RELEASE = auto() @staticmethod def all(): |
