cmWorkingDirectory.h 535 B

12345678910111213141516171819202122232425
  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 cmWorkingDirectory_h
  4. #define cmWorkingDirectory_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. /** \class cmWorkingDirectory
  8. * \brief An RAII class to manipulate the working directory.
  9. */
  10. class cmWorkingDirectory
  11. {
  12. public:
  13. cmWorkingDirectory(std::string const& newdir);
  14. ~cmWorkingDirectory();
  15. void Pop();
  16. private:
  17. std::string OldDir;
  18. };
  19. #endif