diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-20 13:14:47 -0400 |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-20 13:14:47 -0400 |
commit | 92714311c992a924a249bf9f27820f0512af7013 (patch) | |
tree | a228304f99ee151845d7d3db4fe9cf2857535a65 /Source/cmWriteFileCommand.h | |
parent | e5a8887426da6314855beca296c532119e8d3935 (diff) | |
download | cmake-92714311c992a924a249bf9f27820f0512af7013.tar.gz |
Add WRITE_FILE command, which writes string to a file
Diffstat (limited to 'Source/cmWriteFileCommand.h')
-rw-r--r-- | Source/cmWriteFileCommand.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/Source/cmWriteFileCommand.h b/Source/cmWriteFileCommand.h new file mode 100644 index 0000000000..c11c023a63 --- /dev/null +++ b/Source/cmWriteFileCommand.h @@ -0,0 +1,71 @@ +/*========================================================================= + + Program: Insight Segmentation & Registration Toolkit + Module: $RCSfile$ + Language: C++ + Date: $Date$ + Version: $Revision$ + + Copyright (c) 2002 Insight Consortium. All rights reserved. + See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmWriteFileCommand_h +#define cmWriteFileCommand_h + +#include "cmStandardIncludes.h" +#include "cmCommand.h" + +/** \class cmWriteFileCommand + * \brief Writes a message to a file + * + */ +class cmWriteFileCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmWriteFileCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector<std::string> const& args); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "WRITE_FILE";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Write a message to a file."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + "WRITE_FILE(filename \"message to write\"...)\n" + "The first argument is the file name, the rest of the arguments are messages to write."; + } + + cmTypeMacro(cmWriteFileCommand, cmCommand); +}; + + +#endif |