cmLoadCacheCommand.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 cmLoadCacheCommand_h
  4. #define cmLoadCacheCommand_h
  5. #include <cmConfigure.h>
  6. #include <set>
  7. #include <string>
  8. #include <vector>
  9. #include "cmCommand.h"
  10. #include "cmTypeMacro.h"
  11. class cmExecutionStatus;
  12. /** \class cmLoadCacheCommand
  13. * \brief load a cache file
  14. *
  15. * cmLoadCacheCommand loads the non internal values of a cache file
  16. */
  17. class cmLoadCacheCommand : public cmCommand
  18. {
  19. public:
  20. /**
  21. * This is a virtual constructor for the command.
  22. */
  23. cmCommand* Clone() CM_OVERRIDE { return new cmLoadCacheCommand; }
  24. /**
  25. * This is called when the command is first encountered in
  26. * the CMakeLists.txt file.
  27. */
  28. bool InitialPass(std::vector<std::string> const& args,
  29. cmExecutionStatus& status) CM_OVERRIDE;
  30. /**
  31. * The name of the command as specified in CMakeList.txt.
  32. */
  33. std::string GetName() const CM_OVERRIDE { return "load_cache"; }
  34. cmTypeMacro(cmLoadCacheCommand, cmCommand);
  35. protected:
  36. std::set<std::string> VariablesToRead;
  37. std::string Prefix;
  38. bool ReadWithPrefix(std::vector<std::string> const& args);
  39. void CheckLine(const char* line);
  40. };
  41. #endif