[Cmake-commits] [cmake-commits] king committed cmMakefileExecutableTargetGenerator.cxx 1.64 1.65 cmMakefileLibraryTargetGenerator.cxx 1.80 1.81 cmMakefileTargetGenerator.cxx 1.125 1.126 cmMakefileTargetGenerator.h 1.33 1.34

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 2 13:51:51 EDT 2009


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

Modified Files:
	cmMakefileExecutableTargetGenerator.cxx 
	cmMakefileLibraryTargetGenerator.cxx 
	cmMakefileTargetGenerator.cxx cmMakefileTargetGenerator.h 
Log Message:
Centralize language flag addition for Makefiles

We create cmMakefileTargetGenerator::AddFeatureFlags to consolidate
addition of language flags.  Currently it just adds the flags from
generic per-language flag variables (AddLanguageFlags).


Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.80
retrieving revision 1.81
diff -C 2 -d -r1.80 -r1.81
*** cmMakefileLibraryTargetGenerator.cxx	29 Sep 2009 20:39:07 -0000	1.80
--- cmMakefileLibraryTargetGenerator.cxx	2 Oct 2009 17:51:49 -0000	1.81
***************
*** 672,678 ****
        }
      }
    std::string langFlags;
!   this->LocalGenerator
!     ->AddLanguageFlags(langFlags, linkLanguage, this->ConfigName);
    // remove any language flags that might not work with the
    // particular os
--- 672,680 ----
        }
      }
+ 
+   // Add language feature flags.
    std::string langFlags;
!   this->AddFeatureFlags(langFlags, linkLanguage);
! 
    // remove any language flags that might not work with the
    // particular os

Index: cmMakefileTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -C 2 -d -r1.33 -r1.34
*** cmMakefileTargetGenerator.h	29 Sep 2009 20:39:07 -0000	1.33
--- cmMakefileTargetGenerator.h	2 Oct 2009 17:51:49 -0000	1.34
***************
*** 221,224 ****
--- 221,227 ----
    void AddModuleDefinitionFlag(std::string& flags);
  
+   // Add language feature flags.
+   void AddFeatureFlags(std::string& flags, const char* lang);
+ 
    //==================================================================
    // Convenience routines that do nothing more than forward to

Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.64
retrieving revision 1.65
diff -C 2 -d -r1.64 -r1.65
*** cmMakefileExecutableTargetGenerator.cxx	29 Sep 2009 20:39:07 -0000	1.64
--- cmMakefileExecutableTargetGenerator.cxx	2 Oct 2009 17:51:49 -0000	1.65
***************
*** 232,238 ****
      }
  
!   // Add language-specific flags.
!   this->LocalGenerator
!     ->AddLanguageFlags(flags, linkLanguage, this->ConfigName);
  
    // Add target-specific linker flags.
--- 232,237 ----
      }
  
!   // Add language feature flags.
!   this->AddFeatureFlags(flags, linkLanguage);
  
    // Add target-specific linker flags.

Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.125
retrieving revision 1.126
diff -C 2 -d -r1.125 -r1.126
*** cmMakefileTargetGenerator.cxx	30 Sep 2009 14:12:54 -0000	1.125
--- cmMakefileTargetGenerator.cxx	2 Oct 2009 17:51:49 -0000	1.126
***************
*** 292,299 ****
        (defines, this->Target->GetProperty(defPropName.c_str()), lang);
  
!     // Add language-specific flags.
!     this->LocalGenerator
!       ->AddLanguageFlags(flags, lang,
!                          this->LocalGenerator->ConfigurationName.c_str());
  
      // Fortran-specific flags computed for this target.
--- 292,297 ----
        (defines, this->Target->GetProperty(defPropName.c_str()), lang);
  
!     // Add language feature flags.
!     this->AddFeatureFlags(flags, lang);
  
      // Fortran-specific flags computed for this target.
***************
*** 1763,1764 ****
--- 1761,1771 ----
    this->LocalGenerator->AppendFlags(flags, flag.c_str());
  }
+ 
+ //----------------------------------------------------------------------------
+ void cmMakefileTargetGenerator::AddFeatureFlags(
+   std::string& flags, const char* lang
+   )
+ {
+   // Add language-specific flags.
+   this->LocalGenerator->AddLanguageFlags(flags, lang, this->ConfigName);
+ }



More information about the Cmake-commits mailing list