diff options
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/export.rst | 15 | ||||
-rw-r--r-- | Help/command/file.rst | 6 | ||||
-rw-r--r-- | Help/command/find_package.rst | 18 | ||||
-rw-r--r-- | Help/command/include.rst | 6 | ||||
-rw-r--r-- | Help/command/install.rst | 14 | ||||
-rw-r--r-- | Help/command/separate_arguments.rst | 12 | ||||
-rw-r--r-- | Help/command/string.rst | 2 |
7 files changed, 59 insertions, 14 deletions
diff --git a/Help/command/export.rst b/Help/command/export.rst index 4419dc1..53675a7 100644 --- a/Help/command/export.rst +++ b/Help/command/export.rst @@ -55,3 +55,18 @@ build tree. In some cases, for example for packaging and for system wide installations, it is not desirable to write the user package registry. If the :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable is enabled, the ``export(PACKAGE)`` command will do nothing. + +:: + + export(TARGETS [target1 [target2 [...]]] [ANDROID_MK <filename>]) + +This signature exports cmake built targets to the android ndk build system +by creating an Android.mk file that references the prebuilt targets. The +Android NDK supports the use of prebuilt libraries, both static and shared. +This allows cmake to build the libraries of a project and make them available +to an ndk build system complete with transitive dependencies, include flags +and defines required to use the libraries. The signature takes a list of +targets and puts them in the Android.mk file specified by the ``<filename>`` +given. This signature can only be used if policy CMP0022 is NEW for all +targets given. A error will be issued if that policy is set to OLD for one +of the targets. diff --git a/Help/command/file.rst b/Help/command/file.rst index 256d16d..77e9f62 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -222,6 +222,12 @@ Options to both ``DOWNLOAD`` and ``UPLOAD`` are: ``TIMEOUT <seconds>`` Terminate the operation after a given total time has elapsed. +``USERPWD <username>:<password>`` + Set username and password for operation. + +``HTTPHEADER <HTTP-header>`` + HTTP header for operation. Suboption can be repeated several times. + Additional options to ``DOWNLOAD`` are: ``EXPECTED_HASH ALGO=<value>`` diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst index c44fe86..2cb1e5f 100644 --- a/Help/command/find_package.rst +++ b/Help/command/find_package.rst @@ -170,11 +170,21 @@ is acceptable the following variables are set: ``<package>_VERSION_COUNT`` number of version components, 0 to 4 -and the corresponding package configuration file is loaded. When -multiple package configuration files are available whose version files +and the corresponding package configuration file is loaded. +When multiple package configuration files are available whose version files claim compatibility with the version requested it is unspecified which -one is chosen. No attempt is made to choose a highest or closest -version number. +one is chosen: unless the variable :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` +is set no attempt is made to choose a highest or closest version number. + +To control the order in which ``find_package`` checks for compatibiliy use +the two variables :variable:`CMAKE_FIND_PACKAGE_SORT_ORDER` and +:variable:`CMAKE_FIND_PACKAGE_SORT_DIRECTION`. +For instance in order to select the highest version one can set:: + + SET(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL) + SET(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC) + +before calling ``find_package``. Config mode provides an elaborate interface and search procedure. Much of the interface is provided for completeness and for use diff --git a/Help/command/include.rst b/Help/command/include.rst index c391561..eeca4c6 100644 --- a/Help/command/include.rst +++ b/Help/command/include.rst @@ -15,10 +15,10 @@ is present, then no error is raised if the file does not exist. If which has been included or NOTFOUND if it failed. If a module is specified instead of a file, the file with name -<modulename>.cmake is searched first in :variable:`CMAKE_MODULE_PATH`, +``<modulename>.cmake`` is searched first in :variable:`CMAKE_MODULE_PATH`, then in the CMake module directory. There is one exception to this: if -the file which calls ``include()`` is located itself in the CMake module -directory, then first the CMake module directory is searched and +the file which calls ``include()`` is located itself in the CMake builtin +module directory, then first the CMake builtin module directory is searched and :variable:`CMAKE_MODULE_PATH` afterwards. See also policy :policy:`CMP0017`. See the :command:`cmake_policy` command documentation for discussion of the diff --git a/Help/command/install.rst b/Help/command/install.rst index aaf12cc..d57dd75 100644 --- a/Help/command/install.rst +++ b/Help/command/install.rst @@ -314,7 +314,8 @@ Installing Exports :: install(EXPORT <export-name> DESTINATION <dir> - [NAMESPACE <namespace>] [FILE <name>.cmake] + [NAMESPACE <namespace>] [[FILE <name>.cmake]| + [EXPORT_ANDROID_MK <name>.mk]] [PERMISSIONS permissions...] [CONFIGURATIONS [Debug|Release|...]] [EXPORT_LINK_INTERFACE_LIBRARIES] @@ -342,6 +343,13 @@ specified that does not match that given to the targets associated with included in the export but a target to which it links is not included the behavior is unspecified. +In additon to cmake language files, the ``EXPORT_ANDROID_MK`` option maybe +used to specifiy an export to the android ndk build system. The Android +NDK supports the use of prebuilt libraries, both static and shared. This +allows cmake to build the libraries of a project and make them available +to an ndk build system complete with transitive dependencies, include flags +and defines required to use the libraries. + The ``EXPORT`` form is useful to help outside projects use targets built and installed by the current project. For example, the code @@ -349,9 +357,11 @@ and installed by the current project. For example, the code install(TARGETS myexe EXPORT myproj DESTINATION bin) install(EXPORT myproj NAMESPACE mp_ DESTINATION lib/myproj) + install(EXPORT_ANDROID_MK myexp DESTINATION share/ndk-modules) will install the executable myexe to ``<prefix>/bin`` and code to import -it in the file ``<prefix>/lib/myproj/myproj.cmake``. An outside project +it in the file ``<prefix>/lib/myproj/myproj.cmake`` and +``<prefix>/lib/share/ndk-modules/Android.mk``. An outside project may load this file with the include command and reference the ``myexe`` executable from the installation tree using the imported target name ``mp_myexe`` as if the target were built in its own tree. diff --git a/Help/command/separate_arguments.rst b/Help/command/separate_arguments.rst index 0e3e5a5..1fd3cd1 100644 --- a/Help/command/separate_arguments.rst +++ b/Help/command/separate_arguments.rst @@ -13,19 +13,21 @@ entire command line must be given in one "<args>" argument. The ``UNIX_COMMAND`` mode separates arguments by unquoted whitespace. It recognizes both single-quote and double-quote pairs. A backslash -escapes the next literal character (\" is "); there are no special -escapes (\n is just n). +escapes the next literal character (``\"`` is ``"``); there are no special +escapes (``\n`` is just ``n``). The ``WINDOWS_COMMAND`` mode parses a windows command-line using the same syntax the runtime library uses to construct argv at startup. It separates arguments by whitespace that is not double-quoted. Backslashes are literal unless they precede double-quotes. See the -MSDN article "Parsing C Command-Line Arguments" for details. +MSDN article `Parsing C Command-Line Arguments`_ for details. + +.. _`Parsing C Command-Line Arguments`: https://msdn.microsoft.com/library/a1y7w461.aspx :: - separate_arguments(VARIABLE) + separate_arguments(<var>) -Convert the value of ``VARIABLE`` to a semi-colon separated list. All +Convert the value of ``<var>`` to a semi-colon separated list. All spaces are replaced with ';'. This helps with generating command lines. diff --git a/Help/command/string.rst b/Help/command/string.rst index 19a095a..8028333 100644 --- a/Help/command/string.rst +++ b/Help/command/string.rst @@ -278,12 +278,14 @@ specifiers: %I The hour on a 12-hour clock (01-12). %j The day of the current year (001-366). %m The month of the current year (01-12). + %b Abbreviated month name (e.g. Oct). %M The minute of the current hour (00-59). %s Seconds since midnight (UTC) 1-Jan-1970 (UNIX time). %S The second of the current minute. 60 represents a leap second. (00-60) %U The week number of the current year (00-53). %w The day of the current week. 0 is Sunday. (0-6) + %a Abbreviated weekday name (e.g. Fri). %y The last two digits of the current year (00-99) %Y The current year. |