1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc.
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
13 #ifndef cmCTestBuildAndTestHandler_h
14 #define cmCTestBuildAndTestHandler_h
17 #include "cmCTestGenericHandler.h"
18 #include "cmListFileCache.h"
22 /** \class cmCTestBuildAndTestHandler
23 * \brief A class that handles ctest -S invocations
26 class cmCTestBuildAndTestHandler : public cmCTestGenericHandler
29 cmTypeMacro(cmCTestBuildAndTestHandler, cmCTestGenericHandler);
32 * The main entry point for this class
36 //! Set all the build and test arguments
37 virtual int ProcessCommandLineArguments(
38 const std::string& currentArg, size_t& idx,
39 const std::vector<std::string>& allArgs);
42 * Get the output variable
44 const char* GetOutput();
46 cmCTestBuildAndTestHandler();
48 virtual void Initialize();
51 ///! Run CMake and build a test and then run it as a single test.
52 int RunCMakeAndTest(std::string* output);
53 int RunCMake(std::string* outstring, cmOStringStream &out,
54 std::string &cmakeOutString,
55 std::string &cwd, cmake *cm);
59 std::string BuildGenerator;
60 std::vector<std::string> BuildOptions;
62 std::string BuildMakeProgram;
63 std::string ConfigSample;
64 std::string SourceDir;
65 std::string BinaryDir;
66 std::string BuildProject;
67 std::string TestCommand;
69 std::string BuildRunDir;
70 std::string ExecutableDirectory;
71 std::vector<std::string> TestCommandArgs;
72 std::vector<std::string> BuildTargets;