BUG: fix bug with custom commands depending on executables

This commit is contained in:
Bill Hoffman 2003-08-28 14:52:26 -04:00
parent 2ff4690192
commit 58d9cfa141
2 changed files with 26 additions and 6 deletions

View File

@ -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";

View File

@ -861,9 +861,19 @@ WriteCustomRule(std::ostream& fout,
std::string temp;
for(std::vector<std::string>::const_iterator d = depends.begin();
d != depends.end(); ++d)
{
fout << this->ConvertToXMLOutputPath(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 << this->ConvertToXMLOutputPath(d->c_str())
<< ";";
}
}
fout << "\"\n";
fout << "\t\t\t\t\tOutputs=\"";