diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-12-18 20:03:38 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-12-18 23:06:00 (GMT) |
commit | e2a489c76aed54e96e85627a66692a11784e9824 (patch) | |
tree | 79cbeb1d914183e4a796f8da12b254016a337c23 /Source/CTest/cmCTestTestHandler.cxx | |
parent | 0f99feec04193504a5a9ffc05e2132619ecf7dfe (diff) | |
download | CMake-e2a489c76aed54e96e85627a66692a11784e9824.zip CMake-e2a489c76aed54e96e85627a66692a11784e9824.tar.gz CMake-e2a489c76aed54e96e85627a66692a11784e9824.tar.bz2 |
Remove some temporary vectors for ExpandListArgument.
Expand directly into the target when possible.
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 51 |
1 files changed, 6 insertions, 45 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index f330e58..78f1fd4 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2153,25 +2153,11 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "ATTACHED_FILES" ) { - std::vector<std::string> lval; - cmSystemTools::ExpandListArgument(val, lval); - - for(std::vector<std::string>::iterator f = lval.begin(); - f != lval.end(); ++f) - { - rtit->AttachedFiles.push_back(*f); - } + cmSystemTools::ExpandListArgument(val, rtit->AttachedFiles); } if ( key == "ATTACHED_FILES_ON_FAIL" ) { - std::vector<std::string> lval; - cmSystemTools::ExpandListArgument(val, lval); - - for(std::vector<std::string>::iterator f = lval.begin(); - f != lval.end(); ++f) - { - rtit->AttachOnFail.push_back(*f); - } + cmSystemTools::ExpandListArgument(val, rtit->AttachOnFail); } if ( key == "RESOURCE_LOCK" ) { @@ -2195,14 +2181,7 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "REQUIRED_FILES" ) { - std::vector<std::string> lval; - cmSystemTools::ExpandListArgument(val, lval); - - for(std::vector<std::string>::iterator f = lval.begin(); - f != lval.end(); ++f) - { - rtit->RequiredFiles.push_back(*f); - } + cmSystemTools::ExpandListArgument(val, rtit->RequiredFiles); } if ( key == "RUN_SERIAL" ) { @@ -2239,33 +2218,15 @@ bool cmCTestTestHandler::SetTestsProperties( } if ( key == "DEPENDS" ) { - std::vector<std::string> lval; - cmSystemTools::ExpandListArgument(val, lval); - std::vector<std::string>::iterator crit; - for ( crit = lval.begin(); crit != lval.end(); ++ crit ) - { - rtit->Depends.push_back(*crit); - } + cmSystemTools::ExpandListArgument(val, rtit->Depends); } if ( key == "ENVIRONMENT" ) { - std::vector<std::string> lval; - cmSystemTools::ExpandListArgument(val, lval); - std::vector<std::string>::iterator crit; - for ( crit = lval.begin(); crit != lval.end(); ++ crit ) - { - rtit->Environment.push_back(*crit); - } + cmSystemTools::ExpandListArgument(val, rtit->Environment); } if ( key == "LABELS" ) { - std::vector<std::string> lval; - cmSystemTools::ExpandListArgument(val, lval); - std::vector<std::string>::iterator crit; - for ( crit = lval.begin(); crit != lval.end(); ++ crit ) - { - rtit->Labels.push_back(*crit); - } + cmSystemTools::ExpandListArgument(val, rtit->Labels); } if ( key == "MEASUREMENT" ) { |