diff options
Diffstat (limited to 'Tests/CMakeLib/testRST.cxx')
-rw-r--r-- | Tests/CMakeLib/testRST.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Tests/CMakeLib/testRST.cxx b/Tests/CMakeLib/testRST.cxx index bad9560..37cb3fa 100644 --- a/Tests/CMakeLib/testRST.cxx +++ b/Tests/CMakeLib/testRST.cxx @@ -25,9 +25,14 @@ void reportLine(std::ostream& os, bool ret, std::string line, bool eol) } } -int testRST(int, char*[]) +int testRST(int argc, char* argv[]) { - std::string dir = cmSystemTools::GetFilenamePath(__FILE__); + if(argc != 2) + { + std::cerr << "Usage: testRST <dir>" << std::endl; + return 1; + } + std::string dir = argv[1]; if(dir.empty()) { dir = "."; |