cmProjectCommand.h 1.2 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 cmProjectCommand_h
  4. #define cmProjectCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. #include "cm_memory.hxx"
  9. #include "cmCommand.h"
  10. class cmExecutionStatus;
  11. /** \class cmProjectCommand
  12. * \brief Specify the name for this build project.
  13. *
  14. * cmProjectCommand is used to specify a name for this build project.
  15. * It is defined once per set of CMakeList.txt files (including
  16. * all subdirectories). Currently it just sets the name of the workspace
  17. * file for Microsoft Visual C++
  18. */
  19. class cmProjectCommand : 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<cmProjectCommand>();
  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. bool IncludeByVariable(const std::string& variable);
  37. void TopLevelCMakeVarCondSet(const char* name, const char* value);
  38. };
  39. #endif