cmLoadCacheCommand.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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" // IWYU pragma: keep
  6. #include <set>
  7. #include <string>
  8. #include <vector>
  9. #include "cmCommand.h"
  10. class cmExecutionStatus;
  11. /** \class cmLoadCacheCommand
  12. * \brief load a cache file
  13. *
  14. * cmLoadCacheCommand loads the non internal values of a cache file
  15. */
  16. class cmLoadCacheCommand : public cmCommand
  17. {
  18. public:
  19. /**
  20. * This is a virtual constructor for the command.
  21. */
  22. cmCommand* Clone() override { return new cmLoadCacheCommand; }
  23. /**
  24. * This is called when the command is first encountered in
  25. * the CMakeLists.txt file.
  26. */
  27. bool InitialPass(std::vector<std::string> const& args,
  28. cmExecutionStatus& status) override;
  29. protected:
  30. std::set<std::string> VariablesToRead;
  31. std::string Prefix;
  32. bool ReadWithPrefix(std::vector<std::string> const& args);
  33. void CheckLine(const char* line);
  34. };
  35. #endif