[Cmake-commits] [cmake-commits] alex committed cmExtraEclipseCDT4Generator.h 1.5 1.6 cmExtraEclipseCDT4Generator.cxx 1.16 1.17

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Jan 9 18:58:23 EST 2009


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

Modified Files:
	cmExtraEclipseCDT4Generator.h cmExtraEclipseCDT4Generator.cxx 
Log Message:
BUG: fix #8105: don't hardcode "gcc" and "make" but use CMAKE_C_COMPILER and
CMAKE_MAKE_PROGRAM instead

Alex


Index: cmExtraEclipseCDT4Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExtraEclipseCDT4Generator.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** cmExtraEclipseCDT4Generator.h	8 Jan 2009 23:09:49 -0000	1.5
--- cmExtraEclipseCDT4Generator.h	9 Jan 2009 23:58:21 -0000	1.6
***************
*** 88,92 ****
  
    // Helper functions
!   static void AppendStorageScanners(cmGeneratedFileStream& fout);
    static void AppendTarget         (cmGeneratedFileStream& fout,
                                      const std::string&     target,
--- 88,93 ----
  
    // Helper functions
!   static void AppendStorageScanners(cmGeneratedFileStream& fout, 
!                                     const cmMakefile& makefile);
    static void AppendTarget         (cmGeneratedFileStream& fout,
                                      const std::string&     target,

Index: cmExtraEclipseCDT4Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExtraEclipseCDT4Generator.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -C 2 -d -r1.16 -r1.17
*** cmExtraEclipseCDT4Generator.cxx	8 Jan 2009 23:09:50 -0000	1.16
--- cmExtraEclipseCDT4Generator.cxx	9 Jan 2009 23:58:21 -0000	1.17
***************
*** 700,704 ****
            ;
  
!   this->AppendStorageScanners(fout);
  
    fout << "</cconfiguration>\n"
--- 700,704 ----
            ;
  
!   this->AppendStorageScanners(fout, *mf);
  
    fout << "</cconfiguration>\n"
***************
*** 811,816 ****
  //----------------------------------------------------------------------------
  void cmExtraEclipseCDT4Generator
! ::AppendStorageScanners(cmGeneratedFileStream& fout)
  {
    fout << 
      "<storageModule moduleId=\"scannerConfiguration\">\n"
--- 811,831 ----
  //----------------------------------------------------------------------------
  void cmExtraEclipseCDT4Generator
! ::AppendStorageScanners(cmGeneratedFileStream& fout, 
!                         const cmMakefile& makefile)
  {
+   // we need the "make" and the C (or C++) compiler which are used, Alex
+   std::string make = makefile.GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
+   std::string compiler = makefile.GetSafeDefinition("CMAKE_C_COMPILER");
+   if (compiler.empty())
+     {
+     compiler = makefile.GetSafeDefinition("CMAKE_CXX_COMPILER");
+     }
+   if (compiler.empty())  //Hmm, what to do now ?
+     {
+     compiler = "gcc";
+     }
+ 
+ 
+   // the following right now hardcodes gcc behaviour :-/
    fout << 
      "<storageModule moduleId=\"scannerConfiguration\">\n"
***************
*** 823,832 ****
      true, "", true, "specsFile",
      "-E -P -v -dD ${plugin_state_location}/${specs_file}",
!     "gcc", true, true);
    cmExtraEclipseCDT4Generator::AppendScannerProfile(fout,
      "org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile",
      true, "", true, "makefileGenerator",
      "-f ${project_name}_scd.mk",
!     "make", true, true);
  
    fout << "</storageModule>\n";
--- 838,847 ----
      true, "", true, "specsFile",
      "-E -P -v -dD ${plugin_state_location}/${specs_file}",
!     compiler, true, true);
    cmExtraEclipseCDT4Generator::AppendScannerProfile(fout,
      "org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile",
      true, "", true, "makefileGenerator",
      "-f ${project_name}_scd.mk",
!     make, true, true);
  
    fout << "</storageModule>\n";



More information about the Cmake-commits mailing list