: project (project),\r
node (moduleNode),\r
importLibrary (NULL),\r
- bootstrap (NULL)\r
+ bootstrap (NULL),\r
+ pch (NULL),\r
+ cplusplus (false)\r
{\r
if ( node.name != "module" )\r
throw Exception ( "internal tool error: Module created with non-<module> node" );\r
delete compilerFlags[i];\r
for ( i = 0; i < linkerFlags.size(); i++ )\r
delete linkerFlags[i];\r
+ if ( pch )\r
+ delete pch;\r
}\r
\r
void\r
for ( i = 0; i < linkerFlags.size(); i++ )\r
linkerFlags[i]->ProcessXML();\r
non_if_data.ProcessXML();\r
+ if ( pch )\r
+ pch->ProcessXML();\r
}\r
\r
void\r
e.location,\r
"attribute 'first' of <file> element can only be 'true' or 'false'" );\r
}\r
+ if ( !cplusplus )\r
+ {\r
+ // check for c++ file\r
+ string ext = GetExtension ( e.value );\r
+ if ( !stricmp ( ext.c_str(), ".cpp" ) )\r
+ cplusplus = true;\r
+ else if ( !stricmp ( ext.c_str(), ".cc" ) )\r
+ cplusplus = true;\r
+ else if ( !stricmp ( ext.c_str(), ".cxx" ) )\r
+ cplusplus = true;\r
+ }\r
File* pFile = new File ( FixSeparator ( path + CSEP + e.value ), first );\r
if ( pIf )\r
pIf->data.files.push_back ( pFile );\r
bootstrap = new Bootstrap ( project, this, e );\r
subs_invalid = true;\r
}\r
+ else if ( e.name == "pch" )\r
+ {\r
+ if ( pIf )\r
+ throw InvalidBuildFileException (\r
+ e.location,\r
+ "<pch> is not a valid sub-element of <if>" );\r
+ if ( pch )\r
+ throw InvalidBuildFileException (\r
+ e.location,\r
+ "Only one <pch> is valid per module" );\r
+ pch = new PchFile (\r
+ e, *this, FixSeparator ( path + CSEP + e.value ) );\r
+ subs_invalid = true;\r
+ }\r
if ( subs_invalid && e.subElements.size() > 0 )\r
throw InvalidBuildFileException (\r
e.location,\r
Property::ProcessXML()\r
{\r
}\r
+\r
+\r
+PchFile::PchFile (\r
+ const XMLElement& node_,\r
+ const Module& module_,\r
+ const string& header_ )\r
+ : node(node_), module(module_), header(header_)\r
+{\r
+}\r
+\r
+void\r
+PchFile::ProcessXML()\r
+{\r
+}\r