2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc.
|
2004-09-07 17:17:15 +04: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.
|
2004-09-07 17:17:15 +04: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.
|
|
|
|
============================================================================*/
|
2004-09-07 17:17:15 +04:00
|
|
|
|
|
|
|
#ifndef cmCTestUpdateHandler_h
|
|
|
|
#define cmCTestUpdateHandler_h
|
|
|
|
|
2005-01-27 19:43:22 +03:00
|
|
|
#include "cmCTestGenericHandler.h"
|
2016-04-29 16:40:20 +03:00
|
|
|
|
2004-09-07 17:17:15 +04:00
|
|
|
#include "cmListFileCache.h"
|
|
|
|
|
|
|
|
/** \class cmCTestUpdateHandler
|
|
|
|
* \brief A class that handles ctest -S invocations
|
|
|
|
*
|
|
|
|
*/
|
2005-01-27 19:43:22 +03:00
|
|
|
class cmCTestUpdateHandler : public cmCTestGenericHandler
|
2004-09-07 17:17:15 +04:00
|
|
|
{
|
|
|
|
public:
|
2005-06-17 21:04:56 +04:00
|
|
|
cmTypeMacro(cmCTestUpdateHandler, cmCTestGenericHandler);
|
2004-09-07 17:17:15 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The main entry point for this class
|
|
|
|
*/
|
2005-01-27 23:54:47 +03:00
|
|
|
int ProcessHandler();
|
2006-03-10 23:03:09 +03:00
|
|
|
|
2004-09-07 17:17:15 +04:00
|
|
|
cmCTestUpdateHandler();
|
2005-02-16 21:28:47 +03:00
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
enum
|
|
|
|
{
|
2005-06-17 21:04:56 +04:00
|
|
|
e_UNKNOWN = 0,
|
2005-02-16 21:28:47 +03:00
|
|
|
e_CVS,
|
2005-06-17 21:04:56 +04:00
|
|
|
e_SVN,
|
2009-05-15 00:13:52 +04:00
|
|
|
e_BZR,
|
2009-04-22 17:19:06 +04:00
|
|
|
e_GIT,
|
2009-07-10 19:08:05 +04:00
|
|
|
e_HG,
|
2013-10-23 02:11:22 +04:00
|
|
|
e_P4,
|
2005-06-17 21:04:56 +04:00
|
|
|
e_LAST
|
2005-02-16 21:28:47 +03:00
|
|
|
};
|
2005-06-17 21:04:56 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize handler
|
|
|
|
*/
|
|
|
|
virtual void Initialize();
|
2006-03-10 23:03:09 +03:00
|
|
|
|
2004-09-07 17:17:15 +04:00
|
|
|
private:
|
2005-02-16 21:28:47 +03:00
|
|
|
// Some structures needed for update
|
2016-05-16 17:34:04 +03:00
|
|
|
struct StringPair : public std::pair<std::string, std::string>
|
|
|
|
{
|
|
|
|
};
|
|
|
|
struct UpdateFiles : public std::vector<StringPair>
|
|
|
|
{
|
|
|
|
};
|
2005-02-16 21:28:47 +03:00
|
|
|
|
|
|
|
// Determine the type of version control
|
|
|
|
int DetermineType(const char* cmd, const char* type);
|
2009-02-24 17:09:14 +03:00
|
|
|
|
2009-02-24 17:09:43 +03:00
|
|
|
// The VCS command to update the working tree.
|
|
|
|
std::string UpdateCommand;
|
|
|
|
int UpdateType;
|
|
|
|
|
|
|
|
int DetectVCS(const char* dir);
|
|
|
|
bool SelectVCS();
|
2004-09-07 17:17:15 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|