[Cmake-commits] [cmake-commits] hoffman committed cmVisualStudio10TargetGenerator.cxx 1.28 1.29

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Dec 9 11:52:15 EST 2009


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

Modified Files:
	cmVisualStudio10TargetGenerator.cxx 
Log Message:
Fix for bug 10001, make vs 10 compiler .rc files correctly


Index: cmVisualStudio10TargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmVisualStudio10TargetGenerator.cxx,v
retrieving revision 1.28
retrieving revision 1.29
diff -C 2 -d -r1.28 -r1.29
*** cmVisualStudio10TargetGenerator.cxx	18 Nov 2009 21:14:36 -0000	1.28
--- cmVisualStudio10TargetGenerator.cxx	9 Dec 2009 16:52:10 -0000	1.29
***************
*** 397,400 ****
--- 397,401 ----
    std::vector<cmSourceFile*> none;
    std::vector<cmSourceFile*> headers;
+   std::vector<cmSourceFile*> resource;
    
    for(std::vector<cmSourceFile*>::const_iterator s = classes.begin(); 
***************
*** 418,421 ****
--- 419,426 ----
        clCompile.push_back(sf);
        }
+     if(strcmp(lang, "RC") == 0)
+       {
+       resource.push_back(sf);
+       }
      else if(sf->GetCustomCommand())
        {
***************
*** 449,452 ****
--- 454,458 ----
    this->WriteGroupSources("ClCompile", clCompile, sourceGroups);
    this->WriteGroupSources("ClInclude", headers, sourceGroups);
+   this->WriteGroupSources("ResourceCompile", resource, sourceGroups);
    this->WriteGroupSources("CustomBuild", customBuild, sourceGroups);
  
***************
*** 569,603 ****
        const char* lang = (*source)->GetLanguage();
        bool cl = lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0);
          {
!         std::string sourceFile = (*source)->GetFullPath();
!         sourceFile =  cmSystemTools::RelativePath(
!           this->Makefile->GetCurrentOutputDirectory(),
!           sourceFile.c_str());
!         this->ConvertToWindowsSlash(sourceFile);
!         // output the source file
!         if(header)
!           {
!           this->WriteString("<ClInclude Include=\"", 2);
!           }
!         else if(cl)
!           {
!           this->WriteString("<ClCompile Include=\"", 2);
!           }
!         else
!           {
!           this->WriteString("<None Include=\"", 2);
!           }
!         (*this->BuildFileStream ) << sourceFile << "\"";
!         // ouput any flags specific to this source file
!         if(cl && this->OutputSourceSpecificFlags(*source))
!           {
!           // if the source file has specific flags the tag
!           // is ended on a new line
!           this->WriteString("</ClCompile>\n", 2);
!           }
!         else
!           {
!           (*this->BuildFileStream ) << " />\n";
!           }
          }
        }
--- 575,612 ----
        const char* lang = (*source)->GetLanguage();
        bool cl = lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0);
+       bool rc = lang && (strcmp(lang, "RC") == 0);
+       std::string sourceFile = (*source)->GetFullPath();
+       sourceFile =  cmSystemTools::RelativePath(
+         this->Makefile->GetCurrentOutputDirectory(),
+         sourceFile.c_str());
+       this->ConvertToWindowsSlash(sourceFile);
+       // output the source file
+       if(header)
          {
!         this->WriteString("<ClInclude Include=\"", 2);
!         }
!       else if(cl)
!         {
!         this->WriteString("<ClCompile Include=\"", 2);
!         }
!       else if(rc)
!         {
!         this->WriteString("<ResourceCompile Include=\"", 2);
!         }
!       else
!         {
!         this->WriteString("<None Include=\"", 2);
!         }
!       (*this->BuildFileStream ) << sourceFile << "\"";
!       // ouput any flags specific to this source file
!       if(cl && this->OutputSourceSpecificFlags(*source))
!         {
!         // if the source file has specific flags the tag
!         // is ended on a new line
!         this->WriteString("</ClCompile>\n", 2);
!         }
!       else
!         {
!         (*this->BuildFileStream ) << " />\n";
          }
        }



More information about the Cmake-commits mailing list