summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGetPropertyCommand.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 93c724a..88a3e7c 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -205,7 +205,14 @@ bool cmGetPropertyCommand::StoreResult(const char* value)
}
else // if(this->InfoType == OutValue)
{
- this->Makefile->AddDefinition(this->Variable.c_str(), value);
+ if(value)
+ {
+ this->Makefile->AddDefinition(this->Variable.c_str(), value);
+ }
+ else
+ {
+ this->Makefile->RemoveDefinition(this->Variable.c_str());
+ }
}
return true;
}