cmGetPropertyCommand.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmGetPropertyCommand_h
  4. #define cmGetPropertyCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. #include "cmCommand.h"
  9. class cmExecutionStatus;
  10. class cmGetPropertyCommand : public cmCommand
  11. {
  12. public:
  13. cmGetPropertyCommand();
  14. cmCommand* Clone() override { return new cmGetPropertyCommand; }
  15. /**
  16. * This is called when the command is first encountered in
  17. * the input file.
  18. */
  19. bool InitialPass(std::vector<std::string> const& args,
  20. cmExecutionStatus& status) override;
  21. private:
  22. enum OutType
  23. {
  24. OutValue,
  25. OutDefined,
  26. OutBriefDoc,
  27. OutFullDoc,
  28. OutSet
  29. };
  30. std::string Variable;
  31. std::string Name;
  32. std::string PropertyName;
  33. OutType InfoType;
  34. // Implementation of result storage.
  35. bool StoreResult(const char* value);
  36. // Implementation of each property type.
  37. bool HandleGlobalMode();
  38. bool HandleDirectoryMode();
  39. bool HandleTargetMode();
  40. bool HandleSourceMode();
  41. bool HandleTestMode();
  42. bool HandleVariableMode();
  43. bool HandleCacheMode();
  44. bool HandleInstallMode();
  45. };
  46. #endif