patch from Miguel
BUG: fix #5496: eclipse can't load projects where the build dir is a subdir of the src dir Alex
This commit is contained in:
parent
dcd29a14b0
commit
251565785a
@ -283,16 +283,21 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() const
|
|||||||
it != this->GlobalGenerator->GetProjectMap().end();
|
it != this->GlobalGenerator->GetProjectMap().end();
|
||||||
++it)
|
++it)
|
||||||
{
|
{
|
||||||
fout <<
|
std::string linkSourceDirectory =this->GetEclipsePath(
|
||||||
"\t\t<link>\n"
|
it->second[0]->GetMakefile()->GetStartDirectory());
|
||||||
"\t\t\t<name>" << it->first << "</name>\n"
|
if (!cmSystemTools::IsSubDirectory(homeOutputDirectory.c_str(),
|
||||||
"\t\t\t<type>2</type>\n"
|
linkSourceDirectory.c_str()))
|
||||||
"\t\t\t<location>"
|
{
|
||||||
<< this->GetEclipsePath(
|
fout <<
|
||||||
it->second[0]->GetMakefile()->GetStartDirectory())
|
"\t\t<link>\n"
|
||||||
<< "</location>\n"
|
"\t\t\t<name>" << it->first << "</name>\n"
|
||||||
"\t\t</link>\n"
|
"\t\t\t<type>2</type>\n"
|
||||||
;
|
"\t\t\t<location>"
|
||||||
|
<< this->GetEclipsePath(linkSourceDirectory)
|
||||||
|
<< "</location>\n"
|
||||||
|
"\t\t</link>\n"
|
||||||
|
;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// for EXECUTABLE_OUTPUT_PATH when not in binary dir
|
// for EXECUTABLE_OUTPUT_PATH when not in binary dir
|
||||||
std::string output_path = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH");
|
std::string output_path = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user