cmInstrumentationQuery.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file LICENSE.rst or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include <set>
  5. #include <string>
  6. #include <vector>
  7. #include "cmJSONState.h"
  8. class cmInstrumentationQuery
  9. {
  10. public:
  11. enum Option
  12. {
  13. StaticSystemInformation,
  14. DynamicSystemInformation,
  15. CDashSubmit,
  16. CDashVerbose
  17. };
  18. static std::vector<std::string> const OptionString;
  19. enum Hook
  20. {
  21. PostGenerate,
  22. PreBuild,
  23. PostBuild,
  24. PreCMakeBuild,
  25. PostCMakeBuild,
  26. PostTest,
  27. PostInstall,
  28. PrepareForCDash,
  29. Manual
  30. };
  31. static std::vector<std::string> const HookString;
  32. struct QueryJSONRoot
  33. {
  34. std::vector<cmInstrumentationQuery::Option> options;
  35. std::vector<cmInstrumentationQuery::Hook> hooks;
  36. std::vector<std::string> callbacks;
  37. int version;
  38. };
  39. cmInstrumentationQuery() = default;
  40. bool ReadJSON(std::string const& file, std::string& errorMessage,
  41. std::set<Option>& options, std::set<Hook>& hooks,
  42. std::vector<std::string>& callbacks);
  43. QueryJSONRoot queryRoot;
  44. cmJSONState parseState;
  45. };