BUG: Fix jump-over-and-build for missing libraries when the relative path to the library is different between the source and destination of the jump.
This commit is contained in:
parent
a4aab3b677
commit
fad0651d84
|
@ -1673,10 +1673,7 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout)
|
|||
this->OutputBuildTargetInDir(fout,
|
||||
cacheValue,
|
||||
library.c_str(),
|
||||
libpath.c_str(),
|
||||
m_Makefile->
|
||||
GetDefinition("LIBRARY_OUTPUT_PATH")
|
||||
);
|
||||
libpath.c_str());
|
||||
}
|
||||
// something other than a library...
|
||||
else
|
||||
|
@ -1696,10 +1693,7 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout)
|
|||
this->OutputBuildTargetInDir(fout,
|
||||
cacheValue,
|
||||
fullName.c_str(),
|
||||
exepath.c_str(),
|
||||
m_Makefile->
|
||||
GetDefinition("EXECUTABLE_OUTPUT_PATH")
|
||||
);
|
||||
exepath.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1708,10 +1702,8 @@ void cmLocalUnixMakefileGenerator::OutputDependLibs(std::ostream& fout)
|
|||
void cmLocalUnixMakefileGenerator::OutputBuildTargetInDirWindows(std::ostream& fout,
|
||||
const char* path,
|
||||
const char* library,
|
||||
const char* fullpath,
|
||||
const char* libOutPath)
|
||||
const char* fullpath)
|
||||
{
|
||||
const char* makeTarget = library;
|
||||
std::string jumpBack =
|
||||
cmSystemTools::RelativePath(cmSystemTools::GetProgramPath(fullpath).c_str(),
|
||||
m_Makefile->GetCurrentOutputDirectory());
|
||||
|
@ -1719,42 +1711,32 @@ void cmLocalUnixMakefileGenerator::OutputBuildTargetInDirWindows(std::ostream& f
|
|||
std::string wpath = this->ConvertToOutputForExisting(path);
|
||||
std::string wfullpath = this->ConvertToOutputForExisting(fullpath);
|
||||
|
||||
if(libOutPath && strcmp( libOutPath, "" ) != 0)
|
||||
{
|
||||
makeTarget = wfullpath.c_str();
|
||||
}
|
||||
fout << wfullpath
|
||||
<< ":\n\tcd " << wpath << "\n"
|
||||
<< "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.depends\n"
|
||||
<< "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.check_depends\n"
|
||||
<< "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) -f cmake.check_depends\n"
|
||||
<< "\t$(MAKE) $(MAKESILENT) " << makeTarget
|
||||
<< "\t$(MAKE) $(MAKESILENT) " << library
|
||||
<< "\n\tcd " << jumpBack << "\n";
|
||||
}
|
||||
|
||||
void cmLocalUnixMakefileGenerator::OutputBuildTargetInDir(std::ostream& fout,
|
||||
const char* path,
|
||||
const char* library,
|
||||
const char* fullpath,
|
||||
const char* outputPath)
|
||||
const char* fullpath)
|
||||
{
|
||||
if(m_WindowsShell)
|
||||
{
|
||||
this->OutputBuildTargetInDirWindows(fout, path, library, fullpath, outputPath);
|
||||
this->OutputBuildTargetInDirWindows(fout, path, library, fullpath);
|
||||
return;
|
||||
}
|
||||
const char* makeTarget = library;
|
||||
if(outputPath && strcmp( outputPath, "" ) != 0)
|
||||
{
|
||||
makeTarget = fullpath;
|
||||
}
|
||||
fout << this->ConvertToOutputForExisting(fullpath)
|
||||
<< ":\n\tcd " << this->ConvertToOutputForExisting(path)
|
||||
<< "; $(MAKE) $(MAKESILENT) cmake.depends"
|
||||
<< "; $(MAKE) $(MAKESILENT) cmake.check_depends"
|
||||
<< "; $(MAKE) $(MAKESILENT) -f cmake.check_depends"
|
||||
<< "; $(MAKE) $(MAKESILENT) "
|
||||
<< this->ConvertToRelativeOutputPath(makeTarget) << "\n\n";
|
||||
<< library << "\n\n";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -192,13 +192,11 @@ protected:
|
|||
virtual void OutputBuildTargetInDirWindows(std::ostream& fout,
|
||||
const char* path,
|
||||
const char* library,
|
||||
const char* fullpath,
|
||||
const char* outputPath);
|
||||
const char* fullpath);
|
||||
virtual void OutputBuildTargetInDir(std::ostream& fout,
|
||||
const char* path,
|
||||
const char* library,
|
||||
const char* fullpath,
|
||||
const char* outputPath);
|
||||
const char* fullpath);
|
||||
///! return true if the two paths are the same
|
||||
virtual bool SamePath(const char* path1, const char* path2);
|
||||
virtual std::string GetOutputExtension(const char* sourceExtension);
|
||||
|
|
Loading…
Reference in New Issue