@@ -17,6 +17,7 @@ bool runcpp2::Data::ScriptInfo::ParseYAML_Node(ryml::ConstNodeRef& node)
1717 NodeRequirement (" OverrideCompileFlags" , ryml::NodeType_e::MAP, false , true ),
1818 NodeRequirement (" OverrideLinkFlags" , ryml::NodeType_e::MAP, false , true ),
1919 NodeRequirement (" OtherFilesToBeCompiled" , ryml::NodeType_e::MAP, false , true ),
20+ NodeRequirement (" IncludePaths" , ryml::NodeType_e::MAP, false , true ),
2021 NodeRequirement (" Dependencies" , ryml::NodeType_e::SEQ, false , true ),
2122 NodeRequirement (" Defines" , ryml::NodeType_e::MAP, false , true ),
2223 NodeRequirement (" Setup" , ryml::NodeType_e::MAP, false , true ),
@@ -126,6 +127,23 @@ bool runcpp2::Data::ScriptInfo::ParseYAML_Node(ryml::ConstNodeRef& node)
126127 OtherFilesToBeCompiled[platform] = compilesFiles;
127128 }
128129 }
130+
131+ if (ExistAndHasChild (node, " IncludePaths" ))
132+ {
133+ for (int i = 0 ; i < node[" IncludePaths" ].num_children (); ++i)
134+ {
135+ ProfilesCompilesFiles includePaths;
136+ ryml::ConstNodeRef currentProfileMapNode = node[" IncludePaths" ][i];
137+ PlatformName platform = GetKey (currentProfileMapNode);
138+
139+ if (!includePaths.ParseYAML_Node (currentProfileMapNode))
140+ {
141+ ssLOG_ERROR (" ScriptInfo: Failed to parse IncludePaths." );
142+ return false ;
143+ }
144+ IncludePaths[platform] = includePaths;
145+ }
146+ }
129147
130148 if (ExistAndHasChild (node, " Dependencies" ))
131149 {
@@ -290,6 +308,16 @@ std::string runcpp2::Data::ScriptInfo::ToString(std::string indentation) const
290308 out += it->second .ToString (indentation + " " );
291309 }
292310 }
311+
312+ if (!IncludePaths.empty ())
313+ {
314+ out += indentation + " IncludePaths:\n " ;
315+ for (auto it = IncludePaths.begin (); it != IncludePaths.end (); ++it)
316+ {
317+ out += indentation + " " + it->first + " :\n " ;
318+ out += it->second .ToString (indentation + " " );
319+ }
320+ }
293321
294322 if (!Dependencies.empty ())
295323 {
@@ -365,6 +393,7 @@ bool runcpp2::Data::ScriptInfo::Equals(const ScriptInfo& other) const
365393 OverrideCompileFlags.size () != other.OverrideCompileFlags .size () ||
366394 OverrideLinkFlags.size () != other.OverrideLinkFlags .size () ||
367395 OtherFilesToBeCompiled.size () != other.OtherFilesToBeCompiled .size () ||
396+ IncludePaths.size () != other.IncludePaths .size () ||
368397 Dependencies.size () != other.Dependencies .size () ||
369398 Defines.size () != other.Defines .size () ||
370399 Setup.size () != other.Setup .size () ||
@@ -412,6 +441,15 @@ bool runcpp2::Data::ScriptInfo::Equals(const ScriptInfo& other) const
412441 }
413442 }
414443
444+ for (const auto & it : IncludePaths)
445+ {
446+ if ( other.IncludePaths .count (it.first ) == 0 ||
447+ !other.IncludePaths .at (it.first ).Equals (it.second ))
448+ {
449+ return false ;
450+ }
451+ }
452+
415453 for (size_t i = 0 ; i < Dependencies.size (); ++i)
416454 {
417455 if (!Dependencies[i].Equals (other.Dependencies [i]))
0 commit comments