cmEndForEachCommand.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html 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 cmEndForEachCommand_h
  14. #define cmEndForEachCommand_h
  15. #include "cmCommand.h"
  16. /** \class cmEndForEachCommand
  17. * \brief ends an if block
  18. *
  19. * cmEndForEachCommand ends an if block
  20. */
  21. class cmEndForEachCommand : public cmCommand
  22. {
  23. public:
  24. /**
  25. * This is a virtual constructor for the command.
  26. */
  27. virtual cmCommand* Clone()
  28. {
  29. return new cmEndForEachCommand;
  30. }
  31. /**
  32. * Override cmCommand::InvokeInitialPass to get arguments before
  33. * expansion.
  34. */
  35. virtual bool InvokeInitialPass(std::vector<cmListFileArgument> const&);
  36. /**
  37. * This is called when the command is first encountered in
  38. * the CMakeLists.txt file.
  39. */
  40. virtual bool InitialPass(std::vector<std::string> const&) {return false;}
  41. /**
  42. * This determines if the command gets propagated down
  43. * to makefiles located in subdirectories.
  44. */
  45. virtual bool IsInherited() {return true;}
  46. /**
  47. * The name of the command as specified in CMakeList.txt.
  48. */
  49. virtual const char* GetName() { return "ENDFOREACH";}
  50. /**
  51. * Succinct documentation.
  52. */
  53. virtual const char* GetTerseDocumentation()
  54. {
  55. return "Ends a list of commands in a FOREACH block.";
  56. }
  57. /**
  58. * More documentation.
  59. */
  60. virtual const char* GetFullDocumentation()
  61. {
  62. return
  63. " ENDFOREACH(expression)\n"
  64. "See FOREACH command.";
  65. }
  66. cmTypeMacro(cmEndForEachCommand, cmCommand);
  67. };
  68. #endif