aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project/os.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-12-15 13:40:15 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-12-15 13:51:14 +0300
commit00290ddef6c340575898974c63e57975e3866b75 (patch)
treec20aa1c307deb3c658b5f86689f35a8be0ede8db /project/os.py
parentworkflows/basic: minor fix (diff)
downloadcmake-common-00290ddef6c340575898974c63e57975e3866b75.tar.gz
cmake-common-00290ddef6c340575898974c63e57975e3866b75.zip
basic macOS support
I don't have a Mac to test on, but the knowledge that there is basic support for macOS is still nice.
Diffstat (limited to '')
-rw-r--r--project/os.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/project/os.py b/project/os.py
index eaa63db..cb5bd44 100644
--- a/project/os.py
+++ b/project/os.py
@@ -11,6 +11,7 @@ class OS(Enum):
WINDOWS = 'Windows'
LINUX = 'Linux'
CYGWIN = 'Cygwin'
+ MACOS = 'macOS'
def __str__(self):
return str(self.value)
@@ -22,6 +23,8 @@ class OS(Enum):
return OS.WINDOWS
if system == 'Linux':
return OS.LINUX
+ if system == 'Darwin':
+ return OS.MACOS
if system.startswith('CYGWIN_NT'):
return OS.CYGWIN
raise NotImplementedError(f'unsupported OS: {system}')
@@ -42,7 +45,7 @@ def on_linux():
def on_linux_like():
os = OS.current()
- return os is OS.LINUX or os is OS.CYGWIN
+ return os is OS.LINUX or os is OS.CYGWIN or os is OS.MACOS
def on_cygwin():