UnityTrampolineConfigure.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #pragma once
  2. // use this macro to encode unity version into an integer
  3. // numbers generated this way can be compared numerically to check which version is newer/older
  4. #define MAKE_UNITY_VERSION(ver, maj, min) ((ver)*10000 + (maj)*100 + (min))
  5. #if !defined(UNITY_VERSION_VER) || !defined(UNITY_VERSION_MAJ) || !defined(UNITY_VERSION_MIN)
  6. #error "UNITY_VERSION_VER, UNITY_VERSION_MAJ, UNITY_VERSION_MIN must be set in xcode project, something went wrong"
  7. #endif
  8. #define UNITY_VERSION MAKE_UNITY_VERSION(UNITY_VERSION_VER, UNITY_VERSION_MAJ, UNITY_VERSION_MIN)
  9. // * Before, we were having UNITY_X_Y_Z defines (we keep old ones present to not break old projects)
  10. // * Alas it had several issues:
  11. // * we were using one digit for major/minor version, meaning that
  12. // * UNITY_2019_3_13 = 2019313 was larger than UNITY_2020_2_0 = 202020
  13. // * we were never forward porting minor version changes, so UNITY_2019_3_13 was not present in 2020
  14. // * what is worse: UNITY_2019_3_13 would be absent in 2019.3.14
  15. // *
  16. // * We keep old defines around for backwards compatibility but we are forced to break direct numerical comparison
  17. #define UNITY_4_2_0 MAKE_UNITY_VERSION(4,2,0)
  18. #define UNITY_4_2_1 MAKE_UNITY_VERSION(4,2,1)
  19. #define UNITY_4_2_2 MAKE_UNITY_VERSION(4,2,2)
  20. #define UNITY_4_3_0 MAKE_UNITY_VERSION(4,3,0)
  21. #define UNITY_4_3_1 MAKE_UNITY_VERSION(4,3,1)
  22. #define UNITY_4_3_2 MAKE_UNITY_VERSION(4,3,2)
  23. #define UNITY_4_3_3 MAKE_UNITY_VERSION(4,3,3)
  24. #define UNITY_4_3_4 MAKE_UNITY_VERSION(4,3,4)
  25. #define UNITY_4_5_0 MAKE_UNITY_VERSION(4,5,0)
  26. #define UNITY_4_5_1 MAKE_UNITY_VERSION(4,5,1)
  27. #define UNITY_4_5_2 MAKE_UNITY_VERSION(4,5,2)
  28. #define UNITY_4_5_3 MAKE_UNITY_VERSION(4,5,3)
  29. #define UNITY_4_6_0 MAKE_UNITY_VERSION(4,6,0)
  30. #define UNITY_5_0_0 MAKE_UNITY_VERSION(5,0,0)
  31. #define UNITY_5_1_0 MAKE_UNITY_VERSION(5,1,0)
  32. #define UNITY_5_2_0 MAKE_UNITY_VERSION(5,2,0)
  33. #define UNITY_5_3_0 MAKE_UNITY_VERSION(5,3,0)
  34. #define UNITY_5_4_0 MAKE_UNITY_VERSION(5,4,0)
  35. #define UNITY_5_5_0 MAKE_UNITY_VERSION(5,5,0)
  36. #define UNITY_5_6_0 MAKE_UNITY_VERSION(5,6,0)
  37. #define UNITY_2017_1_0 MAKE_UNITY_VERSION(2017,1,0)
  38. #define UNITY_2017_2_0 MAKE_UNITY_VERSION(2017,2,0)
  39. #define UNITY_2017_3_0 MAKE_UNITY_VERSION(2017,3,0)
  40. #define UNITY_2018_1_0 MAKE_UNITY_VERSION(2018,1,0)
  41. #define UNITY_2018_2_0 MAKE_UNITY_VERSION(2018,2,0)
  42. #define UNITY_2018_3_0 MAKE_UNITY_VERSION(2018,3,0)
  43. #define UNITY_2019_1_0 MAKE_UNITY_VERSION(2019,1,0)
  44. #define UNITY_2019_2_0 MAKE_UNITY_VERSION(2019,2,0)
  45. #define UNITY_2019_3_0 MAKE_UNITY_VERSION(2019,3,0)
  46. #define UNITY_2020_1_0 MAKE_UNITY_VERSION(2020,1,0)
  47. #define UNITY_2020_2_0 MAKE_UNITY_VERSION(2020,2,0)