summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommandArguments.h
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-08-23 20:14:18 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-08-23 20:14:18 (GMT)
commitbe2705deaa8e0a2e3fc71d36096a808947e85f17 (patch)
tree62766252da748221087078562227cc4feb99df9c /Source/cmInstallCommandArguments.h
parent2120ce4fcd935d74442ad7f63c06c52287665f35 (diff)
downloadCMake-be2705deaa8e0a2e3fc71d36096a808947e85f17.zip
CMake-be2705deaa8e0a2e3fc71d36096a808947e85f17.tar.gz
CMake-be2705deaa8e0a2e3fc71d36096a808947e85f17.tar.bz2
ENH: class for parsing the arguments for INSTALL()
Alex
Diffstat (limited to 'Source/cmInstallCommandArguments.h')
-rw-r--r--Source/cmInstallCommandArguments.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/Source/cmInstallCommandArguments.h b/Source/cmInstallCommandArguments.h
new file mode 100644
index 0000000..936aa46
--- /dev/null
+++ b/Source/cmInstallCommandArguments.h
@@ -0,0 +1,65 @@
+/*=========================================================================
+
+ 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 cmInstallCommandArguments_h
+#define cmInstallCommandArguments_h
+
+#include "cmStandardIncludes.h"
+#include "cmCommandArgumentsHelper.h"
+
+class cmInstallCommandArguments : public cmCommandArgumentsHelper
+{
+ public:
+ cmInstallCommandArguments();
+ void SetGenericArguments(cmInstallCommandArguments* args)
+ {this->GenericArguments = args;}
+ // Compute destination path.
+ bool Finalize();
+ cmCommandArgumentGroup ArgumentGroup;
+
+ const std::string& GetDestination() const;
+ const std::string& GetComponent() const;
+ const std::string& GetRename() const;
+ const std::string& GetPermissions() const;
+ const std::vector<std::string>& GetConfigurations() const;
+ bool GetOptional() const;
+
+ // once HandleDirectoryMode() is also switched to using cmInstallCommandArguments
+ // then these two functions can become non-static private member functions
+ // without arguments
+ static void ComputeDestination(const std::string& inDest,
+ std::string& absDest);
+ static bool CheckPermissions(const std::string& onePerm,
+ std::string& perm);
+ private:
+ cmCAString Destination;
+ cmCAString Component;
+ cmCAString Rename;
+ cmCAStringVector Permissions;
+ cmCAStringVector Configurations;
+ cmCAEnabler Optional;
+
+ std::string AbsDestination;
+ std::string PermissionsString;
+
+ cmInstallCommandArguments* GenericArguments;
+ static const char* PermissionsTable[];
+ static const std::string EmptyString;
+ bool CheckPermissions();
+};
+
+#endif