diff options
-rw-r--r-- | Modules/CMakeVS8FindMake.cmake | 3 | ||||
-rw-r--r-- | Modules/CMakeVS9FindMake.cmake | 4 | ||||
-rw-r--r-- | Modules/FindCUDA.cmake | 4 | ||||
-rw-r--r-- | Source/CTest/cmCTestBuildCommand.h | 8 | ||||
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 15 | ||||
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.h | 1 | ||||
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 15 | ||||
-rw-r--r-- | Source/CTest/cmCTestRunTest.h | 3 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 4 | ||||
-rw-r--r-- | Source/kwsys/kwsysDateStamp.cmake | 2 |
10 files changed, 42 insertions, 17 deletions
diff --git a/Modules/CMakeVS8FindMake.cmake b/Modules/CMakeVS8FindMake.cmake index 6f45ed5..2f03e60 100644 --- a/Modules/CMakeVS8FindMake.cmake +++ b/Modules/CMakeVS8FindMake.cmake @@ -28,9 +28,6 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 8/Common7/IDE" "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio8/Common7/IDE" "/Program Files/Microsoft Visual Studio 8/Common7/IDE/" - PATHS - "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio .NET/Common7/IDE" - "$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE" ) MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) SET(MSVC80 1) diff --git a/Modules/CMakeVS9FindMake.cmake b/Modules/CMakeVS9FindMake.cmake index 2741f77..4704bcc 100644 --- a/Modules/CMakeVS9FindMake.cmake +++ b/Modules/CMakeVS9FindMake.cmake @@ -33,10 +33,6 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio9/Common7/IDE" "/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/" "/Program Files/Microsoft Visual Studio 9/Common7/IDE/" - PATHS - "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio .NET/Common7/IDE" - "$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE" - ) MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) SET(MSVC90 1) diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 6539057..17da9e9 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -484,6 +484,10 @@ if(CUDA_NVCC_EXECUTABLE AND NOT CUDA_VERSION) string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR ${NVCC_OUT}) set(CUDA_VERSION "${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}" CACHE STRING "Version of CUDA as computed from nvcc.") mark_as_advanced(CUDA_VERSION) +else() + # Need to set these based off of the cached value + string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR "${CUDA_VERSION}") + string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR "${CUDA_VERSION}") endif() # Always set this convenience variable diff --git a/Source/CTest/cmCTestBuildCommand.h b/Source/CTest/cmCTestBuildCommand.h index 228067e..9eb4907 100644 --- a/Source/CTest/cmCTestBuildCommand.h +++ b/Source/CTest/cmCTestBuildCommand.h @@ -60,10 +60,12 @@ public: virtual const char* GetFullDocumentation() { return - " ctest_build([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n" - " [NUMBER_ERRORS val] [NUMBER_WARNINGS val])\n" + " ctest_build([BUILD build_dir] [TARGET target] [RETURN_VALUE res]\n" + " [APPEND][NUMBER_ERRORS val] [NUMBER_WARNINGS val])\n" "Builds the given build directory and stores results in Build.xml. " - "If no BUILD is given, the CTEST_BINARY_DIRECTORY variable is used. " + "If no BUILD is given, the CTEST_BINARY_DIRECTORY variable is used.\n" + "The TARGET variable can be used to specify a build target. If none " + "is specified, the \"all\" target will be built.\n" "The RETURN_VALUE option specifies a variable in which to store the " "return value of the native build tool. " "The NUMBER_ERRORS and NUMBER_WARNINGS options specify variables in " diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 8a69780..9b8cef5 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -23,6 +23,7 @@ cmCTestMultiProcessHandler::cmCTestMultiProcessHandler() this->ParallelLevel = 1; this->Completed = 0; this->RunningCount = 0; + this->StopTimePassed = false; } cmCTestMultiProcessHandler::~cmCTestMultiProcessHandler() @@ -69,6 +70,10 @@ void cmCTestMultiProcessHandler::RunTests() this->StartNextTests(); while(this->Tests.size() != 0) { + if(this->StopTimePassed) + { + return; + } this->CheckOutput(); this->StartNextTests(); } @@ -102,6 +107,12 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test) { this->RunningTests.insert(testRun); } + else if(testRun->IsStopTimePassed()) + { + this->StopTimePassed = true; + delete testRun; + return; + } else { this->UnlockResources(test); @@ -251,6 +262,10 @@ void cmCTestMultiProcessHandler::StartNextTests() } if(this->StartTest(*test)) { + if(this->StopTimePassed) + { + return; + } numToStart -= processors; this->RunningCount += processors; } diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h index d4f6c71..4f51b0b 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.h +++ b/Source/CTest/cmCTestMultiProcessHandler.h @@ -94,6 +94,7 @@ protected: //Number of tests that are complete size_t Completed; size_t RunningCount; + bool StopTimePassed; //list of test properties (indices concurrent to the test map) PropertiesMap Properties; std::map<int, bool> TestRunningMap; diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 4c9675b..9fb8827 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -32,6 +32,7 @@ cmCTestRunTest::cmCTestRunTest(cmCTestTestHandler* handler) this->ProcessOutput = ""; this->CompressedOutput = ""; this->CompressionRatio = 2; + this->StopTimePassed = false; } cmCTestRunTest::~cmCTestRunTest() @@ -436,8 +437,13 @@ bool cmCTestRunTest::StartTest(size_t total) } this->StartTime = this->CTest->CurrentTime(); - return this->ForkProcess(this->ResolveTimeout(), - &this->TestProperties->Environment); + double timeout = this->ResolveTimeout(); + + if(this->StopTimePassed) + { + return false; + } + return this->ForkProcess(timeout, &this->TestProperties->Environment); } //---------------------------------------------------------------------- @@ -569,8 +575,9 @@ double cmCTestRunTest::ResolveTimeout() if(stop_timeout <= 0 || stop_timeout > this->CTest->LastStopTimeout) { cmCTestLog(this->CTest, ERROR_MESSAGE, "The stop time has been passed. " - "Exiting ctest." << std::endl); - exit(-1); + "Stopping all tests." << std::endl); + this->StopTimePassed = true; + return 0; } return timeout == 0 ? stop_timeout : (timeout < stop_timeout ? timeout : stop_timeout); diff --git a/Source/CTest/cmCTestRunTest.h b/Source/CTest/cmCTestRunTest.h index d7d3a2f..e0cb888 100644 --- a/Source/CTest/cmCTestRunTest.h +++ b/Source/CTest/cmCTestRunTest.h @@ -39,6 +39,8 @@ public: std::string GetProcessOutput() { return this->ProcessOutput; } + bool IsStopTimePassed() { return this->StopTimePassed; } + cmCTestTestHandler::cmCTestTestResult GetTestResults() { return this->TestResult; } @@ -90,6 +92,7 @@ private: std::string TestCommand; std::string ActualCommand; std::vector<std::string> Arguments; + bool StopTimePassed; }; inline int getNumWidth(size_t n) diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index b9cee6c..d2742ec 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1036,9 +1036,9 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed, bool randomSchedule = this->CTest->GetScheduleType() == "Random"; if(randomSchedule) - { + { srand((unsigned)time(0)); - } + } for (ListOfTests::iterator it = this->TestList.begin(); it != this->TestList.end(); ++it) diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index 30d812d..200b4f8 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2010) SET(KWSYS_DATE_STAMP_MONTH 06) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 17) +SET(KWSYS_DATE_STAMP_DAY 22) |