diff options
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/list.rst | 73 | ||||
-rw-r--r-- | Help/manual/LINKS.txt | 10 | ||||
-rw-r--r-- | Help/manual/ccmake.1.rst | 2 | ||||
-rw-r--r-- | Help/manual/cmake-gui.1.rst | 2 | ||||
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 1 | ||||
-rw-r--r-- | Help/manual/cmake.1.rst | 4 | ||||
-rw-r--r-- | Help/manual/ctest.1.rst | 2 | ||||
-rw-r--r-- | Help/policy/CMP0075.rst | 26 | ||||
-rw-r--r-- | Help/release/dev/CheckIncludeFile-required-libs.rst | 14 | ||||
-rw-r--r-- | Help/release/dev/FindJPEG-imported-targets.rst | 4 | ||||
-rw-r--r-- | Help/release/dev/list-transform.rst | 5 | ||||
-rw-r--r-- | Help/variable/CMAKE_LANG_FLAGS.rst | 11 |
12 files changed, 142 insertions, 12 deletions
diff --git a/Help/command/list.rst b/Help/command/list.rst index 6218a2a..e240b65 100644 --- a/Help/command/list.rst +++ b/Help/command/list.rst @@ -151,6 +151,79 @@ REMOVE_DUPLICATES Removes duplicated items in the list. +TRANSFORM +""""""""" + +:: + + list(TRANSFORM <list> <ACTION> [<SELECTOR>] + [OUTPUT_VARIABLE <output variable>]) + +Transforms the list by applying an action to all or, by specifying a +``<SELECTOR>``, to the selected elements of the list, storing result in-place +or in the specified output variable. + +.. note:: + + ``TRANSFORM`` sub-command does not change the number of elements of the + list. If a ``<SELECTOR>`` is specified, only some elements will be changed, + the other ones will remain same as before the transformation. + +``<ACTION>`` specify the action to apply to the elements of list. +The actions have exactly the same semantics as sub-commands of +:command:`string` command. + +The ``<ACTION>`` may be one of: + +``APPEND``, ``PREPEND``: Append, prepend specified value to each element of +the list. :: + + list(TRANSFORM <list> <APPEND|PREPEND> <value> ...) + +``TOUPPER``, ``TOLOWER``: Convert each element of the list to upper, lower +characters. :: + + list(TRANSFORM <list> <TOLOWER|TOUPPER> ...) + +``STRIP``: Remove leading and trailing spaces from each element of the +list. :: + + list(TRANSFORM <list> STRIP ...) + +``GENEX_STRIP``: Strip any +:manual:`generator expressions <cmake-generator-expressions(7)>` from each +element of the list. :: + + list(TRANSFORM <list> GENEX_STRIP ...) + +``REPLACE``: Match the regular expression as many times as possible and +substitute the replacement expression for the match for each element +of the list +(Same semantic as ``REGEX REPLACE`` from :command:`string` command). :: + + list(TRANSFORM <list> REPLACE <regular_expression> + <replace_expression> ...) + +``<SELECTOR>`` select which elements of the list will be transformed. Only one +type of selector can be specified at a time. + +The ``<SELECTOR>`` may be one of: + +``AT``: Specify a list of indexes. :: + + list(TRANSFORM <list> <ACTION> AT <index> [<index> ...] ...) + +``FOR``: Specify a range with, optionaly, an increment used to iterate over +the range. :: + + list(TRANSFORM <list> <ACTION> FOR <start> <stop> [<step>] ...) + +``REGEX``: Specify a regular expression. Only elements matching the regular +expression will be transformed. :: + + list(TRANSFORM <list> <ACTION> REGEX <regular_expression> ...) + + Sorting ^^^^^^^ diff --git a/Help/manual/LINKS.txt b/Help/manual/LINKS.txt index 3993ff8..8e53c0c 100644 --- a/Help/manual/LINKS.txt +++ b/Help/manual/LINKS.txt @@ -5,15 +5,11 @@ Home Page The primary starting point for learning about CMake. -Frequently Asked Questions - https://cmake.org/Wiki/CMake_FAQ - - A Wiki is provided containing answers to frequently asked questions. - -Online Documentation +Online Documentation and Community Resources https://cmake.org/documentation - Links to available documentation may be found on this web page. + Links to available documentation and community resources may be + found on this web page. Mailing List https://cmake.org/mailing-lists diff --git a/Help/manual/ccmake.1.rst b/Help/manual/ccmake.1.rst index a5fe191..cc3ceec 100644 --- a/Help/manual/ccmake.1.rst +++ b/Help/manual/ccmake.1.rst @@ -8,7 +8,7 @@ Synopsis .. parsed-literal:: - ccmake [<options>] (<path-to-source> | <path-to-existing-build>) + ccmake [<options>] {<path-to-source> | <path-to-existing-build>} Description =========== diff --git a/Help/manual/cmake-gui.1.rst b/Help/manual/cmake-gui.1.rst index 032b51f..57a9850 100644 --- a/Help/manual/cmake-gui.1.rst +++ b/Help/manual/cmake-gui.1.rst @@ -9,7 +9,7 @@ Synopsis .. parsed-literal:: cmake-gui [<options>] - cmake-gui [<options>] (<path-to-source> | <path-to-existing-build>) + cmake-gui [<options>] {<path-to-source> | <path-to-existing-build>} Description =========== diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 7e2255d..631f75b 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,6 +57,7 @@ Policies Introduced by CMake 3.12 .. toctree:: :maxdepth: 1 + CMP0075: Include file check macros honor CMAKE_REQUIRED_LIBRARIES. </policy/CMP0075> CMP0074: find_package uses PackageName_ROOT variables. </policy/CMP0074> CMP0073: Do not produce legacy _LIB_DEPENDS cache entries. </policy/CMP0073> diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index c2e6435..577d321 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -8,8 +8,8 @@ Synopsis .. parsed-literal:: - cmake [<options>] (<path-to-source> | <path-to-existing-build>) - cmake [(-D <var>=<value>)...] -P <cmake-script-file> + cmake [<options>] {<path-to-source> | <path-to-existing-build>} + cmake [{-D <var>=<value>}...] -P <cmake-script-file> cmake --build <dir> [<options>...] [-- <build-tool-options>...] cmake --open <dir> cmake -E <command> [<options>...] diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 75af22e..9553d15 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -13,7 +13,7 @@ Synopsis ctest [<options>] ctest <path-to-source> <path-to-build> --build-generator <generator> [<options>...] [-- <build-options>...] [--test-command <test>] - ctest (-D <dashboard> | -M <model> -T <action> | -S <script> | -SP <script>) + ctest {-D <dashboard> | -M <model> -T <action> | -S <script> | -SP <script>} [-- <dashboard-options>...] Description diff --git a/Help/policy/CMP0075.rst b/Help/policy/CMP0075.rst new file mode 100644 index 0000000..aa5c3f7 --- /dev/null +++ b/Help/policy/CMP0075.rst @@ -0,0 +1,26 @@ +CMP0075 +------- + +Include file check macros honor ``CMAKE_REQUIRED_LIBRARIES``. + +In CMake 3.12 and above, the + +* ``check_include_file`` macro in the :module:`CheckIncludeFile` module, the +* ``check_include_file_cxx`` macro in the + :module:`CheckIncludeFileCXX` module, and the +* ``check_include_files`` macro in the :module:`CheckIncludeFiles` module + +now prefer to link the check executable to the libraries listed in the +``CMAKE_REQUIRED_LIBRARIES`` variable. This policy provides compatibility +with projects that have not been updated to expect this behavior. + +The ``OLD`` behavior for this policy is to ignore ``CMAKE_REQUIRED_LIBRARIES`` +in the include file check macros. The ``NEW`` behavior of this policy is to +honor ``CMAKE_REQUIRED_LIBRARIES`` in the include file check macros. + +This policy was introduced in CMake version 3.12. CMake version +|release| warns when the policy is not set and uses ``OLD`` behavior. +Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` +explicitly. + +.. include:: DEPRECATED.txt diff --git a/Help/release/dev/CheckIncludeFile-required-libs.rst b/Help/release/dev/CheckIncludeFile-required-libs.rst new file mode 100644 index 0000000..6fb5c40 --- /dev/null +++ b/Help/release/dev/CheckIncludeFile-required-libs.rst @@ -0,0 +1,14 @@ +CheckIncludeFile-required-libs +------------------------------ + +* The :module:`CheckIncludeFile` module ``check_include_file`` macro + learned to honor the ``CMAKE_REQUIRED_LIBRARIES`` variable. + See policy :policy:`CMP0075`. + +* The :module:`CheckIncludeFileCXX` module ``check_include_file_cxx`` macro + learned to honor the ``CMAKE_REQUIRED_LIBRARIES`` variable. + See policy :policy:`CMP0075`. + +* The :module:`CheckIncludeFiles` module ``check_include_files`` macro + learned to honor the ``CMAKE_REQUIRED_LIBRARIES`` variable. + See policy :policy:`CMP0075`. diff --git a/Help/release/dev/FindJPEG-imported-targets.rst b/Help/release/dev/FindJPEG-imported-targets.rst new file mode 100644 index 0000000..32cf2f6 --- /dev/null +++ b/Help/release/dev/FindJPEG-imported-targets.rst @@ -0,0 +1,4 @@ +FindJPEG-imported-targets +------------------------- + +* The :module:`FindJPEG` module now provides imported targets. diff --git a/Help/release/dev/list-transform.rst b/Help/release/dev/list-transform.rst new file mode 100644 index 0000000..4a6dacc --- /dev/null +++ b/Help/release/dev/list-transform.rst @@ -0,0 +1,5 @@ +list-transform +-------------- + +* The :command:`list` command learned a ``TRANSFORM`` sub-command + to apply various string transformation to list's elements. diff --git a/Help/variable/CMAKE_LANG_FLAGS.rst b/Help/variable/CMAKE_LANG_FLAGS.rst index c57d92c..14b2694 100644 --- a/Help/variable/CMAKE_LANG_FLAGS.rst +++ b/Help/variable/CMAKE_LANG_FLAGS.rst @@ -4,3 +4,14 @@ CMAKE_<LANG>_FLAGS Flags for all build types. ``<LANG>`` flags used regardless of the value of :variable:`CMAKE_BUILD_TYPE`. + +This is initialized for each language from environment variables: + +* ``CMAKE_C_FLAGS``: + Initialized by the :envvar:`CFLAGS` environment variable. +* ``CMAKE_CXX_FLAGS``: + Initialized by the :envvar:`CXXFLAGS` environment variable. +* ``CMAKE_CUDA_FLAGS``: + Initialized by the :envvar:`CUDAFLAGS` environment variable. +* ``CMAKE_Fortran_FLAGS``: + Initialized by the :envvar:`FFLAGS` environment variable. |