1
/*=========================================================================
3
Program: CMake - Cross-Platform Makefile Generator
4
Module: $RCSfile: cmCTestBuildCommand.cxx,v $
6
Date: $Date: 2007-09-17 14:40:57 $
7
Version: $Revision: 1.18 $
9
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12
This software is distributed WITHOUT ANY WARRANTY; without even
13
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14
PURPOSE. See the above copyright notices for more information.
16
=========================================================================*/
1
/*============================================================================
2
CMake - Cross Platform Makefile Generator
3
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
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
============================================================================*/
17
12
#include "cmCTestBuildCommand.h"
19
14
#include "cmCTest.h"
20
15
#include "cmCTestGenericHandler.h"
16
#include "cmCTestBuildHandler.h"
22
18
#include "cmGlobalGenerator.h"
26
22
cmCTestBuildCommand::cmCTestBuildCommand()
28
24
this->GlobalGenerator = 0;
25
this->Arguments[ctb_NUMBER_ERRORS] = "NUMBER_ERRORS";
26
this->Arguments[ctb_NUMBER_WARNINGS] = "NUMBER_WARNINGS";
27
this->Arguments[ctb_LAST] = 0;
28
this->Last = ctb_LAST;
31
31
//----------------------------------------------------------------------------
48
48
this->SetError("internal CTest error. Cannot instantiate build handler");
51
this->Handler = (cmCTestBuildHandler*)handler;
52
52
const char* ctestBuildCommand
53
53
= this->Makefile->GetDefinition("CTEST_BUILD_COMMAND");
54
54
if ( ctestBuildCommand && *ctestBuildCommand )
131
if(const char* useLaunchers =
132
this->Makefile->GetDefinition("CTEST_USE_LAUNCHERS"))
134
this->CTest->SetCTestConfiguration("UseLaunchers", useLaunchers);
141
bool cmCTestBuildCommand::InitialPass(std::vector<std::string> const& args,
142
cmExecutionStatus &status)
144
bool ret = cmCTestHandlerCommand::InitialPass(args, status);
145
if ( this->Values[ctb_NUMBER_ERRORS] && *this->Values[ctb_NUMBER_ERRORS])
148
str << this->Handler->GetTotalErrors();
149
this->Makefile->AddDefinition(
150
this->Values[ctb_NUMBER_ERRORS], str.str().c_str());
152
if ( this->Values[ctb_NUMBER_WARNINGS]
153
&& *this->Values[ctb_NUMBER_WARNINGS])
156
str << this->Handler->GetTotalWarnings();
157
this->Makefile->AddDefinition(
158
this->Values[ctb_NUMBER_WARNINGS], str.str().c_str());