Browse Source

ctest: fix add_subdirectory() crash

The directory is at args[0], not args[1].  Introduced in commit
v2.6.0~489 (... 5889 ... tests are not found in some cases when using
add_subdirectory ..., 2008-01-18).
Ben Boeckel 10 years ago
parent
commit
64821e8a40
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/CTest/cmCTestTestHandler.cxx

+ 1 - 1
Source/CTest/cmCTestTestHandler.cxx

@@ -176,7 +176,7 @@ bool cmCTestAddSubdirectoryCommand
   cmSystemTools::ChangeDirectory(cwd);
   cmSystemTools::ChangeDirectory(cwd);
   std::string fname = cwd;
   std::string fname = cwd;
   fname += "/";
   fname += "/";
-  fname += args[1];
+  fname += args[0];
 
 
   if ( !cmSystemTools::FileExists(fname.c_str()) )
   if ( !cmSystemTools::FileExists(fname.c_str()) )
     {
     {