cmIncludeDirectoryCommand.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 cmIncludeDirectoryCommand_h
  4. #define cmIncludeDirectoryCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. #include <cm/memory>
  9. #include "cmCommand.h"
  10. class cmExecutionStatus;
  11. /** \class cmIncludeDirectoryCommand
  12. * \brief Add include directories to the build.
  13. *
  14. * cmIncludeDirectoryCommand is used to specify directory locations
  15. * to search for included files.
  16. */
  17. class cmIncludeDirectoryCommand : public cmCommand
  18. {
  19. public:
  20. /**
  21. * This is a virtual constructor for the command.
  22. */
  23. std::unique_ptr<cmCommand> Clone() override
  24. {
  25. return cm::make_unique<cmIncludeDirectoryCommand>();
  26. }
  27. /**
  28. * This is called when the command is first encountered in
  29. * the CMakeLists.txt file.
  30. */
  31. bool InitialPass(std::vector<std::string> const& args,
  32. cmExecutionStatus& status) override;
  33. protected:
  34. // used internally
  35. void GetIncludes(const std::string& arg, std::vector<std::string>& incs);
  36. void NormalizeInclude(std::string& inc);
  37. };
  38. #endif