[Cmake-commits] [cmake-commits] king committed cmFindBase.cxx 1.48 1.49

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Jun 10 13:22:26 EDT 2008


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

Modified Files:
	cmFindBase.cxx 
Log Message:
BUG: In find_* commands support NO_* options in short-hand

  - The short-hand forms do not document the NO_* options.
  - CMake 2.4 and 2.6.0 accepted them accidentally, but also
    treated the options as paths.
  - Now the options are accepted but do not become paths.


Index: cmFindBase.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindBase.cxx,v
retrieving revision 1.48
retrieving revision 1.49
diff -C 2 -d -r1.48 -r1.49
*** cmFindBase.cxx	9 Jun 2008 19:22:09 -0000	1.48
--- cmFindBase.cxx	10 Jun 2008 17:22:18 -0000	1.49
***************
*** 201,205 ****
        doing = DoingNone;
        compatibility = false;
!       newStyle = true;
        }
      else if(doing == DoingNames)
--- 201,207 ----
        doing = DoingNone;
        compatibility = false;
!       // Some common arguments were accidentally supported by CMake
!       // 2.4 and 2.6.0 in the short-hand form of the command, so we
!       // must support it even though it is not documented.
        }
      else if(doing == DoingNames)
***************
*** 260,268 ****
    if(!newStyle)
      {
      this->Names.clear(); // clear out any values in Names
!     this->Names.push_back(args[1]);
!     for(unsigned int j = 2; j < args.size(); ++j)
        {
!       this->AddUserPath(args[j], this->UserPaths);
        }
      }
--- 262,272 ----
    if(!newStyle)
      {
+     // All the short-hand arguments have been recorded as names.
+     std::vector<std::string> shortArgs = this->Names;
      this->Names.clear(); // clear out any values in Names
!     this->Names.push_back(shortArgs[0]);
!     for(unsigned int j = 1; j < shortArgs.size(); ++j)
        {
!       this->AddUserPath(shortArgs[j], this->UserPaths);
        }
      }



More information about the Cmake-commits mailing list