[Cmake-commits] [cmake-commits] hoffman committed cmMakefileTargetGenerator.cxx 1.97 1.98

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Apr 22 11:10:21 EDT 2008


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

Modified Files:
	cmMakefileTargetGenerator.cxx 
Log Message:
BUG: fix for bug 6834 RC should not get all COMPILE_FLAGS from a target and should work the same way as it does in the vs ide


Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.97
retrieving revision 1.98
diff -C 2 -d -r1.97 -r1.98
*** cmMakefileTargetGenerator.cxx	14 Apr 2008 13:08:35 -0000	1.97
--- cmMakefileTargetGenerator.cxx	22 Apr 2008 15:10:19 -0000	1.98
***************
*** 492,497 ****
    if(this->Target->GetProperty("COMPILE_FLAGS"))
      {
!     this->LocalGenerator->AppendFlags
!       (flags, this->Target->GetProperty("COMPILE_FLAGS"));
      }
  
--- 492,522 ----
    if(this->Target->GetProperty("COMPILE_FLAGS"))
      {
!     std::string langIncludeExpr = "CMAKE_";
!     langIncludeExpr += lang;
!     langIncludeExpr += "_FLAG_REGEX";
!     const char* regex = this->Makefile->
!       GetDefinition(langIncludeExpr.c_str());
!     if(regex)
!       {
!       cmsys::RegularExpression r(regex);
!       std::vector<std::string> args;
!       cmSystemTools::ParseWindowsCommandLine(
!         this->Target->GetProperty("COMPILE_FLAGS"),
!         args);
!       for(std::vector<std::string>::iterator i = args.begin();
!           i != args.end(); ++i)
!         {
!         if(r.find(i->c_str()))
!           {
!           this->LocalGenerator->AppendFlags
!             (flags, i->c_str());
!           }
!         }
!       }
!     else
!       {
!       this->LocalGenerator->AppendFlags
!         (flags, this->Target->GetProperty("COMPILE_FLAGS"));
!       }
      }
  



More information about the Cmake-commits mailing list