[Cmake-commits] [cmake-commits] king committed cmFindCommon.cxx 1.8 1.9 cmFindPackageCommand.cxx 1.64 1.65 cmMakefile.cxx 1.522 1.523 cmMakefile.h 1.260 1.261

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Sep 30 13:45:16 EDT 2009


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

Modified Files:
	cmFindCommon.cxx cmFindPackageCommand.cxx cmMakefile.cxx 
	cmMakefile.h 
Log Message:
Create cmMakefile::PlatformIs64Bit helper method

This method centralizes tests for whether CMAKE_SIZEOF_VOID_P is 8.


Index: cmFindCommon.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindCommon.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** cmFindCommon.cxx	28 Sep 2009 15:42:40 -0000	1.8
--- cmFindCommon.cxx	30 Sep 2009 17:45:13 -0000	1.9
***************
*** 325,336 ****
    cmSystemTools::KeyWOW64 view = cmSystemTools::KeyWOW64_32;
    cmSystemTools::KeyWOW64 other_view = cmSystemTools::KeyWOW64_64;
!   if(const char* psize =
!      this->Makefile->GetDefinition("CMAKE_SIZEOF_VOID_P"))
      {
!     if(atoi(psize) == 8)
!       {
!       view = cmSystemTools::KeyWOW64_64;
!       other_view = cmSystemTools::KeyWOW64_32;
!       }
      }
  
--- 325,332 ----
    cmSystemTools::KeyWOW64 view = cmSystemTools::KeyWOW64_32;
    cmSystemTools::KeyWOW64 other_view = cmSystemTools::KeyWOW64_64;
!   if(this->Makefile->PlatformIs64Bit())
      {
!     view = cmSystemTools::KeyWOW64_64;
!     other_view = cmSystemTools::KeyWOW64_32;
      }
  

Index: cmFindPackageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v
retrieving revision 1.64
retrieving revision 1.65
diff -C 2 -d -r1.64 -r1.65
*** cmFindPackageCommand.cxx	28 Sep 2009 15:42:40 -0000	1.64
--- cmFindPackageCommand.cxx	30 Sep 2009 17:45:13 -0000	1.65
***************
*** 330,342 ****
  
    // Lookup whether lib64 paths should be used.
!   if(const char* sizeof_dptr =
!      this->Makefile->GetDefinition("CMAKE_SIZEOF_VOID_P"))
      {
!     if(atoi(sizeof_dptr) == 8 &&
!        this->Makefile->GetCMakeInstance()
!        ->GetPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS"))
!       {
!       this->UseLib64Paths = true;
!       }
      }
  
--- 330,338 ----
  
    // Lookup whether lib64 paths should be used.
!   if(this->Makefile->PlatformIs64Bit() &&
!      this->Makefile->GetCMakeInstance()
!      ->GetPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS"))
      {
!     this->UseLib64Paths = true;
      }
  

Index: cmMakefile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.h,v
retrieving revision 1.260
retrieving revision 1.261
diff -C 2 -d -r1.260 -r1.261
*** cmMakefile.h	28 Sep 2009 15:42:47 -0000	1.260
--- cmMakefile.h	30 Sep 2009 17:45:14 -0000	1.261
***************
*** 589,592 ****
--- 589,595 ----
    bool IsSet(const char* name) const;
  
+   /** Return whether the target platform is 64-bit.  */
+   bool PlatformIs64Bit() const;
+ 
    /**
     * Get a list of preprocessor define flags.

Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.522
retrieving revision 1.523
diff -C 2 -d -r1.522 -r1.523
*** cmMakefile.cxx	28 Sep 2009 15:42:47 -0000	1.522
--- cmMakefile.cxx	30 Sep 2009 17:45:14 -0000	1.523
***************
*** 2051,2054 ****
--- 2051,2063 ----
  }
  
+ bool cmMakefile::PlatformIs64Bit() const
+ {
+   if(const char* sizeof_dptr = this->GetDefinition("CMAKE_SIZEOF_VOID_P"))
+     {
+     return atoi(sizeof_dptr) == 8;
+     }
+   return false;
+ }
+ 
  bool cmMakefile::CanIWriteThisFile(const char* fileName)
  {



More information about the Cmake-commits mailing list