don't allow duplicate module names

svn path=/branches/xmlbuildsystem/; revision=12881
This commit is contained in:
Royce Mitchell III
2005-01-08 05:22:02 +00:00
parent aead7a68f9
commit 2f837bf69e
+8 -1
View File
@@ -77,7 +77,14 @@ Project::ProcessXMLSubElement ( const XMLElement& e, const string& path )
string subpath(path);
if ( e.name == "module" )
{
modules.push_back ( new Module ( *this, e, path ) );
Module* module = new Module ( *this, e, path );
if ( LocateModule ( module->name ) )
throw InvalidBuildFileException (
node->location,
"module name conflict: '%s' (originally defined at %s)",
module->name.c_str(),
module->node.location.c_str() );
modules.push_back ( module );
return; // defer processing until later
}
else if ( e.name == "directory" )