diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-12-27 18:10:23 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-12-27 18:10:23 (GMT) |
commit | c04cbcac70535788ca79ce7cf621f3baaf2abcbb (patch) | |
tree | 1e34903cb57a51cdc9d6032d07f03142d758f08c /Source/cmCTest.cxx | |
parent | 79479233d461c309d687a92fd276dcb1bfc9d101 (diff) | |
download | CMake-c04cbcac70535788ca79ce7cf621f3baaf2abcbb.zip CMake-c04cbcac70535788ca79ce7cf621f3baaf2abcbb.tar.gz CMake-c04cbcac70535788ca79ce7cf621f3baaf2abcbb.tar.bz2 |
ENH: Fix command line argument parsing
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 29 |
1 files changed, 1 insertions, 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; } |