summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx20
-rw-r--r--Source/cmCTest.cxx8
-rw-r--r--Source/cmSystemTools.cxx17
-rw-r--r--Source/cmSystemTools.h6
-rw-r--r--Source/ctest.cxx2
5 files changed, 34 insertions, 19 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 8026c5a..580623e 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1090,16 +1090,6 @@ void cmCTestTestHandler
{
// no config specified to try some options
tempPath = filepath;
- tempPath += "Deployment/";
- tempPath += filename;
- attempted.push_back(tempPath);
- attemptedConfigs.push_back("Deployment");
- tempPath = filepath;
- tempPath += "Development/";
- tempPath += filename;
- attempted.push_back(tempPath);
- attemptedConfigs.push_back("Deployment");
- tempPath = filepath;
tempPath += "Release/";
tempPath += filename;
attempted.push_back(tempPath);
@@ -1119,6 +1109,16 @@ void cmCTestTestHandler
tempPath += filename;
attempted.push_back(tempPath);
attemptedConfigs.push_back("RelWithDebInfo");
+ tempPath = filepath;
+ tempPath += "Deployment/";
+ tempPath += filename;
+ attempted.push_back(tempPath);
+ attemptedConfigs.push_back("Deployment");
+ tempPath = filepath;
+ tempPath += "Development/";
+ tempPath += filename;
+ attempted.push_back(tempPath);
+ attemptedConfigs.push_back("Deployment");
}
}
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 84b23d1..8158257 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1898,14 +1898,6 @@ int cmCTest::Run(std::vector<std::string> &args, std::string* output)
} // the close of the for argument loop
- // default to the build type of ctest itself if there is one
-#ifdef CMAKE_INTDIR
- if(this->ConfigType.size() == 0)
- {
- this->SetConfigType(CMAKE_INTDIR);
- }
-#endif
-
// now what sould cmake do? if --build-and-test was specified then
// we run the build and test handler and return
if(cmakeAndTest)
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 337e60f..7e59724 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1976,3 +1976,20 @@ int cmSystemTools::WaitForLine(cmsysProcess* process, std::string& line,
}
}
+void cmSystemTools::DoNotInheritStdPipes()
+{
+ {
+ HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
+ DuplicateHandle(GetCurrentProcess(), out,
+ GetCurrentProcess(), &out, 0, FALSE,
+ DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+ SetStdHandle(STD_OUTPUT_HANDLE, out);
+ }
+ {
+ HANDLE out = GetStdHandle(STD_ERROR_HANDLE);
+ DuplicateHandle(GetCurrentProcess(), out,
+ GetCurrentProcess(), &out, 0, FALSE,
+ DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
+ SetStdHandle(STD_ERROR_HANDLE, out);
+ }
+}
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 0cba39c..ed95bdf 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -339,6 +339,12 @@ public:
static bool ExtractTar(const char* inFileName,
const std::vector<cmStdString>& files, bool gzip,
bool verbose);
+ // This should be called first thing in main
+ // it will keep child processes from inheriting the
+ // stdin and stdout of this process. This is important
+ // if you want to be able to kill child processes and
+ // not get stuck waiting for all the output on the pipes.
+ static void DoNotInheritStdPipes();
private:
static bool s_ForceUnixPaths;
static bool s_RunCommandHideConsole;
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index b7d207f..5dedcc4 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -22,7 +22,6 @@
#include "cmDocumentation.h"
#include "CTest/cmCTestScriptHandler.h"
-
//----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationName[] =
{
@@ -209,6 +208,7 @@ static const cmDocumentationEntry cmDocumentationSeeAlso[] =
// this is a test driver program for cmCTest.
int main (int argc, char *argv[])
{
+ cmSystemTools::DoNotInheritStdPipes();
cmSystemTools::EnableMSVCDebugHook();
int nocwd = 0;
cmCTest inst;