From b0853b5fae2681f31f023a37d04cea1209b34dbd Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 16 Nov 2011 11:03:30 -0500 Subject: 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. --- Source/cmFileCommand.cxx | 7 +++++++ Source/cmStringCommand.cxx | 7 +++++++ 2 files changed, 14 insertions(+) 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 const& args) //---------------------------------------------------------------------------- bool cmFileCommand::HandleHashCommand(std::vector const& args) { +#if defined(CMAKE_BUILD_WITH_CMAKE) if(args.size() != 3) { cmOStringStream e; @@ -375,6 +376,12 @@ bool cmFileCommand::HandleHashCommand(std::vector 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 } //---------------------------------------------------------------------------- diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index f2f2681..ec10d57 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -96,6 +96,7 @@ bool cmStringCommand //---------------------------------------------------------------------------- bool cmStringCommand::HandleHashCommand(std::vector const& args) { +#if defined(CMAKE_BUILD_WITH_CMAKE) if(args.size() != 3) { cmOStringStream e; @@ -112,6 +113,12 @@ bool cmStringCommand::HandleHashCommand(std::vector const& args) return true; } return false; +#else + cmOStringStream e; + e << args[0] << " not available during bootstrap"; + this->SetError(e.str().c_str()); + return false; +#endif } //---------------------------------------------------------------------------- -- cgit v0.12