cmVersion.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmVersion_h
  11. #define cmVersion_h
  12. #include "cmStandardIncludes.h"
  13. /** \class cmVersion
  14. * \brief Helper class for providing CMake and CTest version information.
  15. *
  16. * Finds all version related information.
  17. */
  18. class cmVersion
  19. {
  20. public:
  21. /**
  22. * Return major and minor version numbers for cmake.
  23. */
  24. static unsigned int GetMajorVersion();
  25. static unsigned int GetMinorVersion();
  26. static unsigned int GetPatchVersion();
  27. static const char* GetCMakeVersion();
  28. };
  29. #define CMake_VERSION_ENCODE(major, minor, patch) \
  30. ((major)*0x10000u + (minor)*0x100u + (patch))
  31. #endif