summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-10-07 20:23:20 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-10-07 20:23:20 (GMT)
commit637418a8355cf2bc0aa0796c4bd99a65f793c1ed (patch)
tree5b0300cff579f4cce1564ec3dff7c4d35926ee53 /Source/cmLocalVisualStudio7Generator.cxx
parentdb0e1fd6756fc5da5ec046e00ce736fc5e93c094 (diff)
downloadCMake-637418a8355cf2bc0aa0796c4bd99a65f793c1ed.zip
CMake-637418a8355cf2bc0aa0796c4bd99a65f793c1ed.tar.gz
CMake-637418a8355cf2bc0aa0796c4bd99a65f793c1ed.tar.bz2
BUG: fix for 4524, add support for target properties to set vs source code control information
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx32
1 files changed, 29 insertions, 3 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index faeb620..ce603b6 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1832,6 +1832,26 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
{
keyword = "Win32Proj";
}
+ const char* vsProjectname = target.GetProperty("VS_SCC_PROJECTNAME");
+ if (!vsProjectname)
+ {
+ vsProjectname = "";
+ }
+ const char* vsLocalpath = target.GetProperty("VS_SCC_LOCALPATH");
+ if (!vsLocalpath)
+ {
+ vsLocalpath = "";
+ }
+ const char* vsProvider = target.GetProperty("VS_SCC_PROVIDER");
+ std::string providerString;
+ if (!vsProvider)
+ {
+ providerString = "";
+ }
+ else
+ {
+ providerString = "\tSccProvider=\"" + std::string(vsProvider) + "\"\n";
+ }
cmGlobalVisualStudio7Generator* gg =
static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator);
fout << "\tName=\"" << projLabel << "\"\n";
@@ -1839,9 +1859,15 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
{
fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n";
}
- fout << "\tSccProjectName=\"\"\n"
- << "\tSccLocalPath=\"\"\n"
- << "\tKeyword=\"" << keyword << "\">\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=\"" << providerString << "\"\n";
+ }
+ fout << "\tKeyword=\"" << keyword << "\">\n"
<< "\t<Platforms>\n"
<< "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << "\"/>\n"
<< "\t</Platforms>\n";