summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-21 19:01:25 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2010-12-21 19:01:25 (GMT)
commit12e7bdea50646556f953045139fc4cae5e400b82 (patch)
tree388867c4404ae280b19bc82e744a715efe9c4ffa /Source
parentf94c4a35be0d9d19a4923849ce4910379f9748aa (diff)
parente1442ac9c16768962b43575ace24c7cf277c2e74 (diff)
downloadCMake-12e7bdea50646556f953045139fc4cae5e400b82.zip
CMake-12e7bdea50646556f953045139fc4cae5e400b82.tar.gz
CMake-12e7bdea50646556f953045139fc4cae5e400b82.tar.bz2
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"
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx10
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx17
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h1
3 files changed, 18 insertions, 10 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 2874952..adb5f2f 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -110,7 +110,7 @@ void cmGlobalVisualStudio71Generator
this->GetTargetSets(projectTargets, originalTargets, root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets);
- this->WriteTargetsToSolution(fout, orderedProjectTargets);
+ this->WriteTargetsToSolution(fout, root, orderedProjectTargets);
bool useFolderProperty = this->UseFolderProperty();
if (useFolderProperty)
@@ -182,8 +182,8 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
std::string guid = this->GetGUID(dspname);
fout << project
<< dspname << "\", \""
- << this->ConvertToSolutionPath(dir)
- << "\\" << dspname << ext << "\", \"{" << guid << "}\"\n";
+ << this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
+ << dspname << ext << "\", \"{" << guid << "}\"\n";
fout << "\tProjectSection(ProjectDependencies) = postProject\n";
this->WriteProjectDepends(fout, dspname, dir, t);
fout << "\tEndProjectSection\n";
@@ -196,8 +196,8 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
const char* uname = ui->second.c_str();
fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
<< uname << "\", \""
- << this->ConvertToSolutionPath(dir)
- << "\\" << uname << ".vcproj" << "\", \"{"
+ << this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
+ << uname << ".vcproj" << "\", \"{"
<< this->GetGUID(uname) << "}\"\n"
<< "\tProjectSection(ProjectDependencies) = postProject\n"
<< "\t\t{" << guid << "} = {" << guid << "}\n"
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index eb84a2c..51b8918 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -270,6 +270,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
std::ostream& fout,
+ cmLocalGenerator* root,
OrderedTargetDependSet const& projectTargets)
{
for(OrderedTargetDependSet::const_iterator tt =
@@ -296,6 +297,12 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
{
cmMakefile* tmf = target->GetMakefile();
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(),
*target);
written = true;
@@ -385,7 +392,7 @@ void cmGlobalVisualStudio7Generator
this->GetTargetSets(projectTargets, originalTargets, root, generators);
OrderedTargetDependSet orderedProjectTargets(projectTargets);
- this->WriteTargetsToSolution(fout, orderedProjectTargets);
+ this->WriteTargetsToSolution(fout, root, orderedProjectTargets);
bool useFolderProperty = this->UseFolderProperty();
if (useFolderProperty)
@@ -511,8 +518,8 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
fout << project
<< dspname << "\", \""
- << this->ConvertToSolutionPath(dir)
- << "\\" << dspname << ext << "\", \"{"
+ << this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
+ << dspname << ext << "\", \"{"
<< this->GetGUID(dspname) << "}\"\nEndProject\n";
UtilityDependsMap::iterator ui = this->UtilityDepends.find(&target);
@@ -521,8 +528,8 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
const char* uname = ui->second.c_str();
fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
<< uname << "\", \""
- << this->ConvertToSolutionPath(dir)
- << "\\" << uname << ".vcproj" << "\", \"{"
+ << this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
+ << uname << ".vcproj" << "\", \"{"
<< this->GetGUID(uname) << "}\"\n"
<< "EndProject\n";
}
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 57c079d..b6c84e8 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -118,6 +118,7 @@ protected:
virtual void WriteTargetsToSolution(
std::ostream& fout,
+ cmLocalGenerator* root,
OrderedTargetDependSet const& projectTargets);
virtual void WriteTargetDepends(
std::ostream& fout,