Commit e5394324 authored by Geoffrey Cross's avatar Geoffrey Cross
Browse files

definitions should now be overwritten if they already exist

parent d04756d8
......@@ -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"));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment