summaryrefslogtreecommitdiff
path: root/Source/cmaketest.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-03-20 16:19:00 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2002-03-20 16:19:00 -0500
commit2f639d37b50ad37b28d001a023fc39e21ceda559 (patch)
treef30f0bb6277616e6a46a4296e324638a29acd1b4 /Source/cmaketest.cxx
parent49bcc1ad51e25b0d7c08a2861b997a9d10cf6379 (diff)
downloadcmake-2f639d37b50ad37b28d001a023fc39e21ceda559.tar.gz
ENH: add new command to create a test driver
Diffstat (limited to 'Source/cmaketest.cxx')
-rw-r--r--Source/cmaketest.cxx23
1 files changed, 20 insertions, 3 deletions
diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx
index 521c965549..cf13f5e1d5 100644
--- a/Source/cmaketest.cxx
+++ b/Source/cmaketest.cxx
@@ -86,12 +86,23 @@ int main (int argc, char *argv[])
std::string generator = "-G";
generator += CMAKE_GENERATOR;
args.push_back(generator);
-
+
+ std::vector<std::string> progArgs;
if(argc > 6)
{
- for (int j = 6; j < argc ; j++)
+ if(strcmp(argv[6] , "CMAKE_ARGS") == 0)
+ {
+ for (int j = 7; j < argc ; j++)
+ {
+ args.push_back(argv[j]);
+ }
+ }
+ else
{
- args.push_back(argv[j]);
+ for(int j = 6; j < argc; j++)
+ {
+ progArgs.push_back(argv[j]);
+ }
}
}
@@ -254,6 +265,12 @@ int main (int argc, char *argv[])
return 1;
}
fullPath = cmSystemTools::ConvertToOutputPath(fullPath.c_str());
+ for(std::vector<std::string>::iterator p = progArgs.begin();
+ p != progArgs.end(); ++p)
+ {
+ fullPath += " ";
+ fullPath += *p;
+ }
std::cout << "Running test executable: " << fullPath.c_str() << "\n";
int ret = 0;
if (!cmSystemTools::RunCommand(fullPath.c_str(), output, ret, 0, true))