summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-11-16 16:03:30 (GMT)
committerBrad King <brad.king@kitware.com>2011-11-16 16:03:30 (GMT)
commitb0853b5fae2681f31f023a37d04cea1209b34dbd (patch)
tree78602218d8e375edd713a1167587d604b35c6220 /Source/cmFileCommand.cxx
parent9da8340a6d68ec1dce9248d0d83f59ba6f41003e (diff)
downloadCMake-b0853b5fae2681f31f023a37d04cea1209b34dbd.zip
CMake-b0853b5fae2681f31f023a37d04cea1209b34dbd.tar.gz
CMake-b0853b5fae2681f31f023a37d04cea1209b34dbd.tar.bz2
Disable file() and string() hash commands during bootstrap
We do not compile support for the cryptographic hashes during bootstrap. Disable the APIs that use them.
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index bab3116..6df5ab3 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -352,6 +352,7 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
//----------------------------------------------------------------------------
bool cmFileCommand::HandleHashCommand(std::vector<std::string> const& args)
{
+#if defined(CMAKE_BUILD_WITH_CMAKE)
if(args.size() != 3)
{
cmOStringStream e;
@@ -375,6 +376,12 @@ bool cmFileCommand::HandleHashCommand(std::vector<std::string> const& args)
this->SetError(e.str().c_str());
}
return false;
+#else
+ cmOStringStream e;
+ e << args[0] << " not available during bootstrap";
+ this->SetError(e.str().c_str());
+ return false;
+#endif
}
//----------------------------------------------------------------------------