summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLib/run_compile_commands.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-05-18 13:44:28 (GMT)
committerBrad King <brad.king@kitware.com>2011-05-18 13:44:28 (GMT)
commitc45c60b24ff52d9435ceab0de027fbadac130a1f (patch)
treee4bc48a68cd02c19d03b99cf061c542d20f64322 /Tests/CMakeLib/run_compile_commands.cxx
parent7c5be5114c1c1adb26cfe7e8556187bf9bd8bd0a (diff)
downloadCMake-c45c60b24ff52d9435ceab0de027fbadac130a1f.zip
CMake-c45c60b24ff52d9435ceab0de027fbadac130a1f.tar.gz
CMake-c45c60b24ff52d9435ceab0de027fbadac130a1f.tar.bz2
run_compile_commands: Avoid extra stl vector conversion
The Sun compiler does not provide the proper vector constructor to initialize it from an iterator pair of a non-matching type. Extend the ParseUnixCommandLine API to provide a vector of the proper type so no conversion is needed.
Diffstat (limited to 'Tests/CMakeLib/run_compile_commands.cxx')
-rw-r--r--Tests/CMakeLib/run_compile_commands.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx
index cfb7ece..a0be2eb 100644
--- a/Tests/CMakeLib/run_compile_commands.cxx
+++ b/Tests/CMakeLib/run_compile_commands.cxx
@@ -127,9 +127,8 @@ int main ()
it = parser.GetTranslationUnits().begin(),
end = parser.GetTranslationUnits().end(); it != end; ++it)
{
- std::vector<std::string> std_command;
- cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), std_command);
- std::vector<cmStdString> command(std_command.begin(), std_command.end());
+ std::vector<cmStdString> command;
+ cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command);
if (!cmSystemTools::RunSingleCommand(
command, 0, 0, it->at("directory").c_str()))
{