From e5394324954f0f6d0358fa360b3adc18ea541c94 Mon Sep 17 00:00:00 2001 From: Geoffrey Cross Date: Thu, 10 May 2001 16:21:45 -0400 Subject: [PATCH] definitions should now be overwritten if they already exist --- Source/cmMakefile.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 3e2e81c431..6fa2084c14 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -173,7 +173,6 @@ void cmMakefile::Print() const // is "filename" and not "external". bool cmMakefile::ReadListFile(const char* filename, const char* external) { - // keep track of the current file being read if (filename) { @@ -444,16 +443,20 @@ void cmMakefile::AddIncludeDirectory(const char* inc) void cmMakefile::AddDefinition(const char* name, const char* value) { + m_Definitions.erase( DefinitionMap::key_type(name)); m_Definitions.insert(DefinitionMap::value_type(name, value)); } + void cmMakefile::AddDefinition(const char* name, bool value) { if(value) { + m_Definitions.erase( DefinitionMap::key_type(name)); m_Definitions.insert(DefinitionMap::value_type(name, "ON")); } else { + m_Definitions.erase( DefinitionMap::key_type(name)); m_Definitions.insert(DefinitionMap::value_type(name, "OFF")); } }