summaryrefslogtreecommitdiffstats
path: root/Source/cmGetCMakePropertyCommand.h
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-03-06 16:20:26 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-03-06 16:20:26 (GMT)
commit814b8856a0966a5d396583dcb36bbc8a225371af (patch)
treeaefa3a421a34471d25558e0f749ee531a9ee5d8a /Source/cmGetCMakePropertyCommand.h
parentce750180baec52f1bb64fbd1afe7c1aff1338c5c (diff)
downloadCMake-814b8856a0966a5d396583dcb36bbc8a225371af.zip
CMake-814b8856a0966a5d396583dcb36bbc8a225371af.tar.gz
CMake-814b8856a0966a5d396583dcb36bbc8a225371af.tar.bz2
Add command for accessing cmake properties. At this point the only properties are VARIABLES and CACHE_VARIABLES. Also add test for this feature
Diffstat (limited to 'Source/cmGetCMakePropertyCommand.h')
-rw-r--r--Source/cmGetCMakePropertyCommand.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/Source/cmGetCMakePropertyCommand.h b/Source/cmGetCMakePropertyCommand.h
new file mode 100644
index 0000000..ffb7c0e
--- /dev/null
+++ b/Source/cmGetCMakePropertyCommand.h
@@ -0,0 +1,68 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html 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 cmGetCMakePropertyCommand_h
+#define cmGetCMakePropertyCommand_h
+
+#include "cmStandardIncludes.h"
+#include "cmCommand.h"
+
+class cmGetCMakePropertyCommand : public cmCommand
+{
+public:
+ virtual cmCommand* Clone()
+ {
+ return new cmGetCMakePropertyCommand;
+ }
+
+ /**
+ * This is called when the command is first encountered in
+ * the input 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 "GET_CMAKE_PROPERTY";}
+
+ /**
+ * Succinct documentation.
+ */
+ virtual const char* GetTerseDocumentation()
+ {
+ return "Get a property of the CMake.";
+ }
+
+ /**
+ * Longer documentation.
+ */
+ virtual const char* GetFullDocumentation()
+ {
+ return
+ " GET_CMAKE_PROPERTY(VAR property)\n"
+ "Get a property from the CMake. The value of the property is"
+ "stored in the variable VAR. If the property is not found,"
+ "CMake will report an error. The properties include: VARIABLES, "
+ "CACHE_VARIABLES.";
+ }
+
+ cmTypeMacro(cmGetCMakePropertyCommand, cmCommand);
+};
+
+
+
+#endif