summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-17 20:41:24 (GMT)
committerBrad King <brad.king@kitware.com>2011-01-17 20:41:24 (GMT)
commit9859c64ffcc1450ce5dd23eb5c78fad58b030696 (patch)
treed85e66c0f706cb3a3fab4909c206c7fa920e4397 /Source/cmLocalVisualStudio7Generator.cxx
parent28a0403c3491d4a96f5dc827e54442a1d0a0dea7 (diff)
downloadCMake-9859c64ffcc1450ce5dd23eb5c78fad58b030696.zip
CMake-9859c64ffcc1450ce5dd23eb5c78fad58b030696.tar.gz
CMake-9859c64ffcc1450ce5dd23eb5c78fad58b030696.tar.bz2
Honor VS_SCC_* properties in Fortran targets (#10237)
Factor out generation of SccProjectName, SccLocalPath, and SccProvider from cmLocalVisualStudio7Generator::WriteProjectStart and call it from cmLocalVisualStudio7Generator::WriteProjectStartFortran too.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx29
1 files changed, 18 insertions, 11 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 21f6460..34756d8 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1706,6 +1706,22 @@ void cmLocalVisualStudio7Generator
event.Finish();
}
+void cmLocalVisualStudio7Generator::WriteProjectSCC(std::ostream& fout,
+ cmTarget& target)
+{
+ // if we have all the required Source code control tags
+ // then add that to the project
+ const char* vsProjectname = target.GetProperty("VS_SCC_PROJECTNAME");
+ const char* vsLocalpath = target.GetProperty("VS_SCC_LOCALPATH");
+ const char* vsProvider = target.GetProperty("VS_SCC_PROVIDER");
+ if(vsProvider && vsLocalpath && vsProjectname)
+ {
+ fout << "\tSccProjectName=\"" << vsProjectname << "\"\n"
+ << "\tSccLocalPath=\"" << vsLocalpath << "\"\n"
+ << "\tSccProvider=\"" << vsProvider << "\"\n";
+ }
+}
+
void
cmLocalVisualStudio7Generator
::WriteProjectStartFortran(std::ostream& fout,
@@ -1773,6 +1789,7 @@ cmLocalVisualStudio7Generator
{
fout << "\tProjectType=\"" << projectType << "\"\n";
}
+ this->WriteProjectSCC(fout, target);
fout<< "\tKeyword=\"" << keyword << "\">\n"
<< "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\">\n"
<< "\t<Platforms>\n"
@@ -1813,9 +1830,6 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
{
keyword = "Win32Proj";
}
- const char* vsProjectname = target.GetProperty("VS_SCC_PROJECTNAME");
- const char* vsLocalpath = target.GetProperty("VS_SCC_LOCALPATH");
- const char* vsProvider = target.GetProperty("VS_SCC_PROVIDER");
cmGlobalVisualStudio7Generator* gg =
static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator);
fout << "\tName=\"" << projLabel << "\"\n";
@@ -1823,14 +1837,7 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
{
fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n";
}
- // if we have all the required Source code control tags
- // then add that to the project
- if(vsProvider && vsLocalpath && vsProjectname)
- {
- fout << "\tSccProjectName=\"" << vsProjectname << "\"\n"
- << "\tSccLocalPath=\"" << vsLocalpath << "\"\n"
- << "\tSccProvider=\"" << vsProvider << "\"\n";
- }
+ this->WriteProjectSCC(fout, target);
fout << "\tKeyword=\"" << keyword << "\">\n"
<< "\t<Platforms>\n"
<< "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << "\"/>\n"