diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-20 21:19:00 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-03-20 21:19:00 (GMT) |
commit | 2f639d37b50ad37b28d001a023fc39e21ceda559 (patch) | |
tree | f30f0bb6277616e6a46a4296e324638a29acd1b4 /Source/cmaketest.cxx | |
parent | 49bcc1ad51e25b0d7c08a2861b997a9d10cf6379 (diff) | |
download | CMake-2f639d37b50ad37b28d001a023fc39e21ceda559.zip CMake-2f639d37b50ad37b28d001a023fc39e21ceda559.tar.gz CMake-2f639d37b50ad37b28d001a023fc39e21ceda559.tar.bz2 |
ENH: add new command to create a test driver
Diffstat (limited to 'Source/cmaketest.cxx')
-rw-r--r-- | Source/cmaketest.cxx | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx index 521c965..cf13f5e 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)) |