@@ -2334,15 +2334,6 @@ bool ProjMgrWorker::ProcessComponentFiles(ContextItem& context) {
23342334 const auto & language = componentFile->GetAttribute (" language" );
23352335 const auto & select = componentFile->GetAttribute (" select" );
23362336 const auto & version = componentFile->GetSemVer ();
2337- switch (RteFile::CategoryFromString (category)) {
2338- case RteFile::Category::GEN_SOURCE :
2339- case RteFile::Category::GEN_HEADER :
2340- case RteFile::Category::GEN_PARAMS :
2341- case RteFile::Category::GEN_ASSET :
2342- continue ; // ignore gen files
2343- default :
2344- break ;
2345- };
23462337 context.componentFiles [componentId].push_back ({ name, attr, category, language, scope, version, select });
23472338 }
23482339 // config files
@@ -2357,21 +2348,12 @@ bool ProjMgrWorker::ProcessComponentFiles(ContextItem& context) {
23572348 const auto & category = configFile->GetAttribute (" category" );
23582349 const auto & language = configFile->GetAttribute (" language" );
23592350 const auto & scope = configFile->GetAttribute (" scope" );
2360- switch (RteFile::CategoryFromString (category)) {
2361- case RteFile::Category::GEN_SOURCE :
2362- case RteFile::Category::GEN_HEADER :
2363- case RteFile::Category::GEN_PARAMS :
2364- case RteFile::Category::GEN_ASSET :
2365- continue ; // ignore gen files
2366- default :
2367- break ;
2368- };
23692351 const auto & version = originalFile ? originalFile->GetSemVer () : " " ;
23702352 context.componentFiles [componentId].push_back ({ filename, " config" , category, language, scope, version });
23712353 }
23722354 }
23732355 }
2374- // input files for component generator. This list of files is directly fetched from the PDSC.
2356+ // input files for 'bootstrap' component generator. This list of files is directly fetched from the PDSC.
23752357 RteComponentInstance* rteBootstrapInstance = context.bootstrapComponents .find (componentId) != context.bootstrapComponents .end () ?
23762358 context.bootstrapMap .find (componentId) != context.bootstrapMap .end () ? context.bootstrapComponents .at (context.bootstrapMap .at (componentId)).instance :
23772359 context.bootstrapComponents .at (componentId).instance : nullptr ;
@@ -2396,6 +2378,16 @@ bool ProjMgrWorker::ProcessComponentFiles(ContextItem& context) {
23962378 const auto & filename = (attr == " config" && configFilePaths.find (rteFile) != configFilePaths.end ()) ?
23972379 configFilePaths[rteFile] : rteFile->GetOriginalAbsolutePath ();
23982380 context.generatorInputFiles [componentId].push_back ({ filename, attr, category, language, scope, version });
2381+ // remove file from parent component list to avoid duplicates
2382+ auto & componentFiles = context.componentFiles [componentId];
2383+ componentFiles.erase (
2384+ std::remove_if (
2385+ componentFiles.begin (),
2386+ componentFiles.end (),
2387+ [filename](const ComponentFileItem& item) { return item.name == filename;}
2388+ ),
2389+ componentFiles.end ()
2390+ );
23992391 }
24002392 }
24012393 }
0 commit comments