From c04cbcac70535788ca79ce7cf621f3baaf2abcbb Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Tue, 27 Dec 2005 13:10:23 -0500 Subject: ENH: Fix command line argument parsing --- Source/cmCTest.cxx | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 1e079b9..29e7f1d 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1241,34 +1241,7 @@ bool cmCTest::SubmitExtraFiles(const char* cfiles) //---------------------------------------------------------------------- bool cmCTest::CheckArgument(const std::string& arg, const char* varg1, const char* varg2) { - cmOStringStream ostr; - ostr << varg1; - if ( varg2 ) - { - ostr << ", " << varg2; - } - - size_t minlen = arg.size(); - size_t lenvarg = strlen(varg1); - if ( lenvarg < minlen ) - { - minlen = lenvarg; - } - if ( strncmp(arg.c_str(), varg1, minlen) == 0 ) - { - return true; - } - if ( ! varg2 ) - { - return false; - } - minlen = arg.size(); - lenvarg = strlen(varg2); - if ( lenvarg < minlen ) - { - minlen = lenvarg; - } - if ( strncmp(arg.c_str(), varg2, minlen) == 0 ) + if ( varg1 && arg == varg1 || varg2 && arg == varg2 ) { return true; } -- cgit v0.12