summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-02-24 15:39:55 (GMT)
committerBrad King <brad.king@kitware.com>2009-02-24 15:39:55 (GMT)
commit6bdc2b5d99313ab6418b07ff91320135907ac261 (patch)
treebf6c9386a7987ac5147e7d37a3d0372468dc24ac /Source
parent1b8ea27bd10c9ac94d190a3eb9be5fa0c955b453 (diff)
downloadCMake-6bdc2b5d99313ab6418b07ff91320135907ac261.zip
CMake-6bdc2b5d99313ab6418b07ff91320135907ac261.tar.gz
CMake-6bdc2b5d99313ab6418b07ff91320135907ac261.tar.bz2
ENH: Add cmCTestCVS and cmCTestSVN
These cmCTestVC subclasses will implement interaction with CVS and SVN tools.
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt4
-rw-r--r--Source/CTest/cmCTestCVS.cxx27
-rw-r--r--Source/CTest/cmCTestCVS.h35
-rw-r--r--Source/CTest/cmCTestSVN.cxx27
-rw-r--r--Source/CTest/cmCTestSVN.h35
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx17
6 files changed, 145 insertions, 0 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 43731c2..3180339 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -345,6 +345,10 @@ SET(CTEST_SRCS cmCTest.cxx
CTest/cmCTestVC.cxx
CTest/cmCTestVC.h
+ CTest/cmCTestCVS.cxx
+ CTest/cmCTestCVS.h
+ CTest/cmCTestSVN.cxx
+ CTest/cmCTestSVN.h
)
# Build CTestLib
diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx
new file mode 100644
index 0000000..0f4477e
--- /dev/null
+++ b/Source/CTest/cmCTestCVS.cxx
@@ -0,0 +1,27 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc. 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.
+
+=========================================================================*/
+#include "cmCTestCVS.h"
+
+//----------------------------------------------------------------------------
+cmCTestCVS::cmCTestCVS(cmCTest* ct, std::ostream& log): cmCTestVC(ct, log)
+{
+}
+
+//----------------------------------------------------------------------------
+cmCTestCVS::~cmCTestCVS()
+{
+}
diff --git a/Source/CTest/cmCTestCVS.h b/Source/CTest/cmCTestCVS.h
new file mode 100644
index 0000000..f5175c2
--- /dev/null
+++ b/Source/CTest/cmCTestCVS.h
@@ -0,0 +1,35 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc. 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 cmCTestCVS_h
+#define cmCTestCVS_h
+
+#include "cmCTestVC.h"
+
+/** \class cmCTestCVS
+ * \brief Interaction with cvs command-line tool
+ *
+ */
+class cmCTestCVS: public cmCTestVC
+{
+public:
+ /** Construct with a CTest instance and update log stream. */
+ cmCTestCVS(cmCTest* ctest, std::ostream& log);
+
+ virtual ~cmCTestCVS();
+};
+
+#endif
diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
new file mode 100644
index 0000000..f7111c9
--- /dev/null
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -0,0 +1,27 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc. 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.
+
+=========================================================================*/
+#include "cmCTestSVN.h"
+
+//----------------------------------------------------------------------------
+cmCTestSVN::cmCTestSVN(cmCTest* ct, std::ostream& log): cmCTestVC(ct, log)
+{
+}
+
+//----------------------------------------------------------------------------
+cmCTestSVN::~cmCTestSVN()
+{
+}
diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
new file mode 100644
index 0000000..b003094
--- /dev/null
+++ b/Source/CTest/cmCTestSVN.h
@@ -0,0 +1,35 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc. 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 cmCTestSVN_h
+#define cmCTestSVN_h
+
+#include "cmCTestVC.h"
+
+/** \class cmCTestSVN
+ * \brief Interaction with subversion command-line tool
+ *
+ */
+class cmCTestSVN: public cmCTestVC
+{
+public:
+ /** Construct with a CTest instance and update log stream. */
+ cmCTestSVN(cmCTest* ctest, std::ostream& log);
+
+ virtual ~cmCTestSVN();
+};
+
+#endif
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index 014e16d..cce8f2f 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -27,6 +27,12 @@
#include "cmXMLParser.h"
#include "cmXMLSafe.h"
+#include "cmCTestVC.h"
+#include "cmCTestCVS.h"
+#include "cmCTestSVN.h"
+
+#include <cmsys/auto_ptr.hxx>
+
//#include <cmsys/RegularExpression.hxx>
#include <cmsys/Process.h>
@@ -323,6 +329,17 @@ int cmCTestUpdateHandler::ProcessHandler()
<< " repository type"
<< std::endl;);
+ // Create an object to interact with the VCS tool.
+ cmsys::auto_ptr<cmCTestVC> vc;
+ switch (this->UpdateType)
+ {
+ case e_CVS: vc.reset(new cmCTestCVS(this->CTest, ofs)); break;
+ case e_SVN: vc.reset(new cmCTestSVN(this->CTest, ofs)); break;
+ default: vc.reset(new cmCTestVC(this->CTest, ofs)); break;
+ }
+ vc->SetCommandLineTool(this->UpdateCommand);
+ vc->SetSourceDirectory(sourceDirectory);
+
// And update options
std::string updateOptions
= this->CTest->GetCTestConfiguration("UpdateOptions");