@@ -1182,7 +1182,7 @@ ConnectionsValidationResult ProjMgrWorker::ValidateConnections(ConnectionsCollec
11821182 return { result, conflicts, overflows, incompatibles, missedCollections, activeConnectMap };
11831183}
11841184
1185- bool ProjMgrWorker::ProcessDevice (ContextItem& context) {
1185+ bool ProjMgrWorker::ProcessDevice (ContextItem& context, BoardOrDevice process ) {
11861186 DeviceItem deviceItem;
11871187 GetDeviceItem (context.device , deviceItem);
11881188 if (context.board .empty () && deviceItem.name .empty ()) {
@@ -1256,6 +1256,11 @@ bool ProjMgrWorker::ProcessDevice(ContextItem& context) {
12561256 context.targetAttributes [" Brevision" ] = matchedBoard->GetRevision ();
12571257 context.targetAttributes [" Bversion" ] = matchedBoard->GetRevision (); // deprecated
12581258
1259+ if (matchedBoard && process == BoardOrDevice::SkipDevice) {
1260+ // skip device processing
1261+ return true ;
1262+ }
1263+
12591264 // find device from the matched board
12601265 matchedBoard->GetMountedDevices (mountedDevices);
12611266 if (mountedDevices.size () > 1 && deviceItem.name .empty ()) {
@@ -2615,7 +2620,7 @@ bool ProjMgrWorker::ProcessCompilerPrecedence(StringCollection& item, bool accep
26152620}
26162621
26172622
2618- bool ProjMgrWorker::ProcessPrecedences (ContextItem& context, bool processDevice , bool rerun) {
2623+ bool ProjMgrWorker::ProcessPrecedences (ContextItem& context, BoardOrDevice process , bool rerun) {
26192624 // Notes: defines, includes and misc are additive. All other keywords overwrite previous settings.
26202625 // The target-type and build-type definitions are additive, but an attempt to
26212626 // redefine an already existing type results in an error.
@@ -2726,7 +2731,7 @@ bool ProjMgrWorker::ProcessPrecedences(ContextItem& context, bool processDevice,
27262731 }
27272732
27282733 // Process device and board
2729- if (processDevice && !ProcessDevice (context)) {
2734+ if (process != BoardOrDevice::None && !ProcessDevice (context, process )) {
27302735 CheckMissingPackRequirements (context.name );
27312736 error |= true ;
27322737 }
@@ -3313,7 +3318,7 @@ bool ProjMgrWorker::ProcessSequenceRelative(ContextItem& context, string& item,
33133318 if (!refContext.rteActiveTarget && !LoadPacks (refContext)) {
33143319 return false ;
33153320 }
3316- if (!ProcessPrecedences (refContext, true )) {
3321+ if (!ProcessPrecedences (refContext, BoardOrDevice::Both )) {
33173322 return false ;
33183323 }
33193324 }
@@ -3650,7 +3655,7 @@ bool ProjMgrWorker::ProcessContext(ContextItem& context, bool loadGenFiles, bool
36503655 bool ret = true ;
36513656 ret &= LoadPacks (context);
36523657 context.rteActiveProject ->SetAttribute (" update-rte-files" , updateRteFiles ? " 1" : " 0" );
3653- if (!ProcessPrecedences (context, true )) {
3658+ if (!ProcessPrecedences (context, BoardOrDevice::Both )) {
36543659 return false ;
36553660 }
36563661 if (!SetTargetAttributes (context, context.targetAttributes )) {
@@ -3880,7 +3885,7 @@ bool ProjMgrWorker::ListComponents(vector<string>& components, const string& fil
38803885 return false ;
38813886 }
38823887 if (!selectedContext.empty ()) {
3883- if (!ProcessPrecedences (context, true )) {
3888+ if (!ProcessPrecedences (context, BoardOrDevice::Both )) {
38843889 return false ;
38853890 }
38863891 }
@@ -4093,7 +4098,7 @@ bool ProjMgrWorker::ListLayers(vector<string>& layers, const string& clayerSearc
40934098 }
40944099 } else {
40954100 // process precedences and device/board
4096- if (!ProcessPrecedences (context, true )) {
4101+ if (!ProcessPrecedences (context, BoardOrDevice::SkipDevice )) {
40974102 failedContexts.insert (selectedContext);
40984103 error |= true ;
40994104 continue ;
@@ -5003,7 +5008,7 @@ bool ProjMgrWorker::ProcessGeneratedLayers(ContextItem& context) {
50035008 return false ;
50045009 }
50055010 }
5006- if (!ProcessPrecedences (context, true , true )) {
5011+ if (!ProcessPrecedences (context, BoardOrDevice::Both , true )) {
50075012 return false ;
50085013 }
50095014 if (!ProcessGroups (context)) {
0 commit comments