summaryrefslogtreecommitdiffstats
path: root/Source/cmEnableTestingCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-03-15 16:22:08 (GMT)
committerKen Martin <ken.martin@kitware.com>2005-03-15 16:22:08 (GMT)
commit8545b40f8e7b70fa7926c2c66dc5e3bcc5751881 (patch)
tree8e047c822e5d4c283f8068ef5427490fce7457be /Source/cmEnableTestingCommand.cxx
parent28bb8e04c0eb18ecb533951e0931f00207c8f249 (diff)
downloadCMake-8545b40f8e7b70fa7926c2c66dc5e3bcc5751881.zip
CMake-8545b40f8e7b70fa7926c2c66dc5e3bcc5751881.tar.gz
CMake-8545b40f8e7b70fa7926c2c66dc5e3bcc5751881.tar.bz2
ENH: only support rel paths for now
Diffstat (limited to 'Source/cmEnableTestingCommand.cxx')
-rw-r--r--Source/cmEnableTestingCommand.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmEnableTestingCommand.cxx b/Source/cmEnableTestingCommand.cxx
index 802a9a5..3b717cd 100644
--- a/Source/cmEnableTestingCommand.cxx
+++ b/Source/cmEnableTestingCommand.cxx
@@ -61,6 +61,10 @@ void cmEnableTestingCommand::FinalPass()
<< "# The next line is critical for Dart to work" << std::endl
<< "# Duh :-)" << std::endl << std::endl;
+ // get our output directory
+ std::string outDir = m_Makefile->GetStartOutputDirectory();
+ outDir += "/";
+
// write out the subdirs for the current directory
if (!m_Makefile->GetSubDirectories().empty())
{
@@ -68,11 +72,15 @@ void cmEnableTestingCommand::FinalPass()
const std::vector<cmSubDirectory>& subdirs
= m_Makefile->GetSubDirectories();
std::vector<cmSubDirectory>::const_iterator i = subdirs.begin();
- fout << (*i).SourcePath.c_str();
+ std::string binP = (*i).BinaryPath;
+ cmSystemTools::ReplaceString(binP, outDir.c_str(), "");
+ fout << binP.c_str();
++i;
for(; i != subdirs.end(); ++i)
{
- fout << " " << i->SourcePath.c_str();
+ binP = (*i).BinaryPath;
+ cmSystemTools::ReplaceString(binP, outDir.c_str(), "");
+ fout << " " << binP.c_str();
}
fout << ")" << std::endl << std::endl;;
}