summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-09-17 14:40:57 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-09-17 14:40:57 (GMT)
commit267fd538d837d40e7ed865326899e0105265a515 (patch)
tree05c3dd5fe631f0cd4e51038feea95a35d46eeddd /Source
parent5c48eab7a8d18c787111a387359716d59b70598a (diff)
downloadCMake-267fd538d837d40e7ed865326899e0105265a515.zip
CMake-267fd538d837d40e7ed865326899e0105265a515.tar.gz
CMake-267fd538d837d40e7ed865326899e0105265a515.tar.bz2
ENH: fix build issue with config type not being specified by ctest
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestBuildAndTestHandler.cxx1
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx22
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx12
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
4 files changed, 36 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index 579a4cb..9ec0217 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -264,7 +264,6 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
config,
!this->BuildNoClean,
false, remainingTime);
-
out << output;
// if the build failed then return
if (retVal)
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index ff284d2..58c3efd 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -92,11 +92,25 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
this->GlobalGenerator->FindMakeProgram(this->Makefile);
const char* cmakeMakeProgram
= this->Makefile->GetDefinition("CMAKE_MAKE_PROGRAM");
+ if(strlen(cmakeBuildConfiguration) == 0)
+ {
+ const char* config = 0;
+#ifdef CMAKE_INTDIR
+ config = CMAKE_INTDIR;
+#endif
+ if(!config)
+ {
+ config = "Debug";
+ }
+ cmakeBuildConfiguration = config;
+ }
+
std::string buildCommand
- = this->GlobalGenerator->GenerateBuildCommand(cmakeMakeProgram,
- cmakeProjectName,
- cmakeBuildAdditionalFlags, cmakeBuildTarget,
- cmakeBuildConfiguration, true, false);
+ = this->GlobalGenerator->
+ GenerateBuildCommand(cmakeMakeProgram,
+ cmakeProjectName,
+ cmakeBuildAdditionalFlags, cmakeBuildTarget,
+ cmakeBuildConfiguration, true, false);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"SetMakeCommand:"
<< buildCommand.c_str() << "\n");
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 580623e..8249352 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1206,6 +1206,18 @@ std::string cmCTestTestHandler
return path;
}
}
+ if(fullPath.size() == 0)
+ {
+ cmCTestLog(ctest, HANDLER_OUTPUT,
+ "Could not find executable " << testCommand << "\n"
+ << "Looked in the following places:\n");
+ for(std::vector<std::string>::iterator i = failed.begin();
+ i != failed.end(); ++i)
+ {
+ cmCTestLog(ctest, HANDLER_OUTPUT,
+ i->c_str() << "\n");
+ }
+ }
return fullPath;
}
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index ee630bc..8c60b9b 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -187,6 +187,11 @@ std::string cmGlobalXCodeGenerator
makeCommand += " build";
}
makeCommand += " -target ";
+ // if it is a null string for config don't use it
+ if(config && *config == 0)
+ {
+ config = 0;
+ }
if (targetName && strlen(targetName))
{
makeCommand += targetName;
@@ -209,6 +214,7 @@ std::string cmGlobalXCodeGenerator
makeCommand += " ";
makeCommand += additionalOptions;
}
+ std::cerr << "**** build command " << makeCommand.c_str() << "\n";
return makeCommand;
}