summaryrefslogtreecommitdiffstats
path: root/Source/cmVariableRequiresCommand.h
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-11-19 22:52:08 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-11-19 22:52:08 (GMT)
commitda17f30cb515775000ec7dd1d3fab8b3621c2587 (patch)
tree9548b3afab27b95fb4defa16b17aadfd02654d1a /Source/cmVariableRequiresCommand.h
parent4d5f9deb00f851477258da139cde8362d14674c4 (diff)
downloadCMake-da17f30cb515775000ec7dd1d3fab8b3621c2587.zip
CMake-da17f30cb515775000ec7dd1d3fab8b3621c2587.tar.gz
CMake-da17f30cb515775000ec7dd1d3fab8b3621c2587.tar.bz2
ENH: add new command VARIABLE_REQUIRES for better debugging of list files
Diffstat (limited to 'Source/cmVariableRequiresCommand.h')
-rw-r--r--Source/cmVariableRequiresCommand.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmVariableRequiresCommand.h b/Source/cmVariableRequiresCommand.h
index 0080cff..ca3d66f 100644
--- a/Source/cmVariableRequiresCommand.h
+++ b/Source/cmVariableRequiresCommand.h
@@ -64,11 +64,13 @@ public:
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
-
+
+ ///!
+ virtual void FinalPass();
/**
* The name of the command as specified in CMakeList.txt.
*/
- virtual const char* GetName() { return "MESSAGE";}
+ virtual const char* GetName() { return "VARIABLE_REQUIRES";}
/**
* Succinct documentation.
@@ -84,20 +86,23 @@ public:
virtual const char* GetFullDocumentation()
{
return
- "VARIABLE_REQUIRES(TEST_VARIBLE RESULT_VARIBLE\"Error Message\" "
+ "VARIABLE_REQUIRES(TEST_VARIBLE RESULT_VARIBLE "
"REQUIRED_VARIABLE1 REQUIRED_VARIABLE2 ...) "
"The first argument (TEST_VARIABLE) is the name of the varible to be "
"tested, if that varible is false nothing else is done. If "
"TEST_VARIABLE is true, then "
- "The next arguemnt (RESULT_VARIABLE) is a vairable that is set to true "
+ "the next arguemnt (RESULT_VARIABLE) is a vairable that is set to true "
"if all the "
- "required variables are set, the next argument "
- "is a message to be displayed if required varibles are not set. "
+ "required variables are set."
"The rest of the arguments are varibles that must be true or not "
"set to NOTFOUND to avoid an error. ";
}
cmTypeMacro(cmVariableRequiresCommand, cmCommand);
+private:
+ std::string m_ErrorMessage;
+ std::vector<std::string> m_Arguments;
+ bool m_RequirementsMet;
};