[Cmake-commits] [cmake-commits] hoffman committed cmLocalVisualStudio7Generator.cxx 1.231 1.232 cmSetTargetPropertiesCommand.h 1.31 1.32

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Oct 7 16:23:22 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv1274/Source

Modified Files:
	cmLocalVisualStudio7Generator.cxx 
	cmSetTargetPropertiesCommand.h 
Log Message:
BUG: fix for 4524, add support for target properties to set vs source code control information


Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.231
retrieving revision 1.232
diff -C 2 -d -r1.231 -r1.232
*** cmLocalVisualStudio7Generator.cxx	1 Oct 2008 13:04:27 -0000	1.231
--- cmLocalVisualStudio7Generator.cxx	7 Oct 2008 20:23:20 -0000	1.232
***************
*** 1833,1836 ****
--- 1833,1856 ----
      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);
***************
*** 1840,1846 ****
      fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n";
      }
!   fout << "\tSccProjectName=\"\"\n"
!        << "\tSccLocalPath=\"\"\n"
!        << "\tKeyword=\"" << keyword << "\">\n"
         << "\t<Platforms>\n"
         << "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << "\"/>\n"
--- 1860,1872 ----
      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=\"" << providerString << "\"\n";
!     }
!   fout << "\tKeyword=\"" << keyword << "\">\n"
         << "\t<Platforms>\n"
         << "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << "\"/>\n"

Index: cmSetTargetPropertiesCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSetTargetPropertiesCommand.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -C 2 -d -r1.31 -r1.32
*** cmSetTargetPropertiesCommand.h	23 Jan 2008 15:27:59 -0000	1.31
--- cmSetTargetPropertiesCommand.h	7 Oct 2008 20:23:20 -0000	1.32
***************
*** 146,149 ****
--- 146,152 ----
          "to change the visual studio keyword, for example QT integration "
          "works better if this is set to Qt4VSv1.0.\n"
+         "VS_SCC_PROJECTNAME, VS_SCC_LOCALPATH, VS_SCC_PROVIDER can be set "
+         "to add support for source control bindings in a  Visual Studio "
+         "project file.\n"
          "When a library is built CMake by default generates code to remove "
          "any existing library using all possible names.  This is needed "



More information about the Cmake-commits mailing list