summaryrefslogtreecommitdiff
path: root/Source/cmCommandArgumentParserHelper.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-06-06 16:20:02 -0400
committerBrad King <brad.king@kitware.com>2007-06-06 16:20:02 -0400
commitdb0f26e85264b47dabaa1d400ad2fec1eb848eac (patch)
tree9a1077fe904c820fa6ec3a4bb7af33a18ce03714 /Source/cmCommandArgumentParserHelper.cxx
parentd016b69af3304965f4ce7fd1953e9901def528a4 (diff)
downloadcmake-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.cxx30
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)