cmProjectCommand.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. #ifndef cmProjectCommand_h
  12. #define cmProjectCommand_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmCommand.h"
  15. /** \class cmProjectCommand
  16. * \brief Specify the name for this build project.
  17. *
  18. * cmProjectCommand is used to specify a name for this build project.
  19. * It is defined once per set of CMakeList.txt files (including
  20. * all subdirectories). Currently it just sets the name of the workspace
  21. * file for Microsoft Visual C++
  22. */
  23. class cmProjectCommand : public cmCommand
  24. {
  25. public:
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmProjectCommand;
  32. }
  33. /**
  34. * This is called when the command is first encountered in
  35. * the CMakeLists.txt file.
  36. */
  37. virtual bool Invoke(std::vector<std::string>& args);
  38. /**
  39. * The name of the command as specified in CMakeList.txt.
  40. */
  41. virtual const char* GetName() {return "PROJECT";}
  42. /**
  43. * This determines if the command gets propagated down
  44. * to makefiles located in subdirectories.
  45. */
  46. virtual bool IsInherited()
  47. {
  48. return true;
  49. }
  50. /**
  51. * Succinct documentation.
  52. */
  53. virtual const char* GetTerseDocumentation()
  54. {
  55. return "Set a name for the entire project. One argument.";
  56. }
  57. /**
  58. * More documentation.
  59. */
  60. virtual const char* GetFullDocumentation()
  61. {
  62. return
  63. "PROJECT(projectname) Sets the name of the Microsoft workspace .dsw file. Does nothing on UNIX currently\n";
  64. }
  65. cmTypeMacro(cmProjectCommand, cmCommand);
  66. };
  67. #endif