[Cmake-commits] [cmake-commits] king committed cmFindBase.cxx 1.47 1.48 cmFindPackageCommand.cxx 1.39 1.40

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jun 9 15:22:11 EDT 2008


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

Modified Files:
	cmFindBase.cxx cmFindPackageCommand.cxx 
Log Message:
ENH: Make find_* command search order more intuitive.

  - The CMAKE_PREFIX_PATH and similar variables have both
    environment and CMake cache versions.
  - Previously the environment value was checked before the
    cache value.
  - Now the cache value is favored because it is more specific.


Index: cmFindBase.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindBase.cxx,v
retrieving revision 1.47
retrieving revision 1.48
diff -C 2 -d -r1.47 -r1.48
*** cmFindBase.cxx	9 Jun 2008 19:08:58 -0000	1.47
--- cmFindBase.cxx	9 Jun 2008 19:22:09 -0000	1.48
***************
*** 67,82 ****
      "added to the search. "
      "If NO_DEFAULT_PATH is not specified, the search process is as follows:\n"
!     "1. Search cmake specific environment variables.  This "
!     "can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n"
!     ""
      "   <prefix>/XXX_SUBDIR for each <prefix> in CMAKE_PREFIX_PATH\n"
      "   CMAKE_XXX_PATH\n"
      "   CMAKE_XXX_MAC_PATH\n"
!     "2. Search cmake variables with the same names as "
!     "the cmake specific environment variables.  These "
!     "are intended to be used on the command line with a "
!     "-DVAR=value.  This can be skipped if NO_CMAKE_PATH "
!     "is passed.\n"
!     ""
      "   <prefix>/XXX_SUBDIR for each <prefix> in CMAKE_PREFIX_PATH\n"
      "   CMAKE_XXX_PATH\n"
--- 67,79 ----
      "added to the search. "
      "If NO_DEFAULT_PATH is not specified, the search process is as follows:\n"
!     "1. Search paths specified in cmake-specific cache variables.  "
!     "These are intended to be used on the command line with a -DVAR=value.  "
!     "This can be skipped if NO_CMAKE_PATH is passed.\n"
      "   <prefix>/XXX_SUBDIR for each <prefix> in CMAKE_PREFIX_PATH\n"
      "   CMAKE_XXX_PATH\n"
      "   CMAKE_XXX_MAC_PATH\n"
!     "2. Search paths specified in cmake-specific environment variables.  "
!     "These are intended to be set in the user's shell configuration.  "
!     "This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n"
      "   <prefix>/XXX_SUBDIR for each <prefix> in CMAKE_PREFIX_PATH\n"
      "   CMAKE_XXX_PATH\n"
***************
*** 283,288 ****
  void cmFindBase::ExpandPaths()
  {
-   this->AddCMakeEnvironmentPath();
    this->AddCMakeVariablePath();
    this->AddUserHintsPath();
    this->AddSystemEnvironmentPath();
--- 280,285 ----
  void cmFindBase::ExpandPaths()
  {
    this->AddCMakeVariablePath();
+   this->AddCMakeEnvironmentPath();
    this->AddUserHintsPath();
    this->AddSystemEnvironmentPath();

Index: cmFindPackageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v
retrieving revision 1.39
retrieving revision 1.40
diff -C 2 -d -r1.39 -r1.40
*** cmFindPackageCommand.cxx	9 Jun 2008 19:08:59 -0000	1.39
--- cmFindPackageCommand.cxx	9 Jun 2008 19:22:09 -0000	1.40
***************
*** 240,253 ****
      "as specified below.\n"
      "The set of installation prefixes is constructed using the following "
!     "steps.  If NO_DEFAULT_PATH is specified steps 1-5 are skipped.\n"
!     "1. Search cmake specific environment variables.  This "
!     "can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n"
      "   CMAKE_PREFIX_PATH\n"
      "   CMAKE_FRAMEWORK_PATH\n"
      "   CMAKE_APPBUNDLE_PATH\n"
!     "2. Search cmake variables with the same names as the cmake specific "
!     "environment variables.  These are intended to be used on the command "
!     "line with a -DVAR=value.  This can be skipped if NO_CMAKE_PATH "
!     "is passed.\n"
      "   CMAKE_PREFIX_PATH\n"
      "   CMAKE_FRAMEWORK_PATH\n"
--- 240,253 ----
      "as specified below.\n"
      "The set of installation prefixes is constructed using the following "
!     "steps.  If NO_DEFAULT_PATH is specified all NO_* options are enabled.\n"
!     "1. Search paths specified in cmake-specific cache variables.  "
!     "These are intended to be used on the command line with a -DVAR=value.  "
!     "This can be skipped if NO_CMAKE_PATH is passed.\n"
      "   CMAKE_PREFIX_PATH\n"
      "   CMAKE_FRAMEWORK_PATH\n"
      "   CMAKE_APPBUNDLE_PATH\n"
!     "2. Search paths specified in cmake-specific environment variables.  "
!     "These are intended to be set in the user's shell configuration.  "
!     "This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n"
      "   CMAKE_PREFIX_PATH\n"
      "   CMAKE_FRAMEWORK_PATH\n"
***************
*** 961,966 ****
  void cmFindPackageCommand::ComputePrefixes()
  {
-   this->AddPrefixesCMakeEnvironment();
    this->AddPrefixesCMakeVariable();
    this->AddPrefixesUserHints();
    this->AddPrefixesSystemEnvironment();
--- 961,966 ----
  void cmFindPackageCommand::ComputePrefixes()
  {
    this->AddPrefixesCMakeVariable();
+   this->AddPrefixesCMakeEnvironment();
    this->AddPrefixesUserHints();
    this->AddPrefixesSystemEnvironment();



More information about the Cmake-commits mailing list