QCMakePreset.cxx 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "QCMakePreset.h"
  4. bool operator==(const QCMakePreset& lhs, const QCMakePreset& rhs)
  5. {
  6. return lhs.name == rhs.name && lhs.displayName == rhs.displayName &&
  7. lhs.description == rhs.description && lhs.generator == rhs.generator &&
  8. lhs.architecture == rhs.architecture && lhs.toolset == rhs.toolset &&
  9. lhs.setGenConfig == rhs.setGenConfig && lhs.enabled == rhs.enabled;
  10. }
  11. bool operator!=(const QCMakePreset& lhs, const QCMakePreset& rhs)
  12. {
  13. return !(lhs == rhs);
  14. }
  15. bool operator<(const QCMakePreset& lhs, const QCMakePreset& rhs)
  16. {
  17. return lhs.name < rhs.name ||
  18. (lhs.name == rhs.name &&
  19. (lhs.displayName < rhs.displayName ||
  20. (lhs.displayName == rhs.displayName &&
  21. (lhs.description < rhs.description ||
  22. (lhs.description == rhs.description &&
  23. (lhs.generator < rhs.generator ||
  24. (lhs.generator == rhs.generator &&
  25. (lhs.architecture < rhs.architecture ||
  26. (lhs.architecture == rhs.architecture &&
  27. (lhs.toolset < rhs.toolset ||
  28. (lhs.toolset == rhs.toolset &&
  29. (lhs.setGenConfig < rhs.setGenConfig ||
  30. (lhs.setGenConfig == rhs.setGenConfig &&
  31. (lhs.enabled < rhs.enabled))))))))))))));
  32. }
  33. bool operator<=(const QCMakePreset& lhs, const QCMakePreset& rhs)
  34. {
  35. return rhs >= lhs;
  36. }
  37. bool operator>(const QCMakePreset& lhs, const QCMakePreset& rhs)
  38. {
  39. return rhs < lhs;
  40. }
  41. bool operator>=(const QCMakePreset& lhs, const QCMakePreset& rhs)
  42. {
  43. return !(lhs < rhs);
  44. }