BUG: fix not being able to find generated files in the binary tree

This commit is contained in:
Bill Hoffman 2003-06-18 09:13:39 -04:00
parent 6309da4242
commit 5394a75340

View File

@ -1726,7 +1726,7 @@ cmSourceFile* cmMakefile::GetOrCreateSource(const char* sourceName,
// OK a source file object doesn't exist for the source // OK a source file object doesn't exist for the source
// maybe we made a bad call on assuming it was in the src tree // maybe we made a bad call on assuming it was in the src tree
if (generated && relative) if (relative)
{ {
src = this->GetCurrentOutputDirectory(); src = this->GetCurrentOutputDirectory();
src += "/"; src += "/";
@ -1737,7 +1737,13 @@ cmSourceFile* cmMakefile::GetOrCreateSource(const char* sourceName,
{ {
return ret; return ret;
} }
// go back to looking in the source directory for it
if(relative)
{
src = this->GetCurrentDirectory();
src += "/";
src += sourceName;
}
// we must create one // we must create one
cmSourceFile file; cmSourceFile file;
std::string path = cmSystemTools::GetFilenamePath(src); std::string path = cmSystemTools::GetFilenamePath(src);