[Cmake-commits] [cmake-commits] king committed cmFindPackageCommand.cxx 1.56 1.57

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Jan 22 10:57:00 EST 2009


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

Modified Files:
	cmFindPackageCommand.cxx 
Log Message:
ENH: Refactor find_package version file scoping

This converts the variable and policy scope protection find_package()
uses when loading version files to use automatic variables.


Index: cmFindPackageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v
retrieving revision 1.56
retrieving revision 1.57
diff -C 2 -d -r1.56 -r1.57
*** cmFindPackageCommand.cxx	15 Jan 2009 21:16:19 -0000	1.56
--- cmFindPackageCommand.cxx	22 Jan 2009 15:56:58 -0000	1.57
***************
*** 1278,1283 ****
  {
    // The version file will be loaded in an isolated scope.
!   this->Makefile->PushScope();
!   this->Makefile->PushPolicy();
  
    // Clear the output variables.
--- 1278,1285 ----
  {
    // The version file will be loaded in an isolated scope.
!   cmMakefile::ScopePushPop varScope(this->Makefile);
!   cmMakefile::PolicyPushPop polScope(this->Makefile);
!   static_cast<void>(varScope);
!   static_cast<void>(polScope);
  
    // Clear the output variables.
***************
*** 1345,1352 ****
      }
  
-   // Restore the original scope.
-   this->Makefile->PopPolicy();
-   this->Makefile->PopScope();
- 
    // Succeed if the version is suitable.
    return suitable;
--- 1347,1350 ----



More information about the Cmake-commits mailing list