diff options
author | Brad King <brad.king@kitware.com> | 2014-01-07 14:39:17 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-01-07 14:39:17 (GMT) |
commit | 3a024ce0d8aeec991297b7997a872093176e373e (patch) | |
tree | a9f0f79d5ae489ccb3d352ce71f1d0f8c81354aa /Source/cmake.cxx | |
parent | 91dcc9bef390f6644e1a357ed2226f350742f49b (diff) | |
parent | 5730710c86e5b844c48e17e9001647ae0aa841a3 (diff) | |
download | CMake-3a024ce0d8aeec991297b7997a872093176e373e.zip CMake-3a024ce0d8aeec991297b7997a872093176e373e.tar.gz CMake-3a024ce0d8aeec991297b7997a872093176e373e.tar.bz2 |
Merge topic 'unicode-fstream'
5730710 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 741e263..1dd8a66 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -28,6 +28,7 @@ #include <cmsys/Glob.hxx> #include <cmsys/RegularExpression.hxx> +#include <cmsys/FStream.hxx> // only build kdevelop generator on non-windows platforms // when not bootstrapping cmake @@ -1861,7 +1862,7 @@ void cmake::UpdateConversionPathTable() if(tablepath) { - std::ifstream table( tablepath ); + cmsys::ifstream table( tablepath ); if(!table) { cmSystemTools::Error("CMAKE_PATH_TRANSLATION_FILE set to ", tablepath, @@ -2387,7 +2388,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args) // echo results to stdout if needed if (writeToStdout) { - FILE* fin = fopen(resultFile.c_str(), "r"); + FILE* fin = cmsys::SystemTools::Fopen(resultFile.c_str(), "r"); if(fin) { const int bufferSize = 4096; @@ -2421,9 +2422,9 @@ static bool cmakeCheckStampFile(const char* stampName) std::string stampDepends = stampName; stampDepends += ".depend"; #if defined(_WIN32) || defined(__CYGWIN__) - std::ifstream fin(stampDepends.c_str(), std::ios::in | std::ios::binary); + cmsys::ifstream fin(stampDepends.c_str(), std::ios::in | std::ios::binary); #else - std::ifstream fin(stampDepends.c_str(), std::ios::in); + cmsys::ifstream fin(stampDepends.c_str(), std::ios::in); #endif if(!fin) { @@ -2464,7 +2465,7 @@ static bool cmakeCheckStampFile(const char* stampName) { // TODO: Teach cmGeneratedFileStream to use a random temp file (with // multiple tries in unlikely case of conflict) and use that here. - std::ofstream stamp(stampTemp); + cmsys::ofstream stamp(stampTemp); stamp << "# CMake generation timestamp file for this directory.\n"; } if(cmSystemTools::RenameFile(stampTemp, stampName)) @@ -2494,7 +2495,7 @@ static bool cmakeCheckStampList(const char* stampList) << "is missing.\n"; return false; } - std::ifstream fin(stampList); + cmsys::ifstream fin(stampList); if(!fin) { std::cout << "CMake is re-running because generate.stamp.list " |