diff options
Diffstat (limited to 'Source/CTest/cmCTestConfigureCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestConfigureCommand.cxx | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx index 8f3574c..bb5623b 100644 --- a/Source/CTest/cmCTestConfigureCommand.cxx +++ b/Source/CTest/cmCTestConfigureCommand.cxx @@ -9,8 +9,8 @@ Copyright (c) 2002 Kitware, Inc., Insight Consortium. 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 + 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. =========================================================================*/ @@ -50,16 +50,18 @@ bool cmCTestConfigureCommand::InitialPass( { if ( res_var ) { - this->SetError("called with incorrect number of arguments. RETURN_VALUE specified twice."); + this->SetError("called with incorrect number of arguments. " + "RETURN_VALUE specified twice."); return false; } havereturn_variable = true; - } + } else if(args[i] == "SOURCE") { if ( source_dir ) { - this->SetError("called with incorrect number of arguments. SOURCE specified twice."); + this->SetError("called with incorrect number of arguments. " + "SOURCE specified twice."); return false; } havesource = true; @@ -68,7 +70,8 @@ bool cmCTestConfigureCommand::InitialPass( { if ( build_dir ) { - this->SetError("called with incorrect number of arguments. BUILD specified twice."); + this->SetError("called with incorrect number of arguments. " + "BUILD specified twice."); return false; } havebuild = true; @@ -76,7 +79,8 @@ bool cmCTestConfigureCommand::InitialPass( else { cmOStringStream str; - str << "called with incorrect number of arguments. Extra argument is: " << args[i].c_str() << "."; + str << "called with incorrect number of arguments. Extra argument is: " + << args[i].c_str() << "."; this->SetError(str.str().c_str()); return false; } @@ -100,20 +104,24 @@ bool cmCTestConfigureCommand::InitialPass( build_dir = m_Makefile->GetDefinition("CTEST_BINARY_DIRECTORY"); if ( !build_dir ) { - this->SetError("Build directory not specified. Either use BUILD argument to CTEST_CONFIGURE command or set CTEST_BINARY_DIRECTORY variable"); + this->SetError("Build directory not specified. Either use BUILD " + "argument to CTEST_CONFIGURE command or set CTEST_BINARY_DIRECTORY " + "variable"); return false; } } - const char* ctestConfigureCommand = m_Makefile->GetDefinition("CTEST_CONFIGURE_COMMAND"); + const char* ctestConfigureCommand + = m_Makefile->GetDefinition("CTEST_CONFIGURE_COMMAND"); if ( ctestConfigureCommand && *ctestConfigureCommand ) { m_CTest->SetCTestConfiguration("ConfigureCommand", ctestConfigureCommand); } else { - const char* cmakeGeneratorName = m_Makefile->GetDefinition("CTEST_CMAKE_GENERATOR"); + const char* cmakeGeneratorName + = m_Makefile->GetDefinition("CTEST_CMAKE_GENERATOR"); if ( cmakeGeneratorName && *cmakeGeneratorName ) { std::string cmakeConfigureCommand = "\""; @@ -123,19 +131,24 @@ bool cmCTestConfigureCommand::InitialPass( cmakeConfigureCommand += "\" \""; cmakeConfigureCommand += source_dir; cmakeConfigureCommand += "\""; - m_CTest->SetCTestConfiguration("ConfigureCommand", cmakeConfigureCommand.c_str()); + m_CTest->SetCTestConfiguration("ConfigureCommand", + cmakeConfigureCommand.c_str()); } else { - this->SetError("Configure command is not specified. If this is a CMake project, specify CTEST_CMAKE_GENERATOR, or if this is not CMake project, specify CTEST_CONFIGURE_COMMAND."); + this->SetError("Configure command is not specified. If this is a CMake " + "project, specify CTEST_CMAKE_GENERATOR, or if this is not CMake " + "project, specify CTEST_CONFIGURE_COMMAND."); return false; } } - cmCTestGenericHandler* handler = m_CTest->GetInitializedHandler("configure"); + cmCTestGenericHandler* handler + = m_CTest->GetInitializedHandler("configure"); if ( !handler ) { - this->SetError("internal CTest error. Cannot instantiate configure handler"); + this->SetError( + "internal CTest error. Cannot instantiate configure handler"); return false; } int res = handler->ProcessHandler(); |