ENH: Created better names and a more convenient set of version date stamp macros.
This commit is contained in:
parent
fa5f983651
commit
121b1db741
|
@ -14,31 +14,31 @@
|
|||
#ifndef @KWSYS_NAMESPACE@_DateStamp_h
|
||||
#define @KWSYS_NAMESPACE@_DateStamp_h
|
||||
|
||||
/**
|
||||
* Version date year component. The format is CCYY.
|
||||
*/
|
||||
#define @KWSYS_NAMESPACE@_VERSION_DATE_YEAR @KWSYS_VERSION_DATE_YEAR@
|
||||
/** Version date integer year. The format is CCYY. */
|
||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_YEAR @KWSYS_DATE_STAMP_YEAR@
|
||||
|
||||
/**
|
||||
* Version date month component. The format is MM.
|
||||
*/
|
||||
#define @KWSYS_NAMESPACE@_VERSION_DATE_MONTH @KWSYS_VERSION_DATE_MONTH@
|
||||
/** Version date integer month. The format is MM. */
|
||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_MONTH @KWSYS_DATE_STAMP_MONTH@
|
||||
|
||||
/**
|
||||
* Version date day component. The format is DD.
|
||||
*/
|
||||
#define @KWSYS_NAMESPACE@_VERSION_DATE_DAY @KWSYS_VERSION_DATE_DAY@
|
||||
/** Version date integer day. The format is DD. */
|
||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_DAY @KWSYS_DATE_STAMP_DAY@
|
||||
|
||||
/**
|
||||
* Version date accessible from preprocessor.
|
||||
* This is an integer in the format CCYYMMDD.
|
||||
*/
|
||||
#define @KWSYS_NAMESPACE@_VERSION_DATE_FULL @KWSYS_VERSION_DATE_YEAR@@KWSYS_VERSION_DATE_MONTH@@KWSYS_VERSION_DATE_DAY@
|
||||
/** Version date full integer. The format is CCYYMMDD. */
|
||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_FULL @KWSYS_DATE_STAMP_YEAR@@KWSYS_DATE_STAMP_MONTH@@KWSYS_DATE_STAMP_DAY@
|
||||
|
||||
/**
|
||||
* Version date as a string literal.
|
||||
* The format is "CCYY-MM-DD".
|
||||
*/
|
||||
#define @KWSYS_NAMESPACE@_VERSION_DATE_STRING "@KWSYS_VERSION_DATE_YEAR@-@KWSYS_VERSION_DATE_MONTH@-@KWSYS_VERSION_DATE_DAY@"
|
||||
/** Version date string year. The format is "CCYY". */
|
||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_STRING_YEAR "@KWSYS_DATE_STAMP_YEAR@"
|
||||
|
||||
/** Version date string month. The format is "MM". */
|
||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_STRING_MONTH "@KWSYS_DATE_STAMP_MONTH@"
|
||||
|
||||
/** Version date string day. The format is "DD". */
|
||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_STRING_DAY "@KWSYS_DATE_STAMP_DAY@"
|
||||
|
||||
/** Version date full string. The format is "CCYYMMDD". */
|
||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_STRING_FULL "@KWSYS_DATE_STAMP_YEAR@@KWSYS_DATE_STAMP_MONTH@@KWSYS_DATE_STAMP_DAY@"
|
||||
|
||||
/** Version date formatted string. The format is "CCYY-MM-DD". */
|
||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_STRING "@KWSYS_DATE_STAMP_YEAR@-@KWSYS_DATE_STAMP_MONTH@-@KWSYS_DATE_STAMP_DAY@"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,13 +20,13 @@ ct = time.localtime()
|
|||
fout.write("""# Do not edit! Generated by kwsysDateStamp.py
|
||||
|
||||
# KWSys version date year component. Format is CCYY.
|
||||
SET(KWSYS_VERSION_DATE_YEAR %04u)
|
||||
SET(KWSYS_DATE_STAMP_YEAR %04u)
|
||||
|
||||
# KWSys version date month component. Format is MM.
|
||||
SET(KWSYS_VERSION_DATE_MONTH %02u)
|
||||
SET(KWSYS_DATE_STAMP_MONTH %02u)
|
||||
|
||||
# KWSys version date day component. Format is DD.
|
||||
SET(KWSYS_VERSION_DATE_DAY %02u)
|
||||
SET(KWSYS_DATE_STAMP_DAY %02u)
|
||||
""" % (ct.tm_year, ct.tm_mon, ct.tm_mday))
|
||||
|
||||
fout.close()
|
||||
|
|
Loading…
Reference in New Issue