summaryrefslogtreecommitdiff
path: root/Source/cmPropertyMap.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2007-11-06 14:16:00 -0500
committerKen Martin <ken.martin@kitware.com>2007-11-06 14:16:00 -0500
commit433a9149108c88d4fb715331f97ee079fa16fe10 (patch)
tree752b46257e94a03c6d65bb5ac329e83729ff9871 /Source/cmPropertyMap.cxx
parent8eae7fddf29dc9531c2c7ac87dcf2dbf4a4c8dec (diff)
downloadcmake-433a9149108c88d4fb715331f97ee079fa16fe10.tar.gz
ENH: different way of testing properties
Diffstat (limited to 'Source/cmPropertyMap.cxx')
-rw-r--r--Source/cmPropertyMap.cxx66
1 files changed, 4 insertions, 62 deletions
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx
index 68206947fa..dcd3cb71af 100644
--- a/Source/cmPropertyMap.cxx
+++ b/Source/cmPropertyMap.cxx
@@ -51,38 +51,9 @@ void cmPropertyMap::SetProperty(const char *name, const char *value,
cmSystemTools::Error("CMakeInstance not set on a property map!");
abort();
}
- else if (!this->CMakeInstance->IsPropertyDefined(name,scope))
+ else
{
- // is a property being queried without being defined first? If so then
- // report it as we probably need to document it
- std::string msg = "Property ";
- msg += name;
- msg += " set yet undefined on ";
- switch (scope)
- {
- case cmProperty::TARGET:
- msg += "target.";
- break;
- case cmProperty::SOURCE_FILE:
- msg += "source file.";
- break;
- case cmProperty::DIRECTORY:
- msg += "directory.";
- break;
- case cmProperty::TEST:
- msg += "test.";
- break;
- case cmProperty::VARIABLE:
- msg += "variable.";
- break;
- case cmProperty::CACHED_VARIABLE:
- msg += "cached variable.";
- break;
- default:
- msg += "unknown.";
- break;
- }
- cmSystemTools::Error(msg.c_str());
+ this->CMakeInstance->RecordPropertyAccess(name,scope);
}
#else
(void)scope;
@@ -110,38 +81,9 @@ const char *cmPropertyMap
cmSystemTools::Error("CMakeInstance not set on a property map!");
abort();
}
- else if (!this->CMakeInstance->IsPropertyDefined(name,scope))
+ else
{
- // is a property being queried without being defined first? If so then
- // report it as we probably need to document it
- std::string msg = "Property ";
- msg += name;
- msg += " queried yet undefined on ";
- switch (scope)
- {
- case cmProperty::TARGET:
- msg += "target.";
- break;
- case cmProperty::SOURCE_FILE:
- msg += "source file.";
- break;
- case cmProperty::DIRECTORY:
- msg += "directory.";
- break;
- case cmProperty::TEST:
- msg += "test.";
- break;
- case cmProperty::VARIABLE:
- msg += "variable.";
- break;
- case cmProperty::CACHED_VARIABLE:
- msg += "cached variable.";
- break;
- default:
- msg += "unknown.";
- break;
- }
- cmSystemTools::Error(msg.c_str());
+ this->CMakeInstance->RecordPropertyAccess(name,scope);
}
#endif