Bläddra i källkod

STYLE: add documentation for CMAKE_FIND_ROOT_PATH

Alex
Alexander Neundorf 18 år sedan
förälder
incheckning
e737d7d07a
1 ändrade filer med 16 tillägg och 0 borttagningar
  1. 16 0
      Source/cmFindBase.cxx

+ 16 - 0
Source/cmFindBase.cxx

@@ -54,6 +54,8 @@ cmFindBase::cmFindBase()
     "             [NO_CMAKE_PATH]\n"
     "             [NO_SYSTEM_ENVIRONMENT_PATH]\n"
     "             [NO_CMAKE_SYSTEM_PATH]\n"
+    "             [CMAKE_FIND_ROOT_PATH_BOTH | ONLY_CMAKE_FIND_ROOT_PATH | "
+                                               "NO_CMAKE_FIND_ROOT_PATH ]\n"
     "            )\n"
     ""
     "This command is used to find a SEARCH_XXX_DESC. "
@@ -122,6 +124,20 @@ cmFindBase::cmFindBase()
     "              programs.\n"
     "   \"ONLY\"   - Only try to find application bundles.\n"
     "   \"NEVER\". - Never try to find application bundles.\n"
+    "\n"
+    "The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more "
+    "directories, which will be prefixed to all of the search directories. "
+    "By default it is empty. It is especially useful if you are "
+    "crosscompiling, then you can point it to the root directory of the "
+    "target environment and CMake will search there too. By default at first "
+    "the directories listed in CMAKE_FIND_ROOT_PATH and then the non-prefixed "
+    "directories will be searched."
+    "The default behaviour can be adjusted by setting "
+    "CMAKE_FIND_ROOT_PATH_MODE_XXX.  This behaviour can be manually "
+    "overwritten. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will "
+    "be as described above. If NO_CMAKE_FIND_ROOT_PATH is used "
+    "then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH "
+    "is used then only the prefixed directories will be searched.\n "
     "The reason the paths listed in the call to the command are searched "
     "last is that most users of CMake would expect things to be found "
     "first in the locations specified by their environment. Projects may "