From aa29bbc3260453959b65104881e9b1e18d278700 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 18 Sep 2002 10:39:41 -0400 Subject: [PATCH] ENH: Added RemoveDefinition method. --- Source/cmMakefile.cxx | 5 +++++ Source/cmMakefile.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index f1d706ec9..ec8871b32 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -586,6 +586,11 @@ void cmMakefile::AddCacheDefinition(const char* name, bool value, const char* do this->AddDefinition(name, value); } +void cmMakefile::RemoveDefinition(const char* name) +{ + m_Definitions.erase(DefinitionMap::key_type(name)); +} + void cmMakefile::SetProjectName(const char* p) { m_ProjectName = p; diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index ae5704cd4..c14a4e3ce 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -199,6 +199,12 @@ public: ///! Add a definition to this makefile and the global cmake cache. void AddCacheDefinition(const char* name, bool, const char* doc); + /** + * Remove a variable definition from the build. This is not valid + * for cache entries, and will only affect the current makefile. + */ + void RemoveDefinition(const char* name); + /** * Specify the name of the project for this build. */