summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2015-07-24 18:23:13 (GMT)
committerBrad King <brad.king@kitware.com>2015-07-27 15:14:51 (GMT)
commit64821e8a40cf1add0cf3fd99b0860378754c64cf (patch)
treed4a7f00e85dd67c69a845b5370b240b9cd0304bb
parent3a0db0223b8c10cfaa6984253d794ab97425adf9 (diff)
downloadCMake-64821e8a40cf1add0cf3fd99b0860378754c64cf.zip
CMake-64821e8a40cf1add0cf3fd99b0860378754c64cf.tar.gz
CMake-64821e8a40cf1add0cf3fd99b0860378754c64cf.tar.bz2
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).
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 70b7f5c..2af09cb 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -176,7 +176,7 @@ bool cmCTestAddSubdirectoryCommand
cmSystemTools::ChangeDirectory(cwd);
std::string fname = cwd;
fname += "/";
- fname += args[1];
+ fname += args[0];
if ( !cmSystemTools::FileExists(fname.c_str()) )
{