CMake: Fix dashboard test failure
Eliminate the platform difference in calling stat. We call stat normally in other places in the CMake code base just fine. Works everywhere we work. Will hopefully also fix the Borland Continuous dashboard failure that is occurring with respect to correctly measuring the modification time of a freshly generated file.
This commit is contained in:
parent
354ecc1e1f
commit
e28ce2483d
|
@ -33,16 +33,10 @@ std::string cmTimestamp::CurrentTime(
|
||||||
std::string cmTimestamp::FileModificationTime(const char* path,
|
std::string cmTimestamp::FileModificationTime(const char* path,
|
||||||
const std::string& formatString, bool utcFlag)
|
const std::string& formatString, bool utcFlag)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
struct stat info;
|
||||||
#define STAT _stat
|
|
||||||
#else
|
|
||||||
#define STAT stat
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct STAT info;
|
|
||||||
std::memset(&info, 0, sizeof(info));
|
std::memset(&info, 0, sizeof(info));
|
||||||
|
|
||||||
if(STAT(path, &info) != 0)
|
if(stat(path, &info) != 0)
|
||||||
{
|
{
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue