summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-08-28 18:52:26 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-08-28 18:52:26 (GMT)
commit58d9cfa1411187cb904d40a82849cb88b3595fe9 (patch)
tree43685af61d5b031b29036b8447614ad380b07131 /Source/cmLocalVisualStudio6Generator.cxx
parent2ff4690192d6df4c383bb1b8e4505381ce51bcbd (diff)
downloadCMake-58d9cfa1411187cb904d40a82849cb88b3595fe9.zip
CMake-58d9cfa1411187cb904d40a82849cb88b3595fe9.tar.gz
CMake-58d9cfa1411187cb904d40a82849cb88b3595fe9.tar.bz2
BUG: fix bug with custom commands depending on executables
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index d0e4a11..8379ec5 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -375,7 +375,7 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
fout << "USERDEP__HACK=";
for(std::vector<std::string>::const_iterator d = depends.begin();
d != depends.end(); ++d)
- {
+ {
fout << "\\\n\t" <<
cmSystemTools::ConvertToOutputPath(d->c_str());
}
@@ -458,8 +458,18 @@ void cmLocalVisualStudio6Generator::WriteCustomRule(std::ostream& fout,
for(std::vector<std::string>::const_iterator d = depends.begin();
d != depends.end(); ++d)
{
- fout << "\\\n\t" <<
- cmSystemTools::ConvertToOutputPath(d->c_str());
+ std::string dep = cmSystemTools::GetFilenameName(*d);
+ if (cmSystemTools::GetFilenameLastExtension(dep) == ".exe")
+ {
+ dep = cmSystemTools::GetFilenameWithoutLastExtension(dep);
+ }
+ std::string libPath = dep + "_CMAKE_PATH";
+ const char* cacheValue = m_Makefile->GetDefinition(libPath.c_str());
+ if (!cacheValue)
+ {
+ fout << "\\\n\t" <<
+ cmSystemTools::ConvertToOutputPath(d->c_str());
+ }
}
fout << "\n";