cmProjectCommand.h 2.1 KB

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