summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-14 21:06:08 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-15 19:40:04 (GMT)
commit2d072069e2ef44780c214c847285df8ed8e70bba (patch)
tree7663c3a54b25b6a367fd045461559576ff46d82f
parentbca67c710f21cdea70c9b23fe927c87135ee81d9 (diff)
downloadCMake-2d072069e2ef44780c214c847285df8ed8e70bba.zip
CMake-2d072069e2ef44780c214c847285df8ed8e70bba.tar.gz
CMake-2d072069e2ef44780c214c847285df8ed8e70bba.tar.bz2
ctest_build: Use "cmake --build" to launch the native build tool
This avoids requiring cmGlobalGenerator::GenerateBuildCommand to produce a string so that it can be later refactored to produce a vector with no quoting or escaping. It also makes the ctest_build command match what "ctest -T Build" would run in a build tree configured with the new build_command() command behavior. It also ensures that the native build tool used matches that selected by the configuration of the tree to be built.
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index 1f63185..12ff718 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -114,9 +114,6 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
this->Makefile->GetCMakeInstance()->CreateGlobalGenerator(
cmakeGeneratorName);
}
- this->GlobalGenerator->FindMakeProgram(this->Makefile);
- const char* cmakeMakeProgram
- = this->Makefile->GetDefinition("CMAKE_MAKE_PROGRAM");
if(strlen(cmakeBuildConfiguration) == 0)
{
const char* config = 0;
@@ -133,10 +130,8 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
std::string dir = this->CTest->GetCTestConfiguration("BuildDirectory");
std::string buildCommand
= this->GlobalGenerator->
- GenerateBuildCommand(cmakeMakeProgram,
- cmakeProjectName, dir.c_str(),
- cmakeBuildAdditionalFlags, cmakeBuildTarget,
- cmakeBuildConfiguration, true, false);
+ GenerateCMakeBuildCommand(cmakeBuildTarget, cmakeBuildConfiguration,
+ cmakeBuildAdditionalFlags, true);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"SetMakeCommand:"
<< buildCommand.c_str() << "\n");