diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-07-18 08:45:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-22 14:58:19 (GMT) |
commit | 8ea0b81d20d3fff15e4aa35d68945cb1f0f011ec (patch) | |
tree | 96dfe2e7743014216485b7175bfa3114cc7408c1 | |
parent | 265b9db7c2c865c5aad821bf9a377ea84dfe431e (diff) | |
download | CMake-8ea0b81d20d3fff15e4aa35d68945cb1f0f011ec.zip CMake-8ea0b81d20d3fff15e4aa35d68945cb1f0f011ec.tar.gz CMake-8ea0b81d20d3fff15e4aa35d68945cb1f0f011ec.tar.bz2 |
cmAlgorithms: Rename cmRange to cmMakeRange.
-rw-r--r-- | Source/cmAlgorithms.h | 4 | ||||
-rw-r--r-- | Source/cmFileCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmFindBase.cxx | 4 | ||||
-rw-r--r-- | Source/cmFunctionCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmListCommand.cxx | 12 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 2 | ||||
-rw-r--r-- | Source/cmMacroCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 2 | ||||
-rw-r--r-- | Source/cmMessageCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmOutputConverter.cxx | 2 | ||||
-rw-r--r-- | Source/cmSetCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmStringCommand.cxx | 12 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 2 | ||||
-rw-r--r-- | Source/cmcmd.cxx | 9 |
14 files changed, 30 insertions, 29 deletions
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index f117475..5013e74 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -179,14 +179,14 @@ private: } template<typename Iter1, typename Iter2> -ContainerAlgorithms::Range<Iter1> cmRange(Iter1 begin, Iter2 end) +ContainerAlgorithms::Range<Iter1> cmMakeRange(Iter1 begin, Iter2 end) { return ContainerAlgorithms::Range<Iter1>(begin, end); } template<typename Range> ContainerAlgorithms::Range<typename Range::const_iterator> -cmRange(Range const& range) +cmMakeRange(Range const& range) { return ContainerAlgorithms::Range<typename Range::const_iterator>( range.begin(), range.end()); diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 3d84f38..0daed66 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -270,7 +270,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args, this->SetError(error); return false; } - std::string message = cmJoin(cmRange(i, args.end()), std::string()); + std::string message = cmJoin(cmMakeRange(i, args.end()), std::string()); file << message; file.close(); if(mode) diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index add06a7..7959ffe 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -170,8 +170,8 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn) else { this->VariableDocumentation += "one of the "; - this->VariableDocumentation += cmJoin(cmRange(this->Names).retreat(1), - ", "); + this->VariableDocumentation += + cmJoin(cmMakeRange(this->Names).retreat(1), ", "); this->VariableDocumentation += " or " + this->Names[this->Names.size() - 1] + " libraries be found"; } diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 78853ce..c883ad7 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -125,7 +125,7 @@ bool cmFunctionHelperCommand::InvokeInitialPass std::string argvDef = cmJoin(expandedArgs, ";"); std::vector<std::string>::const_iterator eit = expandedArgs.begin() + (this->Args.size()-1); - std::string argnDef = cmJoin(cmRange(eit, expandedArgs.end()), ";"); + std::string argnDef = cmJoin(cmMakeRange(eit, expandedArgs.end()), ";"); this->Makefile->AddDefinition("ARGV", argvDef.c_str()); this->Makefile->MarkVariableAsUsed("ARGV"); this->Makefile->AddDefinition("ARGN", argnDef.c_str()); diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index f96b4a8..6041fb7 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -247,7 +247,7 @@ bool cmListCommand::HandleAppendCommand(std::vector<std::string> const& args) { listString += ";"; } - listString += cmJoin(cmRange(args).advance(2), ";"); + listString += cmJoin(cmMakeRange(args).advance(2), ";"); this->Makefile->AddDefinition(listName, listString.c_str()); return true; @@ -361,9 +361,9 @@ bool cmListCommand std::vector<std::string>::const_iterator remBegin = remove.begin(); std::vector<std::string>::const_iterator argsEnd = - cmRemoveMatching(varArgsExpanded, cmRange(remBegin, remEnd)); + cmRemoveMatching(varArgsExpanded, cmMakeRange(remBegin, remEnd)); std::vector<std::string>::const_iterator argsBegin = varArgsExpanded.begin(); - std::string value = cmJoin(cmRange(argsBegin, argsEnd), ";"); + std::string value = cmJoin(cmMakeRange(argsBegin, argsEnd), ";"); this->Makefile->AddDefinition(listName, value.c_str()); return true; } @@ -421,7 +421,7 @@ bool cmListCommand cmRemoveDuplicates(varArgsExpanded); std::vector<std::string>::const_iterator argsBegin = varArgsExpanded.begin(); - std::string value = cmJoin(cmRange(argsBegin, argsEnd), ";"); + std::string value = cmJoin(cmMakeRange(argsBegin, argsEnd), ";"); this->Makefile->AddDefinition(listName, value.c_str()); return true; @@ -509,9 +509,9 @@ bool cmListCommand::HandleRemoveAtCommand( std::vector<size_t>::const_iterator remBegin = removed.begin(); std::vector<std::string>::const_iterator argsEnd = - cmRemoveIndices(varArgsExpanded, cmRange(remBegin, remEnd)); + cmRemoveIndices(varArgsExpanded, cmMakeRange(remBegin, remEnd)); std::vector<std::string>::const_iterator argsBegin = varArgsExpanded.begin(); - std::string value = cmJoin(cmRange(argsBegin, argsEnd), ";"); + std::string value = cmJoin(cmMakeRange(argsBegin, argsEnd), ";"); this->Makefile->AddDefinition(listName, value.c_str()); return true; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 077d4d9..ca4d359 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -2259,7 +2259,7 @@ cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p, std::string()); std::vector<std::string>::const_iterator compStart = components.begin() + 1; - result += cmJoin(cmRange(compStart, compEnd), slash); + result += cmJoin(cmMakeRange(compStart, compEnd), slash); // Only the last component can be empty to avoid double slashes. result += slash; result += components.back(); diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index fa5a623..e4026b0 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -107,7 +107,7 @@ bool cmMacroHelperCommand::InvokeInitialPass std::vector<std::string>::const_iterator eit = expandedArgs.begin() + (this->Args.size() - 1); - std::string expandedArgn = cmJoin(cmRange(eit, expandedArgs.end()), ";"); + std::string expandedArgn = cmJoin(cmMakeRange(eit, expandedArgs.end()), ";"); std::string expandedArgv = cmJoin(expandedArgs, ";"); std::vector<std::string> variables; variables.reserve(this->Args.size() - 1); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ae69b24..e4ecd1f 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1427,7 +1427,7 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove) std::remove(defs.begin(), defs.end(), define); std::vector<std::string>::const_iterator defBegin = defs.begin(); - std::string ndefs = cmJoin(cmRange(defBegin, defEnd), ";"); + std::string ndefs = cmJoin(cmMakeRange(defBegin, defEnd), ";"); // Store the new list. this->SetProperty("COMPILE_DEFINITIONS", ndefs.c_str()); diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index 0449c50..2854a82 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -69,7 +69,7 @@ bool cmMessageCommand ++i; } - std::string message = cmJoin(cmRange(i, args.end()), std::string()); + std::string message = cmJoin(cmMakeRange(i, args.end()), std::string()); if (type != cmake::MESSAGE) { diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 91f3c0a..7be5b3f 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -293,7 +293,7 @@ cmOutputConverter::ConvertToRelativePath(const std::vector<std::string>& local, { relative += "/"; } - relative += cmJoin(cmRange(remote).advance(common), "/"); + relative += cmJoin(cmMakeRange(remote).advance(common), "/"); // Finally return the path. return relative; diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index bf9f42c..306276b 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -108,7 +108,7 @@ bool cmSetCommand } // collect any values into a single semi-colon separated value list - value = cmJoin(cmRange(args).advance(1).retreat(ignoreLastArgs), ";"); + value = cmJoin(cmMakeRange(args).advance(1).retreat(ignoreLastArgs), ";"); if (parentScope) { diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index efc1f16..649fb39 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -319,7 +319,7 @@ bool cmStringCommand::RegexMatch(std::vector<std::string> const& args) } // Concatenate all the last arguments together. - std::string input = cmJoin(cmRange(args).advance(4), std::string()); + std::string input = cmJoin(cmMakeRange(args).advance(4), std::string()); // Scan through the input for all matches. std::string output; @@ -365,7 +365,7 @@ bool cmStringCommand::RegexMatchAll(std::vector<std::string> const& args) } // Concatenate all the last arguments together. - std::string input = cmJoin(cmRange(args).advance(4), std::string()); + std::string input = cmJoin(cmMakeRange(args).advance(4), std::string()); // Scan through the input for all matches. std::string output; @@ -465,7 +465,7 @@ bool cmStringCommand::RegexReplace(std::vector<std::string> const& args) } // Concatenate all the last arguments together. - std::string input = cmJoin(cmRange(args).advance(5), std::string()); + std::string input = cmJoin(cmMakeRange(args).advance(5), std::string()); // Scan through the input for all matches. std::string output; @@ -665,7 +665,7 @@ bool cmStringCommand::HandleReplaceCommand(std::vector<std::string> const& const std::string& replaceExpression = args[2]; const std::string& variableName = args[3]; - std::string input = cmJoin(cmRange(args).advance(4), std::string()); + std::string input = cmJoin(cmMakeRange(args).advance(4), std::string()); cmsys::SystemTools::ReplaceString(input, matchExpression.c_str(), replaceExpression.c_str()); @@ -756,7 +756,7 @@ bool cmStringCommand::HandleAppendCommand(std::vector<std::string> const& args) { value = oldValue; } - value += cmJoin(cmRange(args).advance(2), std::string()); + value += cmJoin(cmMakeRange(args).advance(2), std::string()); this->Makefile->AddDefinition(variable, value.c_str()); return true; } @@ -772,7 +772,7 @@ bool cmStringCommand } std::string const& variableName = args[1]; - std::string value = cmJoin(cmRange(args).advance(2), std::string()); + std::string value = cmJoin(cmMakeRange(args).advance(2), std::string()); this->Makefile->AddDefinition(variableName, value.c_str()); return true; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 46e9ed4..ac39387 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6674,7 +6674,7 @@ void cmTarget::CheckPropertyCompatibility(cmComputeLinkInformation *info, } std::sort(props.begin(), props.end()); - std::string propsString = cmJoin(cmRange(props).retreat(1), ", "); + std::string propsString = cmJoin(cmMakeRange(props).retreat(1), ", "); propsString += " and the " + props.back(); std::ostringstream e; diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 63838b4..71f47f3 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -335,14 +335,14 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) // Echo string else if (args[1] == "echo" ) { - std::cout << cmJoin(cmRange(args).advance(2), " ") << std::endl; + std::cout << cmJoin(cmMakeRange(args).advance(2), " ") << std::endl; return 0; } // Echo string no new line else if (args[1] == "echo_append" ) { - std::cout << cmJoin(cmRange(args).advance(2), " "); + std::cout << cmJoin(cmMakeRange(args).advance(2), " "); return 0; } @@ -511,7 +511,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) // Clock command else if (args[1] == "time" && args.size() > 2) { - std::string command = cmJoin(cmRange(args).advance(2), " "); + std::string command = cmJoin(cmMakeRange(args).advance(2), " "); clock_t clock_start, clock_finish; time_t time_start, time_finish; @@ -572,7 +572,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) return 1; } - std::string command = cmWrap('"', cmRange(args).advance(3), '"', " "); + std::string command = + cmWrap('"', cmMakeRange(args).advance(3), '"', " "); int retval = 0; int timeout = 0; if ( cmSystemTools::RunSingleCommand(command.c_str(), 0, 0, &retval, |