summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorGeoffrey Cross <geoff@cross.lu>2001-05-10 20:21:45 (GMT)
committerGeoffrey Cross <geoff@cross.lu>2001-05-10 20:21:45 (GMT)
commite5394324954f0f6d0358fa360b3adc18ea541c94 (patch)
tree49fbbc866f2a40bd9fba53698172b4d2f33fa7a9 /Source/cmMakefile.cxx
parentd04756d8f7096ce6a6f019fcc26be431a226dc6e (diff)
downloadCMake-e5394324954f0f6d0358fa360b3adc18ea541c94.zip
CMake-e5394324954f0f6d0358fa360b3adc18ea541c94.tar.gz
CMake-e5394324954f0f6d0358fa360b3adc18ea541c94.tar.bz2
definitions should now be overwritten if they already exist
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 3e2e81c..6fa2084 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"));
}
}