diff options
author | Zack Galbreath <zack.galbreath@kitware.com> | 2017-10-30 17:14:45 (GMT) |
---|---|---|
committer | Zack Galbreath <zack.galbreath@kitware.com> | 2017-10-31 14:00:38 (GMT) |
commit | 0987a399ec01813e16c0a2c86d481e2b8e2aab25 (patch) | |
tree | f0922408236da7d41becb81404f84d9878138096 /Source | |
parent | 41d796be155e0da8fec66cb281429ed0eb91650d (diff) | |
download | CMake-0987a399ec01813e16c0a2c86d481e2b8e2aab25.zip CMake-0987a399ec01813e16c0a2c86d481e2b8e2aab25.tar.gz CMake-0987a399ec01813e16c0a2c86d481e2b8e2aab25.tar.bz2 |
CTest: fix Time formatting in Notes.xml
Notes.xml was reporting its timestamp in E-notation. Here's an example of
what this looked like:
<Time>1.50938e+09</Time>
This format is unsuitable for precisely determining when the Notes file
was generated. As a result of this commit, the same field now appears as:
<Time>1509383044</Time>
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCTest.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 4ea1493..37ff901 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -12,6 +12,7 @@ #include "cmsys/String.hxx" #include "cmsys/SystemInformation.hxx" #include <algorithm> +#include <cstdint> #include <ctype.h> #include <iostream> #include <map> @@ -1421,7 +1422,7 @@ int cmCTest::GenerateCTestNotesOutput(cmXMLWriter& xml, std::string note_time = this->CurrentTime(); xml.StartElement("Note"); xml.Attribute("Name", file); - xml.Element("Time", cmSystemTools::GetTime()); + xml.Element("Time", static_cast<uint64_t>(cmSystemTools::GetTime())); xml.Element("DateTime", note_time); xml.StartElement("Text"); cmsys::ifstream ifs(file.c_str()); |