|
@@ -2004,8 +2004,7 @@ cmGlobalGenerator::GetDirectoryContent(std::string const& dir, bool needDisk)
|
|
|
//----------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------
|
|
|
void
|
|
void
|
|
|
cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
|
|
cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
|
|
|
- std::vector<std::string>::const_iterator first,
|
|
|
|
|
- std::vector<std::string>::const_iterator last)
|
|
|
|
|
|
|
+ std::string const& content)
|
|
|
{
|
|
{
|
|
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
|
|
// Ignore if there are no outputs.
|
|
// Ignore if there are no outputs.
|
|
@@ -2017,16 +2016,12 @@ cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
|
|
|
// Compute a hash of the rule.
|
|
// Compute a hash of the rule.
|
|
|
RuleHash hash;
|
|
RuleHash hash;
|
|
|
{
|
|
{
|
|
|
- unsigned char const* data;
|
|
|
|
|
- int length;
|
|
|
|
|
|
|
+ unsigned char const* data =
|
|
|
|
|
+ reinterpret_cast<unsigned char const*>(content.c_str());
|
|
|
|
|
+ int length = static_cast<int>(content.length());
|
|
|
cmsysMD5* sum = cmsysMD5_New();
|
|
cmsysMD5* sum = cmsysMD5_New();
|
|
|
cmsysMD5_Initialize(sum);
|
|
cmsysMD5_Initialize(sum);
|
|
|
- for(std::vector<std::string>::const_iterator i = first; i != last; ++i)
|
|
|
|
|
- {
|
|
|
|
|
- data = reinterpret_cast<unsigned char const*>(i->c_str());
|
|
|
|
|
- length = static_cast<int>(i->length());
|
|
|
|
|
- cmsysMD5_Append(sum, data, length);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ cmsysMD5_Append(sum, data, length);
|
|
|
cmsysMD5_FinalizeHex(sum, hash.Data);
|
|
cmsysMD5_FinalizeHex(sum, hash.Data);
|
|
|
cmsysMD5_Delete(sum);
|
|
cmsysMD5_Delete(sum);
|
|
|
}
|
|
}
|