summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-04-27 15:30:31 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-04-27 15:30:31 (GMT)
commite09e1679abf03b4a6efffa52dba99852a2ccba01 (patch)
tree436334d45d6919ec2e17fe3e647b196395308c14 /Source/cmMakefile.cxx
parente76b103df7f04de330dec0384743027ded7e82d1 (diff)
downloadCMake-e09e1679abf03b4a6efffa52dba99852a2ccba01.zip
CMake-e09e1679abf03b4a6efffa52dba99852a2ccba01.tar.gz
CMake-e09e1679abf03b4a6efffa52dba99852a2ccba01.tar.bz2
ENH: Add method to get definition even if it does not exists
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b073bf9..c85ad61 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1378,6 +1378,16 @@ const char* cmMakefile::GetDefinition(const char* name) const
return def;
}
+const char* cmMakefile::GetSafeDefinition(const char* def) const
+{
+ const char* ret = this->GetDefinition(def);
+ if(!ret)
+ {
+ return "";
+ }
+ return ret;
+}
+
std::vector<std::string> cmMakefile::GetDefinitions(int cacheonly /* = 0 */) const
{
std::map<std::string, int> definitions;