diff options
author | Brad King <brad.king@kitware.com> | 2007-06-06 16:20:02 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-06-06 16:20:02 -0400 |
commit | db0f26e85264b47dabaa1d400ad2fec1eb848eac (patch) | |
tree | 9a1077fe904c820fa6ec3a4bb7af33a18ce03714 /Source/cmCommandArgumentParserHelper.cxx | |
parent | d016b69af3304965f4ce7fd1953e9901def528a4 (diff) | |
download | cmake-db0f26e85264b47dabaa1d400ad2fec1eb848eac.tar.gz |
BUG: Fixed @ONLY configuration to not try to parse ${} syntax at all. This fixes the original fix to bug#4393 and adds a test.
Diffstat (limited to 'Source/cmCommandArgumentParserHelper.cxx')
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 30e91a785a..f1efa68835 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -38,7 +38,6 @@ cmCommandArgumentParserHelper::cmCommandArgumentParserHelper() this->NoEscapeMode = false; this->ReplaceAtSyntax = false; - this->AtOnly = false; } @@ -72,18 +71,6 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, { return this->ExpandVariable(var); } - if(this->AtOnly) - { - std::string ref = "$"; - ref += key; - ref += "{"; - if(var) - { - ref += var; - } - ref += "}"; - return this->AddString(ref.c_str()); - } if ( strcmp(key, "ENV") == 0 ) { char *ptr = getenv(var); @@ -105,21 +92,8 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, return 0; } -char* cmCommandArgumentParserHelper::ExpandVariable(const char* var, - bool doingAt) +char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) { - // if we are in AtOnly mode, and we are not expanding an @ variable - // then put back the ${var} unexpanded - if(!doingAt && this->AtOnly) - { - std::string ref = "${"; - if(var) - { - ref += var; - } - ref += "}"; - return this->AddString(ref.c_str()); - } if(!var) { return 0; @@ -151,7 +125,7 @@ char* cmCommandArgumentParserHelper::ExpandVariableForAt(const char* var) if(this->ReplaceAtSyntax) { // try to expand the variable - char* ret = this->ExpandVariable(var, true); + char* ret = this->ExpandVariable(var); // if the return was 0 and we want to replace empty strings // then return an empty string if(!ret && this->RemoveEmpty) |