diff options
author | Matthias Maennich <matthias@maennich.net> | 2015-12-05 18:01:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-12-17 15:44:28 (GMT) |
commit | e8b148318f1fab26b2289cadc2d0c5e12201169d (patch) | |
tree | c18ca5a3415761ae65f8db15162ec250c9e5c10a /Source/cmParseArgumentsCommand.h | |
parent | cbbdfc2b6120e192b4248ce89af93cf34ea8a254 (diff) | |
download | CMake-e8b148318f1fab26b2289cadc2d0c5e12201169d.zip CMake-e8b148318f1fab26b2289cadc2d0c5e12201169d.tar.gz CMake-e8b148318f1fab26b2289cadc2d0c5e12201169d.tar.bz2 |
CMakeParseArguments: replace by native cmake_parse_arguments command
Implement a native `cmake_parse_arguments` command that is fully
compatible with the documented behaviour of the previous implementation.
Leave the CMakeParseArguments module empty but existing for
compatibility.
Diffstat (limited to 'Source/cmParseArgumentsCommand.h')
-rw-r--r-- | Source/cmParseArgumentsCommand.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Source/cmParseArgumentsCommand.h b/Source/cmParseArgumentsCommand.h new file mode 100644 index 0000000..7fbf642 --- /dev/null +++ b/Source/cmParseArgumentsCommand.h @@ -0,0 +1,54 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2015 Matthias Maennich <matthias@maennich.net> + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef cmParseArgumentsCommand_h +#define cmParseArgumentsCommand_h + +#include "cmCommand.h" + +/** \class cmParseArgumentsCommand + * + */ +class cmParseArgumentsCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmParseArgumentsCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector<std::string> const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() const { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual std::string GetName() const { return "cmake_parse_arguments";} + + cmTypeMacro(cmParseArgumentsCommand, cmCommand); + +}; + + +#endif |