2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2006-02-10 22:11:12 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2006-02-10 22:11:12 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
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.
|
|
|
|
============================================================================*/
|
2006-02-10 22:11:12 +03:00
|
|
|
#ifndef cmListCommand_h
|
|
|
|
#define cmListCommand_h
|
|
|
|
|
|
|
|
#include "cmCommand.h"
|
|
|
|
|
|
|
|
/** \class cmListCommand
|
|
|
|
* \brief Common list operations
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
class cmListCommand : public cmCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* This is a virtual constructor for the command.
|
|
|
|
*/
|
2016-06-27 22:25:27 +03:00
|
|
|
cmCommand* Clone() CM_OVERRIDE { return new cmListCommand; }
|
2006-02-10 22:11:12 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called when the command is first encountered in
|
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2016-06-27 22:25:27 +03:00
|
|
|
bool InitialPass(std::vector<std::string> const& args,
|
|
|
|
cmExecutionStatus& status) CM_OVERRIDE;
|
2006-02-10 22:11:12 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This determines if the command is invoked when in script mode.
|
|
|
|
*/
|
2016-06-27 22:25:27 +03:00
|
|
|
bool IsScriptable() const CM_OVERRIDE { return true; }
|
2006-02-10 22:11:12 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of the command as specified in CMakeList.txt.
|
|
|
|
*/
|
2016-06-27 22:25:27 +03:00
|
|
|
std::string GetName() const CM_OVERRIDE { return "list"; }
|
2006-02-10 22:11:12 +03:00
|
|
|
|
|
|
|
cmTypeMacro(cmListCommand, cmCommand);
|
2016-05-16 17:34:04 +03:00
|
|
|
|
2006-02-10 22:11:12 +03:00
|
|
|
protected:
|
|
|
|
bool HandleLengthCommand(std::vector<std::string> const& args);
|
|
|
|
bool HandleGetCommand(std::vector<std::string> const& args);
|
2006-05-15 17:25:06 +04:00
|
|
|
bool HandleAppendCommand(std::vector<std::string> const& args);
|
2007-08-15 18:26:50 +04:00
|
|
|
bool HandleFindCommand(std::vector<std::string> const& args);
|
2006-02-10 22:11:12 +03:00
|
|
|
bool HandleInsertCommand(std::vector<std::string> const& args);
|
2006-05-15 17:57:49 +04:00
|
|
|
bool HandleRemoveAtCommand(std::vector<std::string> const& args);
|
2006-02-10 22:11:12 +03:00
|
|
|
bool HandleRemoveItemCommand(std::vector<std::string> const& args);
|
2008-03-13 00:02:10 +03:00
|
|
|
bool HandleRemoveDuplicatesCommand(std::vector<std::string> const& args);
|
2006-08-22 18:16:46 +04:00
|
|
|
bool HandleSortCommand(std::vector<std::string> const& args);
|
|
|
|
bool HandleReverseCommand(std::vector<std::string> const& args);
|
2016-01-29 00:29:10 +03:00
|
|
|
bool HandleFilterCommand(std::vector<std::string> const& args);
|
2016-05-16 17:34:04 +03:00
|
|
|
bool FilterRegex(std::vector<std::string> const& args, bool includeMatches,
|
|
|
|
std::string const& listName,
|
|
|
|
std::vector<std::string>& varArgsExpanded);
|
2006-02-10 22:11:12 +03:00
|
|
|
|
2014-02-05 01:06:56 +04:00
|
|
|
bool GetList(std::vector<std::string>& list, const std::string& var);
|
|
|
|
bool GetListString(std::string& listString, const std::string& var);
|
2006-02-10 22:11:12 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|