diff options
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index fe06c36..9e010d7 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -1119,6 +1119,20 @@ class MachineInfo: self.cpu = cpu self.endian = endian + def __eq__(self, other): + if self.__class__ is not other.__class__: + return NotImplemented + return \ + self.system == other.system and \ + self.cpu_family == other.cpu_family and \ + self.cpu == other.cpu and \ + self.endian == other.endian + + def __ne__(self, other): + if self.__class__ is not other.__class__: + return NotImplemented + return not self.__eq__(other) + @staticmethod def detect(compilers = None): """Detect the machine we're running on |