summaryrefslogtreecommitdiff
path: root/Source/cmLoadCacheCommand.cxx
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
committerAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
commitef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (patch)
tree6501b44707b5c6a88fa5f817adee1a3ffcb0012d /Source/cmLoadCacheCommand.cxx
parent035c7fabc3b82cbc9a346c11abe2e9462b4c0379 (diff)
downloadcmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.gz
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.bz2
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.zip
Imported Upstream version 2.8.10.2upstream/2.8.10.2
Diffstat (limited to 'Source/cmLoadCacheCommand.cxx')
-rw-r--r--Source/cmLoadCacheCommand.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx
index a239e55bf..462e086ef 100644
--- a/Source/cmLoadCacheCommand.cxx
+++ b/Source/cmLoadCacheCommand.cxx
@@ -26,7 +26,7 @@ bool cmLoadCacheCommand
{
return this->ReadWithPrefix(args);
}
-
+
// Cache entries to be excluded from the import list.
// If this set is empty, all cache entries are brought in
// and they can not be overridden.
@@ -97,7 +97,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector<std::string> const& args)
this->SetError("READ_WITH_PREFIX form must specify a prefix.");
return false;
}
-
+
// Make sure the cache file exists.
std::string cacheFile = args[0]+"/CMakeCache.txt";
if(!cmSystemTools::FileExists(cacheFile.c_str()))
@@ -106,22 +106,22 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector<std::string> const& args)
this->SetError(e.c_str());
return false;
}
-
+
// Prepare the table of variables to read.
this->Prefix = args[2];
for(unsigned int i=3; i < args.size(); ++i)
{
this->VariablesToRead.insert(args[i]);
}
-
+
// Read the cache file.
- std::ifstream fin(cacheFile.c_str());
-
+ std::ifstream fin(cacheFile.c_str());
+
// This is a big hack read loop to overcome a buggy ifstream
// implementation on HP-UX. This should work on all platforms even
// for small buffer sizes.
const int bufferSize = 4096;
- char buffer[bufferSize];
+ char buffer[bufferSize];
std::string line;
while(fin)
{
@@ -152,7 +152,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector<std::string> const& args)
// Completed a line.
this->CheckLine(line.c_str());
line = "";
-
+
// Skip the newline character.
++i;
}
@@ -164,7 +164,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector<std::string> const& args)
// Partial last line.
this->CheckLine(line.c_str());
}
-
+
return true;
}