Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / CTest / cmCTestEmptyBinaryDirectoryCommand.cxx
blobe49d453a5289309edd53e63cdc8867525bacfc77
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCTestEmptyBinaryDirectoryCommand.cxx,v $
5 Language: C++
6 Date: $Date: 2008/01/23 15:28:01 $
7 Version: $Revision: 1.4 $
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 =========================================================================*/
17 #include "cmCTestEmptyBinaryDirectoryCommand.h"
19 #include "cmCTestScriptHandler.h"
21 bool cmCTestEmptyBinaryDirectoryCommand
22 ::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
24 if(args.size() != 1 )
26 this->SetError("called with incorrect number of arguments");
27 return false;
30 if ( !cmCTestScriptHandler::EmptyBinaryDirectory(args[0].c_str()) )
32 cmOStringStream ostr;
33 ostr << "problem removing the binary directory: " << args[0].c_str();
34 this->SetError(ostr.str().c_str());
35 return false;
38 return true;