cmInstrumentationQuery.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. Trace
  18. };
  19. static std::vector<std::string> const OptionString;
  20. enum Hook
  21. {
  22. PostGenerate,
  23. PreBuild,
  24. PostBuild,
  25. PreCMakeBuild,
  26. PostCMakeBuild,
  27. PostCTest,
  28. PostCMakeInstall,
  29. PrepareForCDash,
  30. Manual
  31. };
  32. static std::vector<std::string> const HookString;
  33. struct QueryJSONRoot
  34. {
  35. std::vector<cmInstrumentationQuery::Option> options;
  36. std::vector<cmInstrumentationQuery::Hook> hooks;
  37. std::vector<std::string> callbacks;
  38. int version;
  39. };
  40. cmInstrumentationQuery() = default;
  41. bool ReadJSON(std::string const& file, std::string& errorMessage,
  42. std::set<Option>& options, std::set<Hook>& hooks,
  43. std::vector<std::string>& callbacks);
  44. QueryJSONRoot queryRoot;
  45. cmJSONState parseState;
  46. };