cmGetPropertyCommand.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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"
  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() CM_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) CM_OVERRIDE;
  21. /**
  22. * The name of the command as specified in CMakeList.txt.
  23. */
  24. std::string GetName() const CM_OVERRIDE { return "get_property"; }
  25. private:
  26. enum OutType
  27. {
  28. OutValue,
  29. OutDefined,
  30. OutBriefDoc,
  31. OutFullDoc,
  32. OutSet
  33. };
  34. std::string Variable;
  35. std::string Name;
  36. std::string PropertyName;
  37. OutType InfoType;
  38. // Implementation of result storage.
  39. bool StoreResult(const char* value);
  40. // Implementation of each property type.
  41. bool HandleGlobalMode();
  42. bool HandleDirectoryMode();
  43. bool HandleTargetMode();
  44. bool HandleSourceMode();
  45. bool HandleTestMode();
  46. bool HandleVariableMode();
  47. bool HandleCacheMode();
  48. bool HandleInstallMode();
  49. };
  50. #endif