diff options
author | Ken Martin <ken.martin@kitware.com> | 2006-06-22 14:35:37 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2006-06-22 14:35:37 (GMT) |
commit | 847c3a58494665dd47fe57a027df00ad7d16159d (patch) | |
tree | b6082911c7769c6c788c2a7e3231eea00d26d45c /Source/cmake.cxx | |
parent | 55b0935a79cf3c32637b9a4d2c39da7322870042 (diff) | |
download | CMake-847c3a58494665dd47fe57a027df00ad7d16159d.zip CMake-847c3a58494665dd47fe57a027df00ad7d16159d.tar.gz CMake-847c3a58494665dd47fe57a027df00ad7d16159d.tar.bz2 |
ENH: add a higher performance method to get the number of files in a directory
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 2f4100f..71af58c 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1024,9 +1024,8 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args) fclose(progFile); } } - cmsys::Directory dir; - dir.Load(dirName.c_str()); - int fileNum = static_cast<int>(dir.GetNumberOfFiles()); + int fileNum = static_cast<int> + (cmsys::Directory::GetNumberOfFilesInDirectory(dirName.c_str())); // read the count fName = dirName; fName += "/count.txt"; |