diff --git a/include/enum_helper.hpp b/include/enum_helper.hpp index 7aafd78..93d88d9 100644 --- a/include/enum_helper.hpp +++ b/include/enum_helper.hpp @@ -4,6 +4,7 @@ #include #include #include +#include // This is the type that will hold all the strings. // Each enumeration type will declare its own specialization. @@ -12,7 +13,7 @@ // be no definition of a generic version). template struct enumStrings { - static char const *data[]; + static std::vector data; }; // This is a utility type. @@ -43,8 +44,8 @@ std::istream &operator>>(std::istream &str, enumRefHolder const &data) { // These two can be made easier to read in C++11 // using std::begin() and std::end() // - static auto begin = std::begin(enumStrings::data); - static auto end = std::end(enumStrings::data); + auto begin = std::begin(enumStrings::data); + auto end = std::end(enumStrings::data); auto find = std::find(begin, end, value); if (find != end) { diff --git a/include/project_parser.hpp b/include/project_parser.hpp index 8c26b50..bd2bafa 100644 --- a/include/project_parser.hpp +++ b/include/project_parser.hpp @@ -56,11 +56,14 @@ enum TargetType { target_interface, target_custom, target_object, + target_template, + target_COUNT, }; struct Target { std::string name; TargetType type = {}; + std::string type_string; ConditionVector headers; ConditionVector sources; @@ -100,6 +103,12 @@ struct Target { ConditionVector include_after; }; +struct Template { + Target outline; + std::string add_function; + bool pass_sources_to_add_function = false; +}; + struct Test { std::string name; std::string condition; @@ -160,12 +169,12 @@ struct Project { std::vector packages; Vcpkg vcpkg; std::vector contents; + std::vector