summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-10-12 17:51:15 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-10-12 17:51:15 (GMT)
commita51dfefe796c1c7108d92e79dc77607c8307ef4b (patch)
tree18f9de11905f9a57872b05160b2e02d8162228a8 /Source/cmake.cxx
parent2dd035c9a9fc712078c333ec282a741e6627624b (diff)
downloadCMake-a51dfefe796c1c7108d92e79dc77607c8307ef4b.zip
CMake-a51dfefe796c1c7108d92e79dc77607c8307ef4b.tar.gz
CMake-a51dfefe796c1c7108d92e79dc77607c8307ef4b.tar.bz2
ENH: Optimize performance by caching stat results
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index ad2a580..35f4ad2 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -21,6 +21,7 @@
#include "cmLocalGenerator.h"
#include "cmCommands.h"
#include "cmCommand.h"
+#include "cmFileTimeComparison.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
# include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback.
@@ -95,6 +96,7 @@ cmake::cmake()
{
m_DebugTryCompile = false;
m_ClearBuildSystem = false;
+ m_FileComparison = new cmFileTimeComparison;
#ifdef __APPLE__
struct rlimit rlp;
@@ -157,6 +159,7 @@ cmake::~cmake()
#ifdef CMAKE_BUILD_WITH_CMAKE
delete m_VariableWatch;
#endif
+ delete m_FileComparison;
}
void cmake::CleanupCommandsAndMacros()
@@ -1739,7 +1742,7 @@ int cmake::CheckBuildSystem()
out != outputs.end(); ++out)
{
int result = 0;
- if(!cmSystemTools::FileTimeCompare(out->c_str(), dep->c_str(), &result) ||
+ if(!m_FileComparison->FileTimeCompare(out->c_str(), dep->c_str(), &result) ||
result < 0)
{
return 1;