summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/kwsysPlatformCxxTests.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-02-17 15:49:16 (GMT)
committerBrad King <brad.king@kitware.com>2005-02-17 15:49:16 (GMT)
commit0fd1c5d8091569e1a94b37b5388422d55ba222c9 (patch)
tree2ab149dd74f0a603b5bd1b702139ab31087ca712 /Source/kwsys/kwsysPlatformCxxTests.cxx
parent590ca038840ada98fa8c0879e87e05665e580b8e (diff)
downloadCMake-0fd1c5d8091569e1a94b37b5388422d55ba222c9.zip
CMake-0fd1c5d8091569e1a94b37b5388422d55ba222c9.tar.gz
CMake-0fd1c5d8091569e1a94b37b5388422d55ba222c9.tar.bz2
ENH: Added try-compile KWSYS_STAT_HAS_ST_MTIM. This tests whether struct stat has the extra st_mtim member that has high resolution times.
Diffstat (limited to 'Source/kwsys/kwsysPlatformCxxTests.cxx')
-rw-r--r--Source/kwsys/kwsysPlatformCxxTests.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/kwsys/kwsysPlatformCxxTests.cxx b/Source/kwsys/kwsysPlatformCxxTests.cxx
index e43bde5..a799c50 100644
--- a/Source/kwsys/kwsysPlatformCxxTests.cxx
+++ b/Source/kwsys/kwsysPlatformCxxTests.cxx
@@ -29,3 +29,16 @@ int main() { return 0; }
#include <strstrea.h>
int main() { return 0; }
#endif
+
+#ifdef TEST_KWSYS_STAT_HAS_ST_MTIM
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+int main()
+{
+ struct stat stat1;
+ (void)stat1.st_mtim.tv_sec;
+ (void)stat1.st_mtim.tv_nsec;
+ return 0;
+}
+#endif