11#ifndef RUNCPP2_DATA_SCRIPT_INFO_HPP
22#define RUNCPP2_DATA_SCRIPT_INFO_HPP
33
4-
54#include " runcpp2/Data/DependencyInfo.hpp"
65#include " runcpp2/Data/ProfilesFlagsOverride.hpp"
76#include " runcpp2/Data/ProfilesProcessPaths.hpp"
87#include " runcpp2/Data/ProfilesDefines.hpp"
98#include " runcpp2/Data/ProfilesCommands.hpp"
109#include " runcpp2/Data/BuildType.hpp"
1110
11+ #define RUNCPP2_CURRENT_CLASS_NAME ScriptInfo
12+ #include " runcpp2/MacroUtil.hpp"
13+
1214#if !defined(NOMINMAX)
1315 #define NOMINMAX 1
1416#endif
@@ -26,25 +28,29 @@ namespace runcpp2
2628 class ScriptInfo
2729 {
2830 public:
29- std::string Language;
30- bool PassScriptPath = false ;
31- BuildType CurrentBuildType = BuildType::EXECUTABLE;
32- std::unordered_map<PlatformName, std::vector<ProfileName>> RequiredProfiles;
33-
34- std::unordered_map<PlatformName, ProfilesFlagsOverride> OverrideCompileFlags;
35- std::unordered_map<PlatformName, ProfilesFlagsOverride> OverrideLinkFlags;
36-
37- std::unordered_map<PlatformName, ProfilesProcessPaths> OtherFilesToBeCompiled;
38- std::unordered_map<PlatformName, ProfilesProcessPaths> IncludePaths;
39-
40- std::vector<DependencyInfo> Dependencies;
31+ RUNCPP2_FIELD_BEGIN ();
4132
42- std::unordered_map<PlatformName, ProfilesDefines> Defines;
33+ RUNCPP2_FIELD std::string Language;
34+ RUNCPP2_FIELD bool PassScriptPath = false ;
35+ RUNCPP2_FIELD BuildType CurrentBuildType = BuildType::EXECUTABLE;
36+ RUNCPP2_FIELD std::unordered_map< PlatformName,
37+ std::vector<ProfileName>> RequiredProfiles;
38+ RUNCPP2_FIELD std::unordered_map< PlatformName,
39+ ProfilesFlagsOverride> OverrideCompileFlags;
40+ RUNCPP2_FIELD std::unordered_map< PlatformName,
41+ ProfilesFlagsOverride> OverrideLinkFlags;
42+ RUNCPP2_FIELD std::unordered_map< PlatformName,
43+ ProfilesProcessPaths> OtherFilesToBeCompiled;
44+ RUNCPP2_FIELD std::unordered_map< PlatformName,
45+ ProfilesProcessPaths> IncludePaths;
46+ RUNCPP2_FIELD std::vector<DependencyInfo> Dependencies;
47+ RUNCPP2_FIELD std::unordered_map<PlatformName, ProfilesDefines> Defines;
48+ RUNCPP2_FIELD std::unordered_map<PlatformName, ProfilesCommands> Setup;
49+ RUNCPP2_FIELD std::unordered_map<PlatformName, ProfilesCommands> PreBuild;
50+ RUNCPP2_FIELD std::unordered_map<PlatformName, ProfilesCommands> PostBuild;
51+ RUNCPP2_FIELD std::unordered_map<PlatformName, ProfilesCommands> Cleanup;
4352
44- std::unordered_map<PlatformName, ProfilesCommands> Setup;
45- std::unordered_map<PlatformName, ProfilesCommands> PreBuild;
46- std::unordered_map<PlatformName, ProfilesCommands> PostBuild;
47- std::unordered_map<PlatformName, ProfilesCommands> Cleanup;
53+ static constexpr int FieldsCount = RUNCPP2_FIELD_COUNT;
4854
4955 // Internal tracking
5056 bool Populated = false ;
@@ -54,6 +60,7 @@ namespace runcpp2
5460
5561 bool ParseYAML_Node (ryml::ConstNodeRef node);
5662 std::string ToString (std::string indentation) const ;
63+ bool IsAllCompiledCacheInvalidated (const ScriptInfo& other) const ;
5764 bool Equals (const ScriptInfo& other) const ;
5865 };
5966 }
0 commit comments