summaryrefslogtreecommitdiffstats
path: root/Source/cmCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-12-11 23:13:33 (GMT)
committerBrad King <brad.king@kitware.com>2002-12-11 23:13:33 (GMT)
commit4888c088ae0ca829862e8b2f9568abca12dc34d1 (patch)
tree2c0fb825f1d1adff97d98373b555f00b84da14f7 /Source/cmCommand.h
parent5a321605bcc15c7e559c8da5168eef00796148b1 (diff)
downloadCMake-4888c088ae0ca829862e8b2f9568abca12dc34d1.zip
CMake-4888c088ae0ca829862e8b2f9568abca12dc34d1.tar.gz
CMake-4888c088ae0ca829862e8b2f9568abca12dc34d1.tar.bz2
ENH: Moved ExpandListVariables out of individual commands. Argument evaluation rules are now very consistent. Double quotes can always be used to create exactly one argument, regardless of contents inside.
Diffstat (limited to 'Source/cmCommand.h')
-rw-r--r--Source/cmCommand.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmCommand.h b/Source/cmCommand.h
index 66228da..44e95d2 100644
--- a/Source/cmCommand.h
+++ b/Source/cmCommand.h
@@ -18,7 +18,8 @@
#define cmCommand_h
#include "cmStandardIncludes.h"
-class cmMakefile;
+#include "cmListFileCache.h"
+#include "cmMakefile.h"
/** \class cmCommand
* \brief Superclass for all commands in CMake.
@@ -51,6 +52,18 @@ public:
{m_Makefile = m; }
/**
+ * This is called by the cmMakefile when the command is first
+ * encountered in the CMakeLists.txt file. It expands the command's
+ * arguments and then invokes the InitialPass.
+ */
+ virtual bool InvokeInitialPass(const std::vector<cmListFileArgument>& args)
+ {
+ std::vector<std::string> expandedArguments;
+ m_Makefile->ExpandArguments(args, expandedArguments);
+ return this->InitialPass(expandedArguments);
+ }
+
+ /**
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
@@ -159,13 +172,14 @@ private:
// All subclasses of cmCommand should invoke this macro.
#define cmTypeMacro(thisClass,superclass) \
+typedef superclass Superclass; \
static bool IsTypeOf(const char *type) \
{ \
if ( !strcmp(#thisClass,type) ) \
{ \
return true; \
} \
- return superclass::IsTypeOf(type); \
+ return Superclass::IsTypeOf(type); \
} \
virtual bool IsA(const char *type) \
{ \