summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-23 16:26:42 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-24 07:19:56 (GMT)
commit84fb579fc8935202bf182bbd1685aff6acc2a3b5 (patch)
tree192d1b6e4d392ab4640b7588e12ebf37234b9b8a
parent1eff421ad00bd26a22b5145fe2b175a300041dca (diff)
downloadCMake-84fb579fc8935202bf182bbd1685aff6acc2a3b5.zip
CMake-84fb579fc8935202bf182bbd1685aff6acc2a3b5.tar.gz
CMake-84fb579fc8935202bf182bbd1685aff6acc2a3b5.tar.bz2
VS: Port WriteProject to cmGeneratorTarget
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx10
-rw-r--r--Source/cmGlobalVisualStudio71Generator.h2
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx9
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h2
4 files changed, 12 insertions, 11 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 9bb37ce..adf5c67 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -152,18 +152,18 @@ void
cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
const std::string& dspname,
const char* dir,
- cmTarget const& t)
+ cmGeneratorTarget const* t)
{
// check to see if this is a fortran build
const char* ext = ".vcproj";
const char* project =
"Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"";
- if(this->TargetIsFortranOnly(t))
+ if(this->TargetIsFortranOnly(*t->Target))
{
ext = ".vfproj";
project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \"";
}
- const char* targetExt = t.GetProperty("GENERATOR_FILE_NAME_EXT");
+ const char* targetExt = t->GetProperty("GENERATOR_FILE_NAME_EXT");
if(targetExt)
{
ext = targetExt;
@@ -175,12 +175,12 @@ cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
<< this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
<< dspname << ext << "\", \"{" << guid << "}\"\n";
fout << "\tProjectSection(ProjectDependencies) = postProject\n";
- this->WriteProjectDepends(fout, dspname, dir, t);
+ this->WriteProjectDepends(fout, dspname, dir, *t->Target);
fout << "\tEndProjectSection\n";
fout <<"EndProject\n";
- UtilityDependsMap::iterator ui = this->UtilityDepends.find(&t);
+ UtilityDependsMap::iterator ui = this->UtilityDepends.find(t->Target);
if(ui != this->UtilityDepends.end())
{
const char* uname = ui->second.c_str();
diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h
index 7f88e34..074bce5 100644
--- a/Source/cmGlobalVisualStudio71Generator.h
+++ b/Source/cmGlobalVisualStudio71Generator.h
@@ -59,7 +59,7 @@ protected:
std::ostream& fout, std::vector<std::string> const& configs);
virtual void WriteProject(std::ostream& fout,
const std::string& name, const char* path,
- cmTarget const& t);
+ const cmGeneratorTarget *t);
virtual void WriteProjectDepends(std::ostream& fout,
const std::string& name, const char* path,
cmTarget const& t);
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index bc831e5..8b874b6 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -477,7 +477,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
dir = ""; // msbuild cannot handle ".\" prefix
}
this->WriteProject(fout, vcprojName, dir.c_str(),
- *target->Target);
+ target);
written = true;
}
}
@@ -685,13 +685,14 @@ cmGlobalVisualStudio7Generator::ConvertToSolutionPath(const char* path)
// the libraries it uses are also done here
void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
const std::string& dspname,
- const char* dir, cmTarget const& target)
+ const char* dir,
+ cmGeneratorTarget const* target)
{
// check to see if this is a fortran build
const char* ext = ".vcproj";
const char* project =
"Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"";
- if(this->TargetIsFortranOnly(target))
+ if(this->TargetIsFortranOnly(*target->Target))
{
ext = ".vfproj";
project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \"";
@@ -703,7 +704,7 @@ void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout,
<< dspname << ext << "\", \"{"
<< this->GetGUID(dspname) << "}\"\nEndProject\n";
- UtilityDependsMap::iterator ui = this->UtilityDepends.find(&target);
+ UtilityDependsMap::iterator ui = this->UtilityDepends.find(target->Target);
if(ui != this->UtilityDepends.end())
{
const char* uname = ui->second.c_str();
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 4ef0990..a514dcd 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -123,7 +123,7 @@ protected:
std::vector<cmLocalGenerator*>& generators);
virtual void WriteProject(std::ostream& fout,
const std::string& name, const char* path,
- cmTarget const& t);
+ const cmGeneratorTarget *t);
virtual void WriteProjectDepends(std::ostream& fout,
const std::string& name, const char* path,
cmTarget const&t);