Merge topic 'vs10-sln-msbuild-workaround'
e1442ac Avoid msbuild ".\" idiosyncrasy that builds multiple configs (#11594) 42a2e9d Revert "Avoid msbuild idiosyncrasy that builds multiple configs" (#11633) 2c2eee6 Revert "Remove unused parameter "root" in some VS generator methods"
This commit is contained in:
commit
12e7bdea50
@ -110,7 +110,7 @@ void cmGlobalVisualStudio71Generator
|
|||||||
this->GetTargetSets(projectTargets, originalTargets, root, generators);
|
this->GetTargetSets(projectTargets, originalTargets, root, generators);
|
||||||
OrderedTargetDependSet orderedProjectTargets(projectTargets);
|
OrderedTargetDependSet orderedProjectTargets(projectTargets);
|
||||||
|
|
||||||
this->WriteTargetsToSolution(fout, orderedProjectTargets);
|
this->WriteTargetsToSolution(fout, root, orderedProjectTargets);
|
||||||
|
|
||||||
bool useFolderProperty = this->UseFolderProperty();
|
bool useFolderProperty = this->UseFolderProperty();
|
||||||
if (useFolderProperty)
|
if (useFolderProperty)
|
||||||
@ -182,8 +182,8 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
|
|||||||
std::string guid = this->GetGUID(dspname);
|
std::string guid = this->GetGUID(dspname);
|
||||||
fout << project
|
fout << project
|
||||||
<< dspname << "\", \""
|
<< dspname << "\", \""
|
||||||
<< this->ConvertToSolutionPath(dir)
|
<< this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
|
||||||
<< "\\" << dspname << ext << "\", \"{" << guid << "}\"\n";
|
<< dspname << ext << "\", \"{" << guid << "}\"\n";
|
||||||
fout << "\tProjectSection(ProjectDependencies) = postProject\n";
|
fout << "\tProjectSection(ProjectDependencies) = postProject\n";
|
||||||
this->WriteProjectDepends(fout, dspname, dir, t);
|
this->WriteProjectDepends(fout, dspname, dir, t);
|
||||||
fout << "\tEndProjectSection\n";
|
fout << "\tEndProjectSection\n";
|
||||||
@ -196,8 +196,8 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
|
|||||||
const char* uname = ui->second.c_str();
|
const char* uname = ui->second.c_str();
|
||||||
fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
|
fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
|
||||||
<< uname << "\", \""
|
<< uname << "\", \""
|
||||||
<< this->ConvertToSolutionPath(dir)
|
<< this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
|
||||||
<< "\\" << uname << ".vcproj" << "\", \"{"
|
<< uname << ".vcproj" << "\", \"{"
|
||||||
<< this->GetGUID(uname) << "}\"\n"
|
<< this->GetGUID(uname) << "}\"\n"
|
||||||
<< "\tProjectSection(ProjectDependencies) = postProject\n"
|
<< "\tProjectSection(ProjectDependencies) = postProject\n"
|
||||||
<< "\t\t{" << guid << "} = {" << guid << "}\n"
|
<< "\t\t{" << guid << "} = {" << guid << "}\n"
|
||||||
|
@ -270,6 +270,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
|
|||||||
|
|
||||||
void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
||||||
std::ostream& fout,
|
std::ostream& fout,
|
||||||
|
cmLocalGenerator* root,
|
||||||
OrderedTargetDependSet const& projectTargets)
|
OrderedTargetDependSet const& projectTargets)
|
||||||
{
|
{
|
||||||
for(OrderedTargetDependSet::const_iterator tt =
|
for(OrderedTargetDependSet::const_iterator tt =
|
||||||
@ -296,6 +297,12 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
|||||||
{
|
{
|
||||||
cmMakefile* tmf = target->GetMakefile();
|
cmMakefile* tmf = target->GetMakefile();
|
||||||
std::string dir = tmf->GetStartOutputDirectory();
|
std::string dir = tmf->GetStartOutputDirectory();
|
||||||
|
dir = root->Convert(dir.c_str(),
|
||||||
|
cmLocalGenerator::START_OUTPUT);
|
||||||
|
if(dir == ".")
|
||||||
|
{
|
||||||
|
dir = ""; // msbuild cannot handle ".\" prefix
|
||||||
|
}
|
||||||
this->WriteProject(fout, vcprojName, dir.c_str(),
|
this->WriteProject(fout, vcprojName, dir.c_str(),
|
||||||
*target);
|
*target);
|
||||||
written = true;
|
written = true;
|
||||||
@ -385,7 +392,7 @@ void cmGlobalVisualStudio7Generator
|
|||||||
this->GetTargetSets(projectTargets, originalTargets, root, generators);
|
this->GetTargetSets(projectTargets, originalTargets, root, generators);
|
||||||
OrderedTargetDependSet orderedProjectTargets(projectTargets);
|
OrderedTargetDependSet orderedProjectTargets(projectTargets);
|
||||||
|
|
||||||
this->WriteTargetsToSolution(fout, orderedProjectTargets);
|
this->WriteTargetsToSolution(fout, root, orderedProjectTargets);
|
||||||
|
|
||||||
bool useFolderProperty = this->UseFolderProperty();
|
bool useFolderProperty = this->UseFolderProperty();
|
||||||
if (useFolderProperty)
|
if (useFolderProperty)
|
||||||
@ -511,8 +518,8 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
|
|||||||
|
|
||||||
fout << project
|
fout << project
|
||||||
<< dspname << "\", \""
|
<< dspname << "\", \""
|
||||||
<< this->ConvertToSolutionPath(dir)
|
<< this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
|
||||||
<< "\\" << dspname << ext << "\", \"{"
|
<< dspname << ext << "\", \"{"
|
||||||
<< this->GetGUID(dspname) << "}\"\nEndProject\n";
|
<< this->GetGUID(dspname) << "}\"\nEndProject\n";
|
||||||
|
|
||||||
UtilityDependsMap::iterator ui = this->UtilityDepends.find(&target);
|
UtilityDependsMap::iterator ui = this->UtilityDepends.find(&target);
|
||||||
@ -521,8 +528,8 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
|
|||||||
const char* uname = ui->second.c_str();
|
const char* uname = ui->second.c_str();
|
||||||
fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
|
fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
|
||||||
<< uname << "\", \""
|
<< uname << "\", \""
|
||||||
<< this->ConvertToSolutionPath(dir)
|
<< this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
|
||||||
<< "\\" << uname << ".vcproj" << "\", \"{"
|
<< uname << ".vcproj" << "\", \"{"
|
||||||
<< this->GetGUID(uname) << "}\"\n"
|
<< this->GetGUID(uname) << "}\"\n"
|
||||||
<< "EndProject\n";
|
<< "EndProject\n";
|
||||||
}
|
}
|
||||||
|
@ -118,6 +118,7 @@ protected:
|
|||||||
|
|
||||||
virtual void WriteTargetsToSolution(
|
virtual void WriteTargetsToSolution(
|
||||||
std::ostream& fout,
|
std::ostream& fout,
|
||||||
|
cmLocalGenerator* root,
|
||||||
OrderedTargetDependSet const& projectTargets);
|
OrderedTargetDependSet const& projectTargets);
|
||||||
virtual void WriteTargetDepends(
|
virtual void WriteTargetDepends(
|
||||||
std::ostream& fout,
|
std::ostream& fout,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user