cmTargetCompileDefinitionsCommand.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 cmTargetCompileDefinitionsCommand_h
  4. #define cmTargetCompileDefinitionsCommand_h
  5. #include "cmTargetPropCommandBase.h"
  6. class cmTargetCompileDefinitionsCommand : public cmTargetPropCommandBase
  7. {
  8. public:
  9. /**
  10. * This is a virtual constructor for the command.
  11. */
  12. cmCommand* Clone() CM_OVERRIDE
  13. {
  14. return new cmTargetCompileDefinitionsCommand;
  15. }
  16. /**
  17. * This is called when the command is first encountered in
  18. * the CMakeLists.txt file.
  19. */
  20. bool InitialPass(std::vector<std::string> const& args,
  21. cmExecutionStatus& status) CM_OVERRIDE;
  22. /**
  23. * The name of the command as specified in CMakeList.txt.
  24. */
  25. std::string GetName() const CM_OVERRIDE
  26. {
  27. return "target_compile_definitions";
  28. }
  29. cmTypeMacro(cmTargetCompileDefinitionsCommand, cmTargetPropCommandBase);
  30. private:
  31. void HandleImportedTarget(const std::string& tgt) CM_OVERRIDE;
  32. void HandleMissingTarget(const std::string& name) CM_OVERRIDE;
  33. bool HandleDirectContent(cmTarget* tgt,
  34. const std::vector<std::string>& content,
  35. bool prepend, bool system) CM_OVERRIDE;
  36. std::string Join(const std::vector<std::string>& content) CM_OVERRIDE;
  37. };
  38. #endif