cmLinkDirectoriesCommand.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 cmLinkDirectoriesCommand_h
  4. #define cmLinkDirectoriesCommand_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 cmLinkDirectoriesCommand
  12. * \brief Define a list of directories containing files to link.
  13. *
  14. * cmLinkDirectoriesCommand is used to specify a list
  15. * of directories containing files to link into executable(s).
  16. * Note that the command supports the use of CMake built-in variables
  17. * such as CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR.
  18. */
  19. class cmLinkDirectoriesCommand : public cmCommand
  20. {
  21. public:
  22. /**
  23. * This is a virtual constructor for the command.
  24. */
  25. std::unique_ptr<cmCommand> Clone() override
  26. {
  27. return cm::make_unique<cmLinkDirectoriesCommand>();
  28. }
  29. /**
  30. * This is called when the command is first encountered in
  31. * the CMakeLists.txt file.
  32. */
  33. bool InitialPass(std::vector<std::string> const& args,
  34. cmExecutionStatus& status) override;
  35. private:
  36. void AddLinkDir(std::string const& dir,
  37. std::vector<std::string>& directories);
  38. };
  39. #endif