mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
cmDependsC: Use faster cmSystemTools::FileTimeCompare
The file stat caching feature of the local cmFileTimeComparison instance is unused in the addressed context. To avoid the allocation and initialization overhead of cmFileTimeComparison use cmSystemTools::FileTimeCompare instead.
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#include <utility>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmFileTimeComparison.h"
|
||||
#include "cmLocalGenerator.h"
|
||||
#include "cmMakefile.h"
|
||||
#include "cmSystemTools.h"
|
||||
@@ -258,8 +257,8 @@ void cmDependsC::ReadCacheFile()
|
||||
if (!haveFileName) {
|
||||
haveFileName = true;
|
||||
int newer = 0;
|
||||
cmFileTimeComparison comp;
|
||||
bool res = comp.FileTimeCompare(this->CacheFileName, line, &newer);
|
||||
bool res =
|
||||
cmSystemTools::FileTimeCompare(this->CacheFileName, line, &newer);
|
||||
|
||||
if (res && newer == 1) // cache is newer than the parsed file
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user