FIX: stupid pb fixed (close to being medieval'ed by The Ken)
[cmake.git] / Source / cmVariableRequiresCommand.h
blobc14f31b32e69b57375a442f4eb19d78d9e7b99bf
1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmVariableRequiresCommand.h,v $
5 Language: C++
6 Date: $Date: 2002-01-21 20:30:38 $
7 Version: $Revision: 1.4 $
9 Copyright (c) 2002 Insight Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmVariableRequiresCommand_h
18 #define cmVariableRequiresCommand_h
20 #include "cmStandardIncludes.h"
21 #include "cmCommand.h"
23 /** \class cmVariableRequiresCommand
24 * \brief Displays a message to the user
27 class cmVariableRequiresCommand : public cmCommand
29 public:
30 /**
31 * This is a virtual constructor for the command.
33 virtual cmCommand* Clone()
35 return new cmVariableRequiresCommand;
38 /**
39 * This is called when the command is first encountered in
40 * the CMakeLists.txt file.
42 virtual bool InitialPass(std::vector<std::string> const& args);
44 ///!
45 virtual void FinalPass();
46 /**
47 * The name of the command as specified in CMakeList.txt.
49 virtual const char* GetName() { return "VARIABLE_REQUIRES";}
51 /**
52 * Succinct documentation.
54 virtual const char* GetTerseDocumentation()
56 return "Display an error message .";
59 /**
60 * More documentation.
62 virtual const char* GetFullDocumentation()
64 return
65 "VARIABLE_REQUIRES(TEST_VARIABLE RESULT_VARIABLE "
66 "REQUIRED_VARIABLE1 REQUIRED_VARIABLE2 ...) "
67 "The first argument (TEST_VARIABLE) is the name of the varible to be "
68 "tested, if that varible is false nothing else is done. If "
69 "TEST_VARIABLE is true, then "
70 "the next arguemnt (RESULT_VARIABLE) is a vairable that is set to true "
71 "if all the "
72 "required variables are set."
73 "The rest of the arguments are varibles that must be true or not "
74 "set to NOTFOUND to avoid an error. ";
77 cmTypeMacro(cmVariableRequiresCommand, cmCommand);
78 private:
79 std::string m_ErrorMessage;
80 std::vector<std::string> m_Arguments;
81 bool m_RequirementsMet;
85 #endif