commit
58cc3d1fc4
|
@ -123,7 +123,6 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
|
||||||
SET(KWSYS_USE_FundamentalType 1)
|
SET(KWSYS_USE_FundamentalType 1)
|
||||||
SET(KWSYS_USE_Terminal 1)
|
SET(KWSYS_USE_Terminal 1)
|
||||||
SET(KWSYS_USE_IOStream 1)
|
SET(KWSYS_USE_IOStream 1)
|
||||||
SET(KWSYS_USE_DateStamp 1)
|
|
||||||
SET(KWSYS_USE_String 1)
|
SET(KWSYS_USE_String 1)
|
||||||
SET(KWSYS_USE_SystemInformation 1)
|
SET(KWSYS_USE_SystemInformation 1)
|
||||||
SET(KWSYS_USE_CPU 1)
|
SET(KWSYS_USE_CPU 1)
|
||||||
|
@ -690,7 +689,7 @@ ENDFOREACH(cpp)
|
||||||
|
|
||||||
# Add selected C components.
|
# Add selected C components.
|
||||||
FOREACH(c
|
FOREACH(c
|
||||||
Process Base64 FundamentalType MD5 Terminal System DateStamp String CPU
|
Process Base64 FundamentalType MD5 Terminal System String CPU
|
||||||
)
|
)
|
||||||
IF(KWSYS_USE_${c})
|
IF(KWSYS_USE_${c})
|
||||||
# Use the corresponding header file.
|
# Use the corresponding header file.
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
/*============================================================================
|
|
||||||
KWSys - Kitware System Library
|
|
||||||
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
|
||||||
|
|
||||||
Distributed under the OSI-approved BSD License (the "License");
|
|
||||||
see accompanying file Copyright.txt for details.
|
|
||||||
|
|
||||||
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
||||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the License for more information.
|
|
||||||
============================================================================*/
|
|
||||||
#ifndef @KWSYS_NAMESPACE@_DateStamp_h
|
|
||||||
#define @KWSYS_NAMESPACE@_DateStamp_h
|
|
||||||
|
|
||||||
/** Version date integer year. The format is CCYY. */
|
|
||||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_YEAR @KWSYS_DATE_STAMP_YEAR@
|
|
||||||
|
|
||||||
/** Version date integer month. The format is MM. */
|
|
||||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_MONTH @KWSYS_DATE_STAMP_MONTH@
|
|
||||||
|
|
||||||
/** Version date integer day. The format is DD. */
|
|
||||||
#define @KWSYS_NAMESPACE@_DATE_STAMP_DAY @KWSYS_DATE_STAMP_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 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
|
|
|
@ -1,21 +0,0 @@
|
||||||
# Do not edit! Generated by kwsysDateStamp.py
|
|
||||||
#=============================================================================
|
|
||||||
# KWSys - Kitware System Library
|
|
||||||
# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
|
||||||
#
|
|
||||||
# Distributed under the OSI-approved BSD License (the "License");
|
|
||||||
# see accompanying file Copyright.txt for details.
|
|
||||||
#
|
|
||||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the License for more information.
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
# KWSys version date year component. Format is CCYY.
|
|
||||||
SET(KWSYS_DATE_STAMP_YEAR 2012)
|
|
||||||
|
|
||||||
# KWSys version date month component. Format is MM.
|
|
||||||
SET(KWSYS_DATE_STAMP_MONTH 04)
|
|
||||||
|
|
||||||
# KWSys version date day component. Format is DD.
|
|
||||||
SET(KWSYS_DATE_STAMP_DAY 20)
|
|
|
@ -1,54 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
#=============================================================================
|
|
||||||
# KWSys - Kitware System Library
|
|
||||||
# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
|
||||||
#
|
|
||||||
# Distributed under the OSI-approved BSD License (the "License");
|
|
||||||
# see accompanying file Copyright.txt for details.
|
|
||||||
#
|
|
||||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the License for more information.
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
import sys,os
|
|
||||||
import time
|
|
||||||
|
|
||||||
# Get the path to the directory containing this script.
|
|
||||||
if __name__ == '__main__':
|
|
||||||
selfdir = os.path.abspath(sys.path[0] or os.curdir)
|
|
||||||
else:
|
|
||||||
selfdir = os.path.abspath(os.path.dirname(__file__))
|
|
||||||
|
|
||||||
# Open the CMake code file.
|
|
||||||
fname = os.path.join(selfdir, 'kwsysDateStamp.cmake')
|
|
||||||
fout = open(fname, 'w');
|
|
||||||
|
|
||||||
# Get the current time.
|
|
||||||
ct = time.localtime()
|
|
||||||
|
|
||||||
# Write the CMake code describing the date.
|
|
||||||
fout.write("""# Do not edit! Generated by kwsysDateStamp.py
|
|
||||||
#=============================================================================
|
|
||||||
# KWSys - Kitware System Library
|
|
||||||
# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
|
||||||
#
|
|
||||||
# Distributed under the OSI-approved BSD License (the "License");
|
|
||||||
# see accompanying file Copyright.txt for details.
|
|
||||||
#
|
|
||||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
# See the License for more information.
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
# KWSys version date year component. Format is CCYY.
|
|
||||||
SET(KWSYS_DATE_STAMP_YEAR %04u)
|
|
||||||
|
|
||||||
# KWSys version date month component. Format is MM.
|
|
||||||
SET(KWSYS_DATE_STAMP_MONTH %02u)
|
|
||||||
|
|
||||||
# KWSys version date day component. Format is DD.
|
|
||||||
SET(KWSYS_DATE_STAMP_DAY %02u)
|
|
||||||
""" % (ct.tm_year, ct.tm_mon, ct.tm_mday))
|
|
||||||
|
|
||||||
fout.close()
|
|
Loading…
Reference in New Issue