summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-11-11 18:34:21 (GMT)
committerBrad King <brad.king@kitware.com>2009-11-11 18:34:21 (GMT)
commitd2715cae493a16e9187d8e43f36fab90e3239184 (patch)
tree3bcf711fb6ad7368171e5d33ad75de1fe0ef98a7 /Source
parent29ebc97c38a291988e1e16edcbb000bfb879825b (diff)
downloadCMake-d2715cae493a16e9187d8e43f36fab90e3239184.zip
CMake-d2715cae493a16e9187d8e43f36fab90e3239184.tar.gz
CMake-d2715cae493a16e9187d8e43f36fab90e3239184.tar.bz2
CMake 2.8.0-rc7
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx2
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx2
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx15
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx10
-rw-r--r--Source/cmStandardIncludes.h2
-rw-r--r--Source/cmStringCommand.cxx17
-rw-r--r--Source/cmStringCommand.h5
-rw-r--r--Source/ctest.cxx7
8 files changed, 49 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 47bb56a..0d15ddc 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -462,7 +462,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
if ( !this->MemoryTesterOptions.size() )
{
this->MemoryTesterOptions = "-q --tool=memcheck --leak-check=yes "
- "--show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=100";
+ "--show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=50";
}
if ( this->CTest->GetCTestConfiguration(
"MemoryCheckSuppressionFile").size() )
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 80390b4..336303a 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -97,6 +97,8 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test)
else
{
this->Completed++;
+ this->TestFinishMap[test] = true;
+ this->TestRunningMap[test] = false;
this->RunningCount -= GetProcessorsUsed(test);
testRun->EndTest(this->Completed, this->Total, false);
this->Failed->push_back(this->Properties[test]->Name);
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index a32a335..2491d19 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -82,17 +82,20 @@ bool cmCTestSubdirCommand
for ( it = args.begin(); it != args.end(); ++ it )
{
cmSystemTools::ChangeDirectory(cwd.c_str());
- std::string fname = cwd;
- fname += "/";
- fname += *it;
+ std::string fname;
- //sanity check on relative path; if not, try absolute path
- if ( !cmSystemTools::FileIsDirectory(fname.c_str()))
+ if(cmSystemTools::FileIsFullPath(it->c_str()))
{
fname = *it;
}
+ else
+ {
+ fname = cwd;
+ fname += "/";
+ fname += *it;
+ }
- if ( !cmSystemTools::FileExists(fname.c_str()) )
+ if ( !cmSystemTools::FileIsDirectory(fname.c_str()) )
{
// No subdirectory? So what...
continue;
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 7240073..e548230 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1521,6 +1521,16 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
extraLinkOptions += " ";
extraLinkOptions += targetLinkFlags;
}
+ if(configName && *configName)
+ {
+ std::string linkFlagsVar = "LINK_FLAGS_";
+ linkFlagsVar += cmSystemTools::UpperCase(configName);
+ if(const char* linkFlags = target.GetProperty(linkFlagsVar.c_str()))
+ {
+ extraLinkOptions += " ";
+ extraLinkOptions += linkFlags;
+ }
+ }
// Get the product name components.
std::string pnprefix;
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index 115dc8c..38347a92 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -18,7 +18,7 @@
// include configure generated header to define CMAKE_NO_ANSI_STREAM_HEADERS,
// CMAKE_NO_STD_NAMESPACE, and other macros.
-#include "cmConfigure.h"
+#include <cmConfigure.h>
#include <cmsys/Configure.hxx>
#ifdef _MSC_VER
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index 2313853..3bd47a4 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -700,6 +700,9 @@ bool cmStringCommand
return false;
}
+ static bool seeded = false;
+ bool force_seed = false;
+ int seed = (int) time(NULL);
int length = 5;
const char cmStringCommandDefaultAlphabet[] = "qwertyuiopasdfghjklzxcvbnm"
"QWERTYUIOPASDFGHJKLZXCVBNM"
@@ -723,6 +726,12 @@ bool cmStringCommand
++i;
alphabet = args[i];
}
+ else if ( args[i] == "RANDOM_SEED" )
+ {
+ ++i;
+ seed = atoi(args[i].c_str());
+ force_seed = true;
+ }
}
}
if ( !alphabet.size() )
@@ -744,7 +753,13 @@ bool cmStringCommand
const std::string& variableName = args[args.size()-1];
std::vector<char> result;
- srand((int)time(NULL));
+
+ if (!seeded || force_seed)
+ {
+ seeded = true;
+ srand(seed);
+ }
+
const char* alphaPtr = alphabet.c_str();
int cc;
for ( cc = 0; cc < length; cc ++ )
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h
index 6e4bd86..2a916b4 100644
--- a/Source/cmStringCommand.h
+++ b/Source/cmStringCommand.h
@@ -89,7 +89,7 @@ public:
" string(SUBSTRING <string> <begin> <length> <output variable>)\n"
" string(STRIP <string> <output variable>)\n"
" string(RANDOM [LENGTH <length>] [ALPHABET <alphabet>]\n"
- " <output variable>)\n"
+ " [RANDOM_SEED <seed>] <output variable>)\n"
"REGEX MATCH will match the regular expression once and store the "
"match in the output variable.\n"
"REGEX MATCHALL will match the regular expression as many times as "
@@ -115,7 +115,8 @@ public:
"RANDOM will return a random string of given length consisting of "
"characters from the given alphabet. Default length is 5 "
"characters and default alphabet is all numbers and upper and "
- "lower case letters.\n"
+ "lower case letters. If an integer RANDOM_SEED is given, its "
+ "value will be used to seed the random number generator.\n"
"The following characters have special meaning in regular expressions:\n"
" ^ Matches at beginning of a line\n"
" $ Matches at end of a line\n"
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 2f99410..eec5c03 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -212,6 +212,13 @@ static const char * cmDocumentationOptions[][3] =
"This option allows performing the same CTest action (such as test) "
"multiple times and submit all stages to the same dashboard (Dart2 "
"required). Each execution requires different index." },
+ {"--help-command <cmd> [<file>]", "Show help for a single command and exit.",
+ "Prints the help for the command to stdout or to the specified file." },
+ {"--help-command-list [<file>]", "List available commands and exit.",
+ "Prints the list of all available listfile commands to stdout or the "
+ "specified file." },
+ {"--help-commands [<file>]", "Print help for all commands and exit.",
+ "Prints the help for all commands to stdout or to the specified file." },
{0,0,0}
};