summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2008-01-18 15:25:25 (GMT)
committerKen Martin <ken.martin@kitware.com>2008-01-18 15:25:25 (GMT)
commit7c473d482824cb251db0213955b36f1d391120a1 (patch)
treeed2fcb0b61d551a3ce6a42a8701a70ff00d1796e /Source/cmLocalGenerator.cxx
parent6ad79d13ddd74b9bf1a1819527d5eb1e88bac8c2 (diff)
downloadCMake-7c473d482824cb251db0213955b36f1d391120a1.zip
CMake-7c473d482824cb251db0213955b36f1d391120a1.tar.gz
CMake-7c473d482824cb251db0213955b36f1d391120a1.tar.bz2
BUG: fix bugs 5539 (progress going beyond 100% when new files are added) and 5889 (tests are not found in some cases when using add_subdirectory to .. etc)
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 66007d4..9c7c4b6 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -272,22 +272,19 @@ void cmLocalGenerator::GenerateTestFiles()
}
if ( this->Children.size())
{
- fout << "SUBDIRS(";
size_t i;
- std::string outDir = this->Makefile->GetStartOutputDirectory();
- outDir += "/";
for(i = 0; i < this->Children.size(); ++i)
{
- std::string binP =
+ fout << "ADD_SUBDIRECTORY(";
+ std::string srcP =
+ this->Children[i]->GetMakefile()->GetStartDirectory();
+ fout << this->Convert(srcP.c_str(),START);
+ fout << " ";
+ std::string outP =
this->Children[i]->GetMakefile()->GetStartOutputDirectory();
- cmSystemTools::ReplaceString(binP, outDir.c_str(), "");
- if ( i > 0 )
- {
- fout << " ";
- }
- fout << binP.c_str();
+ fout << this->Convert(outP.c_str(),START_OUTPUT);
+ fout << ")" << std::endl;
}
- fout << ")" << std::endl << std::endl;;
}
}