New upstream version 3.27.0~rc5
This commit is contained in:
		
							parent
							
								
									6de3bd6333
								
							
						
					
					
						commit
						1101acd15c
					
				@ -197,6 +197,10 @@ syn keyword cmakeProperty contained
 | 
			
		||||
            \ HAS_CXX
 | 
			
		||||
            \ HEADER_FILE_ONLY
 | 
			
		||||
            \ HELPSTRING
 | 
			
		||||
            \ HIP_ARCHITECTURES
 | 
			
		||||
            \ HIP_EXTENSIONS
 | 
			
		||||
            \ HIP_STANDARD
 | 
			
		||||
            \ HIP_STANDARD_REQUIRED
 | 
			
		||||
            \ IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
 | 
			
		||||
            \ IMPORTED
 | 
			
		||||
            \ IMPORTED_COMMON_LANGUAGE_RUNTIME
 | 
			
		||||
@ -1150,6 +1154,74 @@ syn keyword cmakeVariable contained
 | 
			
		||||
            \ CMAKE_GLOBAL_AUTORCC_TARGET
 | 
			
		||||
            \ CMAKE_GLOBAL_AUTORCC_TARGET_NAME
 | 
			
		||||
            \ CMAKE_GNUtoMS
 | 
			
		||||
            \ CMAKE_HIP
 | 
			
		||||
            \ CMAKE_HIP_ANDROID_TOOLCHAIN_MACHINE
 | 
			
		||||
            \ CMAKE_HIP_ANDROID_TOOLCHAIN_PREFIX
 | 
			
		||||
            \ CMAKE_HIP_ANDROID_TOOLCHAIN_SUFFIX
 | 
			
		||||
            \ CMAKE_HIP_ARCHITECTURES
 | 
			
		||||
            \ CMAKE_HIP_ARCHIVE_APPEND
 | 
			
		||||
            \ CMAKE_HIP_ARCHIVE_CREATE
 | 
			
		||||
            \ CMAKE_HIP_ARCHIVE_FINISH
 | 
			
		||||
            \ CMAKE_HIP_CLANG_TIDY
 | 
			
		||||
            \ CMAKE_HIP_COMPILER
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_ABI
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_AR
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_ARCHITECTURE_ID
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_EXTERNAL_TOOLCHAIN
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_ID
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_LAUNCHER
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_LOADED
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_PREDEFINES_COMMAND
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_RANLIB
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_TARGET
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_VERSION
 | 
			
		||||
            \ CMAKE_HIP_COMPILER_VERSION_INTERNAL
 | 
			
		||||
            \ CMAKE_HIP_COMPILE_FEATURES
 | 
			
		||||
            \ CMAKE_HIP_COMPILE_OBJECT
 | 
			
		||||
            \ CMAKE_HIP_CPPCHECK
 | 
			
		||||
            \ CMAKE_HIP_CPPLINT
 | 
			
		||||
            \ CMAKE_HIP_CREATE_SHARED_LIBRARY
 | 
			
		||||
            \ CMAKE_HIP_CREATE_SHARED_MODULE
 | 
			
		||||
            \ CMAKE_HIP_CREATE_STATIC_LIBRARY
 | 
			
		||||
            \ CMAKE_HIP_EXTENSIONS
 | 
			
		||||
            \ CMAKE_HIP_FLAGS
 | 
			
		||||
            \ CMAKE_HIP_FLAGS_DEBUG
 | 
			
		||||
            \ CMAKE_HIP_FLAGS_DEBUG_INIT
 | 
			
		||||
            \ CMAKE_HIP_FLAGS_INIT
 | 
			
		||||
            \ CMAKE_HIP_FLAGS_MINSIZEREL
 | 
			
		||||
            \ CMAKE_HIP_FLAGS_MINSIZEREL_INIT
 | 
			
		||||
            \ CMAKE_HIP_FLAGS_RELEASE
 | 
			
		||||
            \ CMAKE_HIP_FLAGS_RELEASE_INIT
 | 
			
		||||
            \ CMAKE_HIP_FLAGS_RELWITHDEBINFO
 | 
			
		||||
            \ CMAKE_HIP_FLAGS_RELWITHDEBINFO_INIT
 | 
			
		||||
            \ CMAKE_HIP_IGNORE_EXTENSIONS
 | 
			
		||||
            \ CMAKE_HIP_IMPLICIT_INCLUDE_DIRECTORIES
 | 
			
		||||
            \ CMAKE_HIP_IMPLICIT_LINK_DIRECTORIES
 | 
			
		||||
            \ CMAKE_HIP_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
 | 
			
		||||
            \ CMAKE_HIP_IMPLICIT_LINK_LIBRARIES
 | 
			
		||||
            \ CMAKE_HIP_INCLUDE_WHAT_YOU_USE
 | 
			
		||||
            \ CMAKE_HIP_INIT
 | 
			
		||||
            \ CMAKE_HIP_LIBRARY_ARCHITECTURE
 | 
			
		||||
            \ CMAKE_HIP_LINKER_LAUNCHER
 | 
			
		||||
            \ CMAKE_HIP_LINKER_PREFERENCE
 | 
			
		||||
            \ CMAKE_HIP_LINKER_PREFERENCE_PROPAGATES
 | 
			
		||||
            \ CMAKE_HIP_LINKER_WRAPPER_FLAG
 | 
			
		||||
            \ CMAKE_HIP_LINKER_WRAPPER_FLAG_SEP
 | 
			
		||||
            \ CMAKE_HIP_LINK_EXECUTABLE
 | 
			
		||||
            \ CMAKE_HIP_LINK_LIBRARY_FILE_FLAG
 | 
			
		||||
            \ CMAKE_HIP_LINK_LIBRARY_FLAG
 | 
			
		||||
            \ CMAKE_HIP_LINK_LIBRARY_SUFFIX
 | 
			
		||||
            \ CMAKE_HIP_OUTPUT_EXTENSION
 | 
			
		||||
            \ CMAKE_HIP_PLATFORM_ID
 | 
			
		||||
            \ CMAKE_HIP_SIMULATE_ID
 | 
			
		||||
            \ CMAKE_HIP_SIMULATE_VERSION
 | 
			
		||||
            \ CMAKE_HIP_SIZEOF_DATA_PTR
 | 
			
		||||
            \ CMAKE_HIP_SOURCE_FILE_EXTENSIONS
 | 
			
		||||
            \ CMAKE_HIP_STANDARD
 | 
			
		||||
            \ CMAKE_HIP_STANDARD_INCLUDE_DIRECTORIES
 | 
			
		||||
            \ CMAKE_HIP_STANDARD_LIBRARIES
 | 
			
		||||
            \ CMAKE_HIP_STANDARD_REQUIRED
 | 
			
		||||
            \ CMAKE_HIP_VISIBILITY_PRESET
 | 
			
		||||
            \ CMAKE_HOME_DIRECTORY
 | 
			
		||||
            \ CMAKE_HOST_APPLE
 | 
			
		||||
            \ CMAKE_HOST_SOLARIS
 | 
			
		||||
@ -1502,6 +1574,7 @@ syn keyword cmakeVariable contained
 | 
			
		||||
            \ CMAKE_USER_MAKE_RULES_OVERRIDE_CUDA
 | 
			
		||||
            \ CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
 | 
			
		||||
            \ CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran
 | 
			
		||||
            \ CMAKE_USER_MAKE_RULES_OVERRIDE_HIP
 | 
			
		||||
            \ CMAKE_USER_MAKE_RULES_OVERRIDE_Java
 | 
			
		||||
            \ CMAKE_USER_MAKE_RULES_OVERRIDE_RC
 | 
			
		||||
            \ CMAKE_USER_MAKE_RULES_OVERRIDE_Swift
 | 
			
		||||
@ -2575,6 +2648,7 @@ syn keyword cmakeKWdoxygen_add_docs contained
 | 
			
		||||
syn keyword cmakeKWenable_language contained
 | 
			
		||||
            \ ASM
 | 
			
		||||
            \ CUDA
 | 
			
		||||
            \ HIP
 | 
			
		||||
            \ ISPC
 | 
			
		||||
            \ OBJC
 | 
			
		||||
            \ OBJCXX
 | 
			
		||||
@ -3317,6 +3391,7 @@ syn keyword cmakeKWproject contained
 | 
			
		||||
            \ CMAKE_PROJECT_
 | 
			
		||||
            \ CUDA
 | 
			
		||||
            \ DESCRIPTION
 | 
			
		||||
            \ HIP
 | 
			
		||||
            \ HOMEPAGE_URL
 | 
			
		||||
            \ ISPC
 | 
			
		||||
            \ LANGUAGES
 | 
			
		||||
@ -3630,6 +3705,9 @@ syn keyword cmakeKWtry_compile contained
 | 
			
		||||
            \ EXECUTABLE
 | 
			
		||||
            \ FALSE
 | 
			
		||||
            \ GHS
 | 
			
		||||
            \ HIP_EXTENSIONS
 | 
			
		||||
            \ HIP_STANDARD
 | 
			
		||||
            \ HIP_STANDARD_REQUIRED
 | 
			
		||||
            \ INCLUDE_DIRECTORIES
 | 
			
		||||
            \ LANG
 | 
			
		||||
            \ LINK_DIRECTORIES
 | 
			
		||||
@ -3749,6 +3827,9 @@ syn keyword cmakeGeneratorExpressions contained
 | 
			
		||||
            \ GENERATE
 | 
			
		||||
            \ GENEX_EVAL
 | 
			
		||||
            \ GNU
 | 
			
		||||
            \ HIP_COMPILER_ID
 | 
			
		||||
            \ HIP_COMPILER_VERSION
 | 
			
		||||
            \ HIP_STANDARD
 | 
			
		||||
            \ HOST_LINK
 | 
			
		||||
            \ IF
 | 
			
		||||
            \ IGNORE
 | 
			
		||||
 | 
			
		||||
@ -333,6 +333,15 @@ Most of the expressions in this section are closely associated with the
 | 
			
		||||
:command:`list` command, providing the same capabilities, but in
 | 
			
		||||
the form of a generator expression.
 | 
			
		||||
 | 
			
		||||
In each of the following list-related generator expressions, the ``list``
 | 
			
		||||
must not contain any commas if that generator expression expects something to
 | 
			
		||||
be provided after the ``list``.  For example, the expression
 | 
			
		||||
``$<LIST:FIND,list,value>`` requires a ``value`` after the ``list``.
 | 
			
		||||
Since a comma is used to separate the ``list`` and the ``value``, the ``list``
 | 
			
		||||
cannot itself contain a comma.  This restriction does not apply to the
 | 
			
		||||
:command:`list` command, it is specific to the list-handling generator
 | 
			
		||||
expressions only.
 | 
			
		||||
 | 
			
		||||
.. _GenEx List Comparisons:
 | 
			
		||||
 | 
			
		||||
List Comparisons
 | 
			
		||||
@ -354,133 +363,151 @@ List Queries
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns the list's length.
 | 
			
		||||
  The number of items in the ``list``.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:GET,list,index,...>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns the list of elements specified by indices from the list.
 | 
			
		||||
  Expands to the list of items specified by indices from the ``list``.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:SUBLIST,list,begin,length>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns a sublist of the given list. If <length> is 0, an empty list will be
 | 
			
		||||
  returned. If <length> is -1 or the list is smaller than <begin>+<length> then
 | 
			
		||||
  the remaining elements of the list starting at <begin> will be returned.
 | 
			
		||||
  A sublist of the given ``list``.  If ``length`` is 0, an empty list
 | 
			
		||||
  will be returned.  If ``length`` is -1 or the list is smaller than
 | 
			
		||||
  ``begin + length``, the remaining items of the list starting at
 | 
			
		||||
  ``begin`` will be returned.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:FIND,list,value>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns the index of the element specified in the list or -1 if it wasn't
 | 
			
		||||
  found.
 | 
			
		||||
  The index of the first item in ``list`` with the specified ``value``,
 | 
			
		||||
  or -1 if ``value`` is not in the ``list``.
 | 
			
		||||
 | 
			
		||||
.. _GenEx List Transformations:
 | 
			
		||||
 | 
			
		||||
List Transformations
 | 
			
		||||
^^^^^^^^^^^^^^^^^^^^
 | 
			
		||||
 | 
			
		||||
.. _GenEx LIST-JOIN:
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:JOIN,list,glue>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns a string which joins the list with the content of the ``glue`` string
 | 
			
		||||
  inserted between each item.
 | 
			
		||||
  Converts ``list`` to a single string with the content of the ``glue`` string
 | 
			
		||||
  inserted between each item.  This is conceptually the same operation as
 | 
			
		||||
  :genex:`$<JOIN:list,glue>`, but the two have different behavior with regard
 | 
			
		||||
  to empty items.  ``$<LIST:JOIN,list,glue>`` preserves all empty items,
 | 
			
		||||
  whereas :genex:`$<JOIN:list,glue>` drops all empty items from the list.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:APPEND,list,element,...>
 | 
			
		||||
.. genex:: $<LIST:APPEND,list,item,...>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns a list with the elements appended.
 | 
			
		||||
  The ``list`` with each ``item`` appended.  Multiple items should be
 | 
			
		||||
  separated by commas.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:PREPEND,list,element,...>
 | 
			
		||||
.. genex:: $<LIST:PREPEND,list,item,...>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns a list with the elements inserted at the beginning of the list.
 | 
			
		||||
  The ``list`` with each ``item`` inserted at the beginning.  If there are
 | 
			
		||||
  multiple items, they should be separated by commas, and the order of the
 | 
			
		||||
  prepended items will be preserved.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:INSERT,list,index,element,...>
 | 
			
		||||
.. genex:: $<LIST:INSERT,list,index,item,...>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns a list with the elements inserted at the specified index. It is an
 | 
			
		||||
  error to specify an out-of-range index. Valid indexes are 0 to N where N is
 | 
			
		||||
  the length of the list, inclusive. An empty list has length 0.
 | 
			
		||||
  The ``list`` with the ``item`` (or multiple items) inserted at the specified
 | 
			
		||||
  ``index``.  Multiple items should be separated by commas.
 | 
			
		||||
 | 
			
		||||
  It is an error to specify an out-of-range ``index``. Valid indexes are 0 to N,
 | 
			
		||||
  where N is the length of the list, inclusive. An empty list has length 0.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:POP_BACK,list>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns a list with the last element was removed.
 | 
			
		||||
  The ``list`` with the last item removed.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:POP_FRONT,list>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns a list with the first element was removed.
 | 
			
		||||
  The ``list`` with the first item removed.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:REMOVE_ITEM,list,value,...>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns a list with all instances of the given values were removed.
 | 
			
		||||
  The ``list`` with all instances of the given ``value`` (or values) removed.
 | 
			
		||||
  If multiple values are given, they should be separated by commas.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:REMOVE_AT,list,index,...>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns a list with all values at given indices were removed.
 | 
			
		||||
  The ``list`` with the item at each given ``index`` removed.
 | 
			
		||||
 | 
			
		||||
.. _GenEx LIST-REMOVE_DUPLICATES:
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:REMOVE_DUPLICATES,list>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns a list where duplicated items were removed. The relative order of
 | 
			
		||||
  The ``list`` with all duplicated items removed.  The relative order of
 | 
			
		||||
  items is preserved, but if duplicates are encountered, only the first
 | 
			
		||||
  instance is preserved.
 | 
			
		||||
  instance is preserved.  The result is the same as
 | 
			
		||||
  :genex:`$<REMOVE_DUPLICATES:list>`.
 | 
			
		||||
 | 
			
		||||
.. _GenEx LIST-FILTER:
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:FILTER,list,INCLUDE|EXCLUDE,regex>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns a list with the items that match the regular expression ``regex``
 | 
			
		||||
  were included or removed.
 | 
			
		||||
  A list of items from the ``list`` which match (``INCLUDE``) or do not match
 | 
			
		||||
  (``EXCLUDE``) the regular expression ``regex``.  The result is the same as
 | 
			
		||||
  :genex:`$<FILTER:list,INCLUDE|EXCLUDE,regex>`.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:TRANSFORM,list,ACTION[,SELECTOR]>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns the list transformed by applying an ``ACTION`` to all or, by
 | 
			
		||||
  specifying a ``SELECTOR``, to the selected elements of the list.
 | 
			
		||||
  The ``list`` transformed by applying an ``ACTION`` to all or, by
 | 
			
		||||
  specifying a ``SELECTOR``, to the selected list items.
 | 
			
		||||
 | 
			
		||||
  .. note::
 | 
			
		||||
 | 
			
		||||
    The ``TRANSFORM`` sub-command does not change the number of elements in the
 | 
			
		||||
    list. If a ``SELECTOR`` is specified, only some elements will be changed,
 | 
			
		||||
    The ``TRANSFORM`` sub-command does not change the number of items in the
 | 
			
		||||
    list. If a ``SELECTOR`` is specified, only some items will be changed,
 | 
			
		||||
    the other ones will remain the same as before the transformation.
 | 
			
		||||
 | 
			
		||||
  ``ACTION`` specifies the action to apply to the elements of the list.
 | 
			
		||||
  The actions have exactly the same semantics as of the
 | 
			
		||||
  ``ACTION`` specifies the action to apply to the items of the list.
 | 
			
		||||
  The actions have exactly the same semantics as for the
 | 
			
		||||
  :command:`list(TRANSFORM)` command.  ``ACTION`` must be one of the following:
 | 
			
		||||
 | 
			
		||||
    :command:`APPEND <list(TRANSFORM_APPEND)>`, :command:`PREPEND <list(TRANSFORM_APPEND)>`
 | 
			
		||||
      Append, prepend specified value to each element of the list.
 | 
			
		||||
      Append, prepend specified value to each item of the list.
 | 
			
		||||
 | 
			
		||||
      .. code-block:: cmake
 | 
			
		||||
 | 
			
		||||
        $<LIST:TRANSFORM,list,(APPEND|PREPEND),value[,SELECTOR]>
 | 
			
		||||
 | 
			
		||||
    :command:`TOLOWER <list(TRANSFORM_TOLOWER)>`, :command:`TOUPPER <list(TRANSFORM_TOLOWER)>`
 | 
			
		||||
      Convert each element of the list to lower, upper characters.
 | 
			
		||||
      Convert each item of the list to lower, upper characters.
 | 
			
		||||
 | 
			
		||||
      .. code-block:: cmake
 | 
			
		||||
 | 
			
		||||
        $<LIST:TRANSFORM,list,(TOLOWER|TOUPPER)[,SELECTOR]>
 | 
			
		||||
 | 
			
		||||
    :command:`STRIP <list(TRANSFORM_STRIP)>`
 | 
			
		||||
      Remove leading and trailing spaces from each element of the list.
 | 
			
		||||
      Remove leading and trailing spaces from each item of the list.
 | 
			
		||||
 | 
			
		||||
      .. code-block:: cmake
 | 
			
		||||
 | 
			
		||||
@ -488,13 +515,13 @@ List Transformations
 | 
			
		||||
 | 
			
		||||
    :command:`REPLACE <list(TRANSFORM_REPLACE)>`:
 | 
			
		||||
      Match the regular expression as many times as possible and substitute
 | 
			
		||||
      the replacement expression for the match for each element of the list.
 | 
			
		||||
      the replacement expression for the match for each item of the list.
 | 
			
		||||
 | 
			
		||||
      .. code-block:: cmake
 | 
			
		||||
 | 
			
		||||
        $<LIST:TRANSFORM,list,REPLACE,regular_expression,replace_expression[,SELECTOR]>
 | 
			
		||||
 | 
			
		||||
  ``SELECTOR`` determines which elements of the list will be transformed.
 | 
			
		||||
  ``SELECTOR`` determines which items of the list will be transformed.
 | 
			
		||||
  Only one type of selector can be specified at a time. When given,
 | 
			
		||||
  ``SELECTOR`` must be one of the following:
 | 
			
		||||
 | 
			
		||||
@ -515,7 +542,7 @@ List Transformations
 | 
			
		||||
 | 
			
		||||
    ``REGEX``
 | 
			
		||||
      Specify a regular expression.
 | 
			
		||||
      Only elements matching the regular expression will be transformed.
 | 
			
		||||
      Only items matching the regular expression will be transformed.
 | 
			
		||||
 | 
			
		||||
      .. code-block:: cmake
 | 
			
		||||
 | 
			
		||||
@ -523,23 +550,29 @@ List Transformations
 | 
			
		||||
 | 
			
		||||
.. genex:: $<JOIN:list,glue>
 | 
			
		||||
 | 
			
		||||
  Joins the list with the content of the ``glue`` string inserted between each
 | 
			
		||||
  item.
 | 
			
		||||
  Joins the ``list`` with the content of the ``glue`` string inserted between
 | 
			
		||||
  each item.  This is conceptually the same operation as
 | 
			
		||||
  :ref:`$\<LIST:JOIN,list,glue\> <GenEx LIST-JOIN>`, but the two have
 | 
			
		||||
  different behavior with regard to empty items.
 | 
			
		||||
  :ref:`$\<LIST:JOIN,list,glue\> <GenEx LIST-JOIN>` preserves all empty items,
 | 
			
		||||
  whereas ``$<JOIN,list,glue>`` drops all empty items from the list.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<REMOVE_DUPLICATES:list>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.15
 | 
			
		||||
 | 
			
		||||
  Removes duplicated items in the given ``list``. The relative order of items
 | 
			
		||||
  is preserved, but if duplicates are encountered, only the first instance is
 | 
			
		||||
  preserved.
 | 
			
		||||
  is preserved, and if duplicates are encountered, only the first instance is
 | 
			
		||||
  retained.  The result is the same as
 | 
			
		||||
  :ref:`$\<LIST:REMOVE_DUPLICATES,list\> <GenEx LIST-REMOVE_DUPLICATES>`.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<FILTER:list,INCLUDE|EXCLUDE,regex>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.15
 | 
			
		||||
 | 
			
		||||
  Includes or removes items from ``list`` that match the regular expression
 | 
			
		||||
  ``regex``.
 | 
			
		||||
  ``regex``.  The result is the same as
 | 
			
		||||
  :ref:`$\<LIST:FILTER,list,INCLUDE|EXCLUDE,regex\> <GenEx LIST-FILTER>`.
 | 
			
		||||
 | 
			
		||||
.. _GenEx List Ordering:
 | 
			
		||||
 | 
			
		||||
@ -550,13 +583,13 @@ List Ordering
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns the list with the elements in reverse order.
 | 
			
		||||
  The ``list`` with the items in reverse order.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<LIST:SORT,list[,(COMPARE:option|CASE:option|ORDER:option)]...>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Returns the list sorted according the specified options.
 | 
			
		||||
  The ``list`` sorted according to the specified options.
 | 
			
		||||
 | 
			
		||||
  Use one of the ``COMPARE`` options to select the comparison method
 | 
			
		||||
  for sorting:
 | 
			
		||||
@ -566,26 +599,25 @@ List Ordering
 | 
			
		||||
      This is the default behavior if the ``COMPARE`` option is not given.
 | 
			
		||||
 | 
			
		||||
    ``FILE_BASENAME``
 | 
			
		||||
      Sorts a list of pathnames of files by their basenames.
 | 
			
		||||
      Sorts a list of file paths by their basenames.
 | 
			
		||||
 | 
			
		||||
    ``NATURAL``
 | 
			
		||||
      Sorts a list of strings using natural order
 | 
			
		||||
      (see ``strverscmp(3)`` manual), i.e. such that contiguous digits
 | 
			
		||||
      are compared as whole numbers.
 | 
			
		||||
      For example: the following list `10.0 1.1 2.1 8.0 2.0 3.1`
 | 
			
		||||
      will be sorted as `1.1 2.0 2.1 3.1 8.0 10.0` if the ``NATURAL``
 | 
			
		||||
      comparison is selected where it will be sorted as
 | 
			
		||||
      `1.1 10.0 2.0 2.1 3.1 8.0` with the ``STRING`` comparison.
 | 
			
		||||
      Sorts a list of strings using natural order (see the man page for
 | 
			
		||||
      ``strverscmp(3)``), such that contiguous digits are compared as whole
 | 
			
		||||
      numbers.  For example, the following list ``10.0 1.1 2.1 8.0 2.0 3.1``
 | 
			
		||||
      will be sorted as ``1.1 2.0 2.1 3.1 8.0 10.0`` if the ``NATURAL``
 | 
			
		||||
      comparison is selected, whereas it will be sorted as
 | 
			
		||||
      ``1.1 10.0 2.0 2.1 3.1 8.0`` with the ``STRING`` comparison.
 | 
			
		||||
 | 
			
		||||
  Use one of the ``CASE`` options to select a case sensitive or case
 | 
			
		||||
  insensitive sort mode:
 | 
			
		||||
  Use one of the ``CASE`` options to select a case-sensitive or
 | 
			
		||||
  case-insensitive sort mode:
 | 
			
		||||
 | 
			
		||||
    ``SENSITIVE``
 | 
			
		||||
      List items are sorted in a case-sensitive manner.
 | 
			
		||||
      This is the default behavior if the ``CASE`` option is not given.
 | 
			
		||||
 | 
			
		||||
    ``INSENSITIVE``
 | 
			
		||||
      List items are sorted case insensitively.  The order of
 | 
			
		||||
      List items are sorted in a case-insensitive manner.  The order of
 | 
			
		||||
      items which differ only by upper/lowercase is not specified.
 | 
			
		||||
 | 
			
		||||
  To control the sort order, one of the ``ORDER`` options can be given:
 | 
			
		||||
@ -597,8 +629,8 @@ List Ordering
 | 
			
		||||
    ``DESCENDING``
 | 
			
		||||
      Sorts the list in descending order.
 | 
			
		||||
 | 
			
		||||
  This is an error to specify multiple times the same option. Various options
 | 
			
		||||
  can be specified in any order:
 | 
			
		||||
  Options can be specified in any order, but it is an error to specify the
 | 
			
		||||
  same option multiple times.
 | 
			
		||||
 | 
			
		||||
  .. code-block:: cmake
 | 
			
		||||
 | 
			
		||||
@ -1789,20 +1821,20 @@ In the following, the phrase "the ``tgt`` filename" means the name of the
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Full path to the linker import file. On DLL platforms, it would be the
 | 
			
		||||
  ``.lib`` file. On AIX, for the executables, and on macOS, for the shared
 | 
			
		||||
  libraries, it could be, respectively, the ``.imp`` or ``.tbd`` import file,
 | 
			
		||||
  depending of the value of :prop_tgt:`ENABLE_EXPORTS` property.
 | 
			
		||||
  ``.lib`` file. For executables on AIX, and for shared libraries on macOS,
 | 
			
		||||
  it could be, respectively, the ``.imp`` or ``.tbd`` import file,
 | 
			
		||||
  depending on the value of the :prop_tgt:`ENABLE_EXPORTS` property.
 | 
			
		||||
 | 
			
		||||
  An empty string is returned when there is no import file associated with the
 | 
			
		||||
  target.
 | 
			
		||||
  This expands to an empty string when there is no import file associated
 | 
			
		||||
  with the target.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<TARGET_IMPORT_FILE_BASE_NAME:tgt>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Base name of file linker import file of the target ``tgt`` without prefix and
 | 
			
		||||
  suffix. For example, if target file name is ``libbase.tbd``, the base name is
 | 
			
		||||
  ``base``.
 | 
			
		||||
  Base name of the linker import file of the target ``tgt`` without prefix or
 | 
			
		||||
  suffix. For example, if the target file name is ``libbase.tbd``, the base
 | 
			
		||||
  name is ``base``.
 | 
			
		||||
 | 
			
		||||
  See also the :prop_tgt:`OUTPUT_NAME` and :prop_tgt:`ARCHIVE_OUTPUT_NAME`
 | 
			
		||||
  target properties and their configuration specific variants
 | 
			
		||||
@ -1831,7 +1863,7 @@ In the following, the phrase "the ``tgt`` filename" means the name of the
 | 
			
		||||
 | 
			
		||||
  Suffix of the import file of the target ``tgt``.
 | 
			
		||||
 | 
			
		||||
  The suffix corresponds to the file extension (such as ".lib" or ".tbd").
 | 
			
		||||
  The suffix corresponds to the file extension (such as ``.lib`` or ``.tbd``).
 | 
			
		||||
 | 
			
		||||
  See also the :prop_tgt:`IMPORT_SUFFIX` target property.
 | 
			
		||||
 | 
			
		||||
@ -1842,13 +1874,15 @@ In the following, the phrase "the ``tgt`` filename" means the name of the
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Name of the import file of the target target ``tgt``.
 | 
			
		||||
  Name of the import file of the target ``tgt``.
 | 
			
		||||
 | 
			
		||||
  Note that ``tgt`` is not added as a dependency of the target this
 | 
			
		||||
  expression is evaluated on.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<TARGET_IMPORT_FILE_DIR:tgt>
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
 | 
			
		||||
  Directory of the import file of the target ``tgt``.
 | 
			
		||||
 | 
			
		||||
  Note that ``tgt`` is not added as a dependency of the target this
 | 
			
		||||
@ -1863,11 +1897,11 @@ In the following, the phrase "the ``tgt`` filename" means the name of the
 | 
			
		||||
 | 
			
		||||
  .. versionadded:: 3.27
 | 
			
		||||
    On macOS, it could be the ``.tbd`` import file associated with the shared
 | 
			
		||||
    library, depending of the value of :prop_tgt:`ENABLE_EXPORTS` property.
 | 
			
		||||
    library, depending on the value of the :prop_tgt:`ENABLE_EXPORTS` property.
 | 
			
		||||
 | 
			
		||||
  This generator expression is equivalent to
 | 
			
		||||
  :genex:`$<TARGET_LINKER_LIBRARY_FILE>` or
 | 
			
		||||
  :genex:`$<TARGET_LINKER_IMPORT_FILE>` generator expressions, depending of the
 | 
			
		||||
  :genex:`$<TARGET_LINKER_IMPORT_FILE>` generator expressions, depending on the
 | 
			
		||||
  characteristics of the target and the platform.
 | 
			
		||||
 | 
			
		||||
.. genex:: $<TARGET_LINKER_FILE_BASE_NAME:tgt>
 | 
			
		||||
 | 
			
		||||
@ -157,6 +157,12 @@ Generator Expressions
 | 
			
		||||
  :ref:`transformation <GenEx Path Transformations>` operations learned
 | 
			
		||||
  to process :ref:`lists <CMake Language Lists>` of paths element-wise.
 | 
			
		||||
 | 
			
		||||
* The :genex:`TARGET_IMPORT_FILE`, :genex:`TARGET_IMPORT_FILE_BASE_NAME`,
 | 
			
		||||
  :genex:`TARGET_IMPORT_FILE_PREFIX`, :genex:`TARGET_IMPORT_FILE_SUFFIX`,
 | 
			
		||||
  :genex:`TARGET_IMPORT_FILE_NAME`, and :genex:`TARGET_IMPORT_FILE_DIR`
 | 
			
		||||
  generator expressions were added.  These expand to details about the
 | 
			
		||||
  linker import file for a target.
 | 
			
		||||
 | 
			
		||||
* The :genex:`TARGET_RUNTIME_DLL_DIRS` generator expression was added.
 | 
			
		||||
  It expands to a list of the directories containing DLLs in
 | 
			
		||||
  :genex:`TARGET_RUNTIME_DLLS`.
 | 
			
		||||
 | 
			
		||||
@ -124,7 +124,10 @@ unset(_CMAKE_HIP_COMPILER_ID_IMPLICIT_FWKS)
 | 
			
		||||
unset(_CMAKE_HIP_COMPILER_ID_IMPLICIT_LOG)
 | 
			
		||||
 | 
			
		||||
if(NOT CMAKE_HIP_COMPILER_ROCM_LIB)
 | 
			
		||||
  set(_CMAKE_HIP_COMPILER_ROCM_LIB_DIRS "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib")
 | 
			
		||||
  set(_CMAKE_HIP_COMPILER_ROCM_LIB_DIRS
 | 
			
		||||
    "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib"
 | 
			
		||||
    "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib64"
 | 
			
		||||
    )
 | 
			
		||||
  if(CMAKE_HIP_LIBRARY_ARCHITECTURE)
 | 
			
		||||
    list(APPEND _CMAKE_HIP_COMPILER_ROCM_LIB_DIRS "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib/${CMAKE_HIP_LIBRARY_ARCHITECTURE}")
 | 
			
		||||
  endif()
 | 
			
		||||
@ -146,6 +149,12 @@ if(NOT CMAKE_HIP_COMPILER_ROCM_LIB)
 | 
			
		||||
  endif()
 | 
			
		||||
  unset(_CMAKE_HIP_COMPILER_ROCM_LIB_DIRS)
 | 
			
		||||
endif()
 | 
			
		||||
if(CMAKE_HIP_COMPILER_ROCM_LIB MATCHES "/lib64$" AND NOT DEFINED CMAKE_SIZEOF_VOID_P)
 | 
			
		||||
  # We have not yet determined the target ABI but we need 'find_package' to
 | 
			
		||||
  # search lib64 directories to find hip-lang CMake package dependencies.
 | 
			
		||||
  # This will be replaced by ABI detection later.
 | 
			
		||||
  set(CMAKE_HIP_SIZEOF_DATA_PTR 8)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if (NOT _CMAKE_TOOLCHAIN_LOCATION)
 | 
			
		||||
  get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_HIP_COMPILER}" PATH)
 | 
			
		||||
 | 
			
		||||
@ -499,11 +499,7 @@ if(Protobuf_INCLUDE_DIR)
 | 
			
		||||
  math(EXPR _PROTOBUF_MAJOR_VERSION "${Protobuf_LIB_VERSION} / 1000000")
 | 
			
		||||
  math(EXPR _PROTOBUF_MINOR_VERSION "${Protobuf_LIB_VERSION} / 1000 % 1000")
 | 
			
		||||
  math(EXPR _PROTOBUF_SUBMINOR_VERSION "${Protobuf_LIB_VERSION} % 1000")
 | 
			
		||||
  if (_PROTOBUF_MINOR_VERSION GREATER_EQUAL "21")
 | 
			
		||||
    set(Protobuf_VERSION "${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
 | 
			
		||||
  else()
 | 
			
		||||
    set(Protobuf_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
 | 
			
		||||
  endif()
 | 
			
		||||
  set(Protobuf_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
 | 
			
		||||
 | 
			
		||||
  if(Protobuf_DEBUG)
 | 
			
		||||
    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
 | 
			
		||||
@ -524,7 +520,9 @@ if(Protobuf_INCLUDE_DIR)
 | 
			
		||||
          "${Protobuf_PROTOC_EXECUTABLE} reveals version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    if(NOT "${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" VERSION_EQUAL "${Protobuf_VERSION}")
 | 
			
		||||
    # protoc version 22 and up don't print the major version any more
 | 
			
		||||
    if(NOT "${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" VERSION_EQUAL "${Protobuf_VERSION}" AND
 | 
			
		||||
       NOT "${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" VERSION_EQUAL "${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
 | 
			
		||||
      message(WARNING "Protobuf compiler version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}"
 | 
			
		||||
        " doesn't match library version ${Protobuf_VERSION}")
 | 
			
		||||
    endif()
 | 
			
		||||
@ -556,7 +554,7 @@ if(Protobuf_INCLUDE_DIR)
 | 
			
		||||
              INTERFACE_COMPILE_FEATURES cxx_std_11
 | 
			
		||||
            )
 | 
			
		||||
          endif()
 | 
			
		||||
          if (MSVC AND NOT Protobuf_USE_STATIC_LIBS)
 | 
			
		||||
          if (WIN32 AND NOT Protobuf_USE_STATIC_LIBS)
 | 
			
		||||
            set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
 | 
			
		||||
              INTERFACE_COMPILE_DEFINITIONS "PROTOBUF_USE_DLLS"
 | 
			
		||||
            )
 | 
			
		||||
@ -589,7 +587,7 @@ if(Protobuf_INCLUDE_DIR)
 | 
			
		||||
            set_target_properties(protobuf::libprotobuf-lite PROPERTIES
 | 
			
		||||
              IMPORTED_LOCATION_DEBUG "${Protobuf_LITE_LIBRARY_DEBUG}")
 | 
			
		||||
          endif()
 | 
			
		||||
          if (MSVC AND NOT Protobuf_USE_STATIC_LIBS)
 | 
			
		||||
          if (WIN32 AND NOT Protobuf_USE_STATIC_LIBS)
 | 
			
		||||
            set_property(TARGET protobuf::libprotobuf-lite APPEND PROPERTY
 | 
			
		||||
              INTERFACE_COMPILE_DEFINITIONS "PROTOBUF_USE_DLLS"
 | 
			
		||||
            )
 | 
			
		||||
@ -627,7 +625,7 @@ if(Protobuf_INCLUDE_DIR)
 | 
			
		||||
              INTERFACE_COMPILE_FEATURES cxx_std_11
 | 
			
		||||
            )
 | 
			
		||||
          endif()
 | 
			
		||||
          if (MSVC AND NOT Protobuf_USE_STATIC_LIBS)
 | 
			
		||||
          if (WIN32 AND NOT Protobuf_USE_STATIC_LIBS)
 | 
			
		||||
            set_property(TARGET protobuf::libprotoc APPEND PROPERTY
 | 
			
		||||
              INTERFACE_COMPILE_DEFINITIONS "PROTOBUF_USE_DLLS"
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
@ -4,6 +4,8 @@ if(CMAKE_ANDROID_NDK)
 | 
			
		||||
  include(${CMAKE_ANDROID_NDK}/build/cmake/hooks/pre/Android.cmake OPTIONAL)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
include(Platform/Linux)
 | 
			
		||||
 | 
			
		||||
# Natively compiling on an Android host doesn't need these flags to be reset.
 | 
			
		||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
 | 
			
		||||
  return()
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
set(CMake_VERSION_MAJOR 3)
 | 
			
		||||
set(CMake_VERSION_MINOR 27)
 | 
			
		||||
set(CMake_VERSION_PATCH 0)
 | 
			
		||||
set(CMake_VERSION_RC 4)
 | 
			
		||||
set(CMake_VERSION_RC 5)
 | 
			
		||||
set(CMake_VERSION_IS_DIRTY 0)
 | 
			
		||||
 | 
			
		||||
# Start with the full version number used in tags.  It has no dev info.
 | 
			
		||||
@ -21,7 +21,7 @@ endif()
 | 
			
		||||
 | 
			
		||||
if(NOT CMake_VERSION_NO_GIT)
 | 
			
		||||
  # If this source was exported by 'git archive', use its commit info.
 | 
			
		||||
  set(git_info [==[b384058e4b CMake 3.27.0-rc4]==])
 | 
			
		||||
  set(git_info [==[8bcba75b1c CMake 3.27.0-rc5]==])
 | 
			
		||||
 | 
			
		||||
  # Otherwise, try to identify the current development source version.
 | 
			
		||||
  if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,7 @@
 | 
			
		||||
#include <cstddef>
 | 
			
		||||
#include <cstdint>
 | 
			
		||||
#include <memory>
 | 
			
		||||
#include <utility>
 | 
			
		||||
 | 
			
		||||
#include <cm3p/cppdap/optional.h>
 | 
			
		||||
#include <cm3p/cppdap/session.h>
 | 
			
		||||
@ -78,12 +79,14 @@ cmDebuggerBreakpointManager::HandleSetBreakpointsRequest(
 | 
			
		||||
    cmSystemTools::GetActualCaseForPath(request.source.path.value());
 | 
			
		||||
  const dap::array<dap::SourceBreakpoint> defaultValue{};
 | 
			
		||||
  const auto& breakpoints = request.breakpoints.value(defaultValue);
 | 
			
		||||
 | 
			
		||||
  if (Breakpoints.find(sourcePath) != Breakpoints.end()) {
 | 
			
		||||
    Breakpoints[sourcePath].clear();
 | 
			
		||||
  }
 | 
			
		||||
  response.breakpoints.resize(breakpoints.size());
 | 
			
		||||
 | 
			
		||||
  if (ListFileFunctionLines.find(sourcePath) != ListFileFunctionLines.end()) {
 | 
			
		||||
    // The file has loaded, we can validate breakpoints.
 | 
			
		||||
    if (Breakpoints.find(sourcePath) != Breakpoints.end()) {
 | 
			
		||||
      Breakpoints[sourcePath].clear();
 | 
			
		||||
    }
 | 
			
		||||
    response.breakpoints.resize(breakpoints.size());
 | 
			
		||||
    for (size_t i = 0; i < breakpoints.size(); i++) {
 | 
			
		||||
      int64_t correctedLine =
 | 
			
		||||
        CalibrateBreakpointLine(sourcePath, breakpoints[i].line);
 | 
			
		||||
@ -106,7 +109,6 @@ cmDebuggerBreakpointManager::HandleSetBreakpointsRequest(
 | 
			
		||||
    // The file has not loaded, validate breakpoints later.
 | 
			
		||||
    ListFilePendingValidations.emplace(sourcePath);
 | 
			
		||||
 | 
			
		||||
    response.breakpoints.resize(breakpoints.size());
 | 
			
		||||
    for (size_t i = 0; i < breakpoints.size(); i++) {
 | 
			
		||||
      Breakpoints[sourcePath].emplace_back(NextBreakpointId++,
 | 
			
		||||
                                           breakpoints[i].line);
 | 
			
		||||
@ -191,6 +193,15 @@ std::vector<int64_t> cmDebuggerBreakpointManager::GetBreakpoints(
 | 
			
		||||
  return breakpoints;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
size_t cmDebuggerBreakpointManager::GetBreakpointCount() const
 | 
			
		||||
{
 | 
			
		||||
  size_t count = 0;
 | 
			
		||||
  for (auto const& pair : Breakpoints) {
 | 
			
		||||
    count += pair.second.size();
 | 
			
		||||
  }
 | 
			
		||||
  return count;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void cmDebuggerBreakpointManager::ClearAll()
 | 
			
		||||
{
 | 
			
		||||
  std::unique_lock<std::mutex> lock(Mutex);
 | 
			
		||||
 | 
			
		||||
@ -4,6 +4,7 @@
 | 
			
		||||
 | 
			
		||||
#include "cmConfigure.h" // IWYU pragma: keep
 | 
			
		||||
 | 
			
		||||
#include <cstddef>
 | 
			
		||||
#include <cstdint>
 | 
			
		||||
#include <mutex>
 | 
			
		||||
#include <string>
 | 
			
		||||
@ -55,6 +56,7 @@ public:
 | 
			
		||||
                        std::vector<cmListFileFunction> const& functions);
 | 
			
		||||
  std::vector<int64_t> GetBreakpoints(std::string const& sourcePath,
 | 
			
		||||
                                      int64_t line);
 | 
			
		||||
  size_t GetBreakpointCount() const;
 | 
			
		||||
  void ClearAll();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -78,15 +78,16 @@ dap::array<dap::Variable> cmDebuggerVariables::HandleVariablesRequest()
 | 
			
		||||
          entry.Value.empty()) {
 | 
			
		||||
        continue;
 | 
			
		||||
      }
 | 
			
		||||
      variables.push_back(dap::Variable{ {},
 | 
			
		||||
                                         {},
 | 
			
		||||
                                         {},
 | 
			
		||||
                                         entry.Name,
 | 
			
		||||
                                         {},
 | 
			
		||||
                                         PrivateDataHint,
 | 
			
		||||
                                         entry.Type,
 | 
			
		||||
                                         entry.Value,
 | 
			
		||||
                                         0 });
 | 
			
		||||
      variables.push_back(dap::Variable{
 | 
			
		||||
        {},
 | 
			
		||||
        {},
 | 
			
		||||
        {},
 | 
			
		||||
        entry.Name,
 | 
			
		||||
        {},
 | 
			
		||||
        PrivateDataHint,
 | 
			
		||||
        SupportsVariableType ? entry.Type : dap::optional<dap::string>(),
 | 
			
		||||
        entry.Value,
 | 
			
		||||
        0 });
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -106,16 +107,16 @@ void cmDebuggerVariables::EnumerateSubVariablesIfAny(
 | 
			
		||||
{
 | 
			
		||||
  dap::array<dap::Variable> ret;
 | 
			
		||||
  for (auto const& variables : SubVariables) {
 | 
			
		||||
    toBeReturned.emplace_back(
 | 
			
		||||
      dap::Variable{ {},
 | 
			
		||||
                     {},
 | 
			
		||||
                     {},
 | 
			
		||||
                     variables->GetName(),
 | 
			
		||||
                     {},
 | 
			
		||||
                     PrivatePropertyHint,
 | 
			
		||||
                     SupportsVariableType ? "collection" : nullptr,
 | 
			
		||||
                     variables->GetValue(),
 | 
			
		||||
                     variables->GetId() });
 | 
			
		||||
    toBeReturned.emplace_back(dap::Variable{
 | 
			
		||||
      {},
 | 
			
		||||
      {},
 | 
			
		||||
      {},
 | 
			
		||||
      variables->GetName(),
 | 
			
		||||
      {},
 | 
			
		||||
      PrivatePropertyHint,
 | 
			
		||||
      SupportsVariableType ? "collection" : dap::optional<dap::string>(),
 | 
			
		||||
      variables->GetValue(),
 | 
			
		||||
      variables->GetId() });
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -384,7 +384,9 @@ static const struct RemoveDuplicatesNode : public cmGeneratorExpressionNode
 | 
			
		||||
        "$<REMOVE_DUPLICATES:...> expression requires one parameter");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return cmList{ parameters.front() }.remove_duplicates().to_string();
 | 
			
		||||
    return cmList{ parameters.front(), cmList::EmptyElements::Yes }
 | 
			
		||||
      .remove_duplicates()
 | 
			
		||||
      .to_string();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
} removeDuplicatesNode;
 | 
			
		||||
 | 
			
		||||
@ -2733,7 +2733,8 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
 | 
			
		||||
        auto mm = CxxModuleMapContent(*modmap_fmt, locs, object, usages);
 | 
			
		||||
 | 
			
		||||
        // XXX(modmap): If changing this path construction, change
 | 
			
		||||
        // `cmNinjaTargetGenerator::WriteObjectBuildStatements` to generate the
 | 
			
		||||
        // `cmNinjaTargetGenerator::WriteObjectBuildStatements` and
 | 
			
		||||
        // `cmNinjaTargetGenerator::ExportObjectCompileCommand` to generate the
 | 
			
		||||
        // corresponding file path.
 | 
			
		||||
        cmGeneratedFileStream mmf(cmStrCat(object.PrimaryOutput, ".modmap"));
 | 
			
		||||
        mmf << mm;
 | 
			
		||||
 | 
			
		||||
@ -1428,8 +1428,9 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
 | 
			
		||||
 | 
			
		||||
    if (!modmapFormat.empty()) {
 | 
			
		||||
      // XXX(modmap): If changing this path construction, change
 | 
			
		||||
      // `cmGlobalNinjaGenerator::WriteDyndep` to expect the corresponding file
 | 
			
		||||
      // path.
 | 
			
		||||
      // `cmGlobalNinjaGenerator::WriteDyndep` and
 | 
			
		||||
      // `cmNinjaTargetGenerator::ExportObjectCompileCommand` to expect the
 | 
			
		||||
      // corresponding file path.
 | 
			
		||||
      std::string ddModmapFile = cmStrCat(objectFileName, ".modmap");
 | 
			
		||||
      vars["DYNDEP_MODULE_MAP_FILE"] = ddModmapFile;
 | 
			
		||||
      objBuild.OrderOnlyDeps.push_back(ddModmapFile);
 | 
			
		||||
@ -1688,11 +1689,32 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand(
 | 
			
		||||
  escapedSourceFileName = this->LocalGenerator->ConvertToOutputFormat(
 | 
			
		||||
    escapedSourceFileName, cmOutputConverter::SHELL);
 | 
			
		||||
 | 
			
		||||
  std::string fullFlags = flags;
 | 
			
		||||
  {
 | 
			
		||||
    bool const needDyndep =
 | 
			
		||||
      this->GetGeneratorTarget()->NeedDyndep(language, outputConfig);
 | 
			
		||||
    std::string const modmapFormatVar =
 | 
			
		||||
      cmStrCat("CMAKE_EXPERIMENTAL_", language, "_MODULE_MAP_FORMAT");
 | 
			
		||||
    std::string const modmapFormat =
 | 
			
		||||
      this->Makefile->GetSafeDefinition(modmapFormatVar);
 | 
			
		||||
    if (needDyndep && !modmapFormat.empty()) {
 | 
			
		||||
      std::string modmapFlags = this->GetMakefile()->GetRequiredDefinition(
 | 
			
		||||
        cmStrCat("CMAKE_EXPERIMENTAL_", language, "_MODULE_MAP_FLAG"));
 | 
			
		||||
      // XXX(modmap): If changing this path construction, change
 | 
			
		||||
      // `cmGlobalNinjaGenerator::WriteDyndep` and
 | 
			
		||||
      // `cmNinjaTargetGenerator::WriteObjectBuildStatement` to expect the
 | 
			
		||||
      // corresponding file path.
 | 
			
		||||
      cmSystemTools::ReplaceString(modmapFlags, "<MODULE_MAP_FILE>",
 | 
			
		||||
                                   cmStrCat(objectFileName, ".modmap"));
 | 
			
		||||
      fullFlags += cmStrCat(' ', modmapFlags);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  compileObjectVars.Source = escapedSourceFileName.c_str();
 | 
			
		||||
  compileObjectVars.Object = objectFileName.c_str();
 | 
			
		||||
  compileObjectVars.ObjectDir = objectDir.c_str();
 | 
			
		||||
  compileObjectVars.ObjectFileDir = objectFileDir.c_str();
 | 
			
		||||
  compileObjectVars.Flags = flags.c_str();
 | 
			
		||||
  compileObjectVars.Flags = fullFlags.c_str();
 | 
			
		||||
  compileObjectVars.Defines = defines.c_str();
 | 
			
		||||
  compileObjectVars.Includes = includes.c_str();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -309,7 +309,7 @@ void cmUVReadOnlyProcess::UVExit(uv_process_t* handle, int64_t exitStatus,
 | 
			
		||||
    // Set error message on demand
 | 
			
		||||
    proc.Result()->ExitStatus = exitStatus;
 | 
			
		||||
    proc.Result()->TermSignal = termSignal;
 | 
			
		||||
    if (!proc.Result()->error()) {
 | 
			
		||||
    if (proc.Result()->ErrorMessage.empty()) {
 | 
			
		||||
      if (termSignal != 0) {
 | 
			
		||||
        proc.Result()->ErrorMessage = cmStrCat(
 | 
			
		||||
          "Process was terminated by signal ", proc.Result()->TermSignal);
 | 
			
		||||
 | 
			
		||||
@ -2502,6 +2502,26 @@ int cmVSLink::LinkIncremental()
 | 
			
		||||
 | 
			
		||||
int cmVSLink::LinkNonIncremental()
 | 
			
		||||
{
 | 
			
		||||
  // The MSVC link tool expects 'rc' to be in the PATH if it needs to embed
 | 
			
		||||
  // manifests, but the user might explicitly set 'CMAKE_RC_COMPILER' instead.
 | 
			
		||||
  // Add its location as a fallback at the end of PATH.
 | 
			
		||||
  if (cmSystemTools::FileIsFullPath(this->RcPath)) {
 | 
			
		||||
    std::string rcDir = cmSystemTools::GetFilenamePath(this->RcPath);
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
    std::replace(rcDir.begin(), rcDir.end(), '/', '\\');
 | 
			
		||||
    char const pathSep = ';';
 | 
			
		||||
#else
 | 
			
		||||
    char const pathSep = ':';
 | 
			
		||||
#endif
 | 
			
		||||
    cm::optional<std::string> path = cmSystemTools::GetEnvVar("PATH");
 | 
			
		||||
    if (path) {
 | 
			
		||||
      path = cmStrCat(*path, pathSep, rcDir);
 | 
			
		||||
    } else {
 | 
			
		||||
      path = rcDir;
 | 
			
		||||
    }
 | 
			
		||||
    cmSystemTools::PutEnv(cmStrCat("PATH=", *path));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Sort out any manifests.
 | 
			
		||||
  if (this->LinkGeneratesManifest || !this->UserManifests.empty()) {
 | 
			
		||||
    std::string opt =
 | 
			
		||||
 | 
			
		||||
@ -19,11 +19,15 @@
 | 
			
		||||
  do {                                                                        \
 | 
			
		||||
    ASSERT_TRUE(x.name == expectedName);                                      \
 | 
			
		||||
    ASSERT_TRUE(x.value == expectedValue);                                    \
 | 
			
		||||
    ASSERT_TRUE(x.type.value() == expectedType);                              \
 | 
			
		||||
    ASSERT_TRUE(x.evaluateName.has_value() == false);                         \
 | 
			
		||||
    if (std::string(expectedType) == "collection") {                          \
 | 
			
		||||
      ASSERT_TRUE(x.variablesReference != 0);                                 \
 | 
			
		||||
    if (expectedType == nullptr) {                                            \
 | 
			
		||||
      ASSERT_TRUE(x.type == dap::optional<dap::string>());                    \
 | 
			
		||||
    } else {                                                                  \
 | 
			
		||||
      ASSERT_TRUE(x.type == dap::optional<dap::string>(expectedType));        \
 | 
			
		||||
      if (std::string(expectedType) == "collection") {                        \
 | 
			
		||||
        ASSERT_TRUE(x.variablesReference != 0);                               \
 | 
			
		||||
      }                                                                       \
 | 
			
		||||
    }                                                                         \
 | 
			
		||||
    ASSERT_TRUE(x.evaluateName.has_value() == false);                         \
 | 
			
		||||
  } while (false)
 | 
			
		||||
 | 
			
		||||
#define ASSERT_VARIABLE_REFERENCE(x, expectedName, expectedValue,             \
 | 
			
		||||
 | 
			
		||||
@ -51,6 +51,13 @@ static bool testHandleBreakpointRequestBeforeFileIsLoaded()
 | 
			
		||||
                    sourcePath, false);
 | 
			
		||||
  ASSERT_BREAKPOINT(response.breakpoints[2], 2, sourceBreakpoints[2].line,
 | 
			
		||||
                    sourcePath, false);
 | 
			
		||||
  ASSERT_TRUE(breakpointManager.GetBreakpointCount() == 3);
 | 
			
		||||
 | 
			
		||||
  // setBreakpoints should override any existing breakpoints
 | 
			
		||||
  setBreakpointRequest.breakpoints.value().clear();
 | 
			
		||||
  helper.Client->send(setBreakpointRequest).get();
 | 
			
		||||
  ASSERT_TRUE(breakpointManager.GetBreakpointCount() == 0);
 | 
			
		||||
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -103,6 +110,12 @@ static bool testHandleBreakpointRequestAfterFileIsLoaded()
 | 
			
		||||
                    sourcePath, true);
 | 
			
		||||
 | 
			
		||||
  ASSERT_TRUE(notExpectBreakpointEvents.load());
 | 
			
		||||
  ASSERT_TRUE(breakpointManager.GetBreakpointCount() == 5);
 | 
			
		||||
 | 
			
		||||
  // setBreakpoints should override any existing breakpoints
 | 
			
		||||
  setBreakpointRequest.breakpoints.value().clear();
 | 
			
		||||
  helper.Client->send(setBreakpointRequest).get();
 | 
			
		||||
  ASSERT_TRUE(breakpointManager.GetBreakpointCount() == 0);
 | 
			
		||||
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -8,6 +8,7 @@
 | 
			
		||||
#include <unordered_set>
 | 
			
		||||
#include <vector>
 | 
			
		||||
 | 
			
		||||
#include <cm3p/cppdap/optional.h>
 | 
			
		||||
#include <cm3p/cppdap/protocol.h>
 | 
			
		||||
#include <cm3p/cppdap/types.h>
 | 
			
		||||
 | 
			
		||||
@ -174,6 +175,33 @@ static bool testSortTheResult()
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static bool testNoSupportsVariableType()
 | 
			
		||||
{
 | 
			
		||||
  auto variablesManager =
 | 
			
		||||
    std::make_shared<cmDebugger::cmDebuggerVariablesManager>();
 | 
			
		||||
 | 
			
		||||
  auto vars = std::make_shared<cmDebugger::cmDebuggerVariables>(
 | 
			
		||||
    variablesManager, "Variables", false, []() {
 | 
			
		||||
      return std::vector<cmDebugger::cmDebuggerVariableEntry>{ { "test",
 | 
			
		||||
                                                                 "value" } };
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
  auto subvars = std::make_shared<cmDebugger::cmDebuggerVariables>(
 | 
			
		||||
    variablesManager, "Children", false);
 | 
			
		||||
 | 
			
		||||
  vars->AddSubVariables(subvars);
 | 
			
		||||
 | 
			
		||||
  dap::array<dap::Variable> variables =
 | 
			
		||||
    variablesManager->HandleVariablesRequest(
 | 
			
		||||
      CreateVariablesRequest(vars->GetId()));
 | 
			
		||||
 | 
			
		||||
  ASSERT_TRUE(variables.size() == 2);
 | 
			
		||||
  ASSERT_VARIABLE(variables[0], "Children", "", nullptr);
 | 
			
		||||
  ASSERT_VARIABLE(variables[1], "test", "value", nullptr);
 | 
			
		||||
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int testDebuggerVariables(int, char*[])
 | 
			
		||||
{
 | 
			
		||||
  return runTests(std::vector<std::function<bool()>>{
 | 
			
		||||
@ -181,5 +209,6 @@ int testDebuggerVariables(int, char*[])
 | 
			
		||||
    testConstructors,
 | 
			
		||||
    testIgnoreEmptyStringEntries,
 | 
			
		||||
    testSortTheResult,
 | 
			
		||||
    testNoSupportsVariableType,
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -8,6 +8,7 @@
 | 
			
		||||
#include <utility>
 | 
			
		||||
#include <vector>
 | 
			
		||||
 | 
			
		||||
#include <cm3p/cppdap/optional.h>
 | 
			
		||||
#include <cm3p/cppdap/protocol.h>
 | 
			
		||||
#include <cm3p/cppdap/types.h>
 | 
			
		||||
#include <stddef.h>
 | 
			
		||||
 | 
			
		||||
@ -152,6 +152,11 @@ if ("named" IN_LIST CMake_TEST_MODULE_COMPILATION)
 | 
			
		||||
  run_cxx_module_test(scan_properties)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
# Tests which require compile commands support.
 | 
			
		||||
if ("compile_commands" IN_LIST CMake_TEST_MODULE_COMPILATION)
 | 
			
		||||
  run_cxx_module_test(export-compile-commands)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
# Tests which require collation work.
 | 
			
		||||
if ("collation" IN_LIST CMake_TEST_MODULE_COMPILATION)
 | 
			
		||||
  run_cxx_module_test(public-req-private)
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,25 @@
 | 
			
		||||
if (NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/compile_commands.json")
 | 
			
		||||
  list(APPEND RunCMake_TEST_FAILED
 | 
			
		||||
    "No compile commands database detected.")
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
file(READ "${RunCMake_TEST_BINARY_DIR}/compile_commands.json" compile_commands)
 | 
			
		||||
 | 
			
		||||
string(JSON length
 | 
			
		||||
  LENGTH "${compile_commands}")
 | 
			
		||||
math(EXPR length "${length} - 1")
 | 
			
		||||
foreach (item RANGE "${length}")
 | 
			
		||||
  string(JSON entry
 | 
			
		||||
    GET "${compile_commands}"
 | 
			
		||||
    "${item}")
 | 
			
		||||
  string(JSON command
 | 
			
		||||
    GET "${entry}"
 | 
			
		||||
    "command")
 | 
			
		||||
  if (NOT command MATCHES "(@|-fmodule-mapper=).*\\.modmap")
 | 
			
		||||
    string(JSON output
 | 
			
		||||
      GET "${entry}"
 | 
			
		||||
      "output")
 | 
			
		||||
    list(APPEND RunCMake_TEST_FAILED
 | 
			
		||||
      "Missing `.modmap` argument for '${output}'")
 | 
			
		||||
  endif ()
 | 
			
		||||
endforeach ()
 | 
			
		||||
@ -0,0 +1,4 @@
 | 
			
		||||
CMake Warning \(dev\) at CMakeLists.txt:9 \(target_sources\):
 | 
			
		||||
  CMake's C\+\+ module support is experimental.  It is meant only for
 | 
			
		||||
  experimentation and feedback to CMake developers.
 | 
			
		||||
This warning is for project developers.  Use -Wno-dev to suppress it.
 | 
			
		||||
@ -0,0 +1,20 @@
 | 
			
		||||
cmake_minimum_required(VERSION 3.24)
 | 
			
		||||
project(cxx_modules_export_compile_commands CXX)
 | 
			
		||||
 | 
			
		||||
include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake")
 | 
			
		||||
 | 
			
		||||
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
 | 
			
		||||
 | 
			
		||||
add_executable(export-compile-commands)
 | 
			
		||||
target_sources(export-compile-commands
 | 
			
		||||
  PRIVATE
 | 
			
		||||
    main.cxx
 | 
			
		||||
  PRIVATE
 | 
			
		||||
    FILE_SET CXX_MODULES
 | 
			
		||||
      BASE_DIRS
 | 
			
		||||
        "${CMAKE_CURRENT_SOURCE_DIR}"
 | 
			
		||||
      FILES
 | 
			
		||||
        importable.cxx)
 | 
			
		||||
target_compile_features(export-compile-commands PUBLIC cxx_std_20)
 | 
			
		||||
 | 
			
		||||
add_test(NAME export-compile-commands COMMAND export-compile-commands)
 | 
			
		||||
@ -0,0 +1,6 @@
 | 
			
		||||
export module importable;
 | 
			
		||||
 | 
			
		||||
export int from_import()
 | 
			
		||||
{
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,6 @@
 | 
			
		||||
import importable;
 | 
			
		||||
 | 
			
		||||
int main(int argc, char* argv[])
 | 
			
		||||
{
 | 
			
		||||
  return from_import();
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,6 @@
 | 
			
		||||
file(READ "${RunCMake_TEST_BINARY_DIR}/REMOVE_DUPLICATES-generated.txt" content)
 | 
			
		||||
 | 
			
		||||
set(expected "1;;2;3")
 | 
			
		||||
if(NOT content STREQUAL expected)
 | 
			
		||||
  set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]")
 | 
			
		||||
endif()
 | 
			
		||||
@ -0,0 +1,3 @@
 | 
			
		||||
cmake_policy(VERSION 3.11)
 | 
			
		||||
 | 
			
		||||
file(GENERATE OUTPUT "REMOVE_DUPLICATES-generated.txt" CONTENT "$<REMOVE_DUPLICATES:1$<SEMICOLON>$<SEMICOLON>2$<SEMICOLON>$<SEMICOLON>3>")
 | 
			
		||||
@ -36,6 +36,7 @@ run_cmake(TARGET_NAME_IF_EXISTS-alias-target)
 | 
			
		||||
run_cmake(TARGET_NAME_IF_EXISTS-imported-target)
 | 
			
		||||
run_cmake(TARGET_NAME_IF_EXISTS-imported-global-target)
 | 
			
		||||
run_cmake(REMOVE_DUPLICATES-empty)
 | 
			
		||||
run_cmake(REMOVE_DUPLICATES-empty-element)
 | 
			
		||||
run_cmake(REMOVE_DUPLICATES-1)
 | 
			
		||||
run_cmake(REMOVE_DUPLICATES-2)
 | 
			
		||||
run_cmake(REMOVE_DUPLICATES-3)
 | 
			
		||||
 | 
			
		||||
@ -737,7 +737,7 @@ class CMakeDomain(Domain):
 | 
			
		||||
 | 
			
		||||
    def get_objects(self):
 | 
			
		||||
        for refname, obj in self.data['objects'].items():
 | 
			
		||||
            yield (refname, obj.name, obj.objtype, obj.docname, obj.node_id, 1)
 | 
			
		||||
            yield (refname, refname, obj.objtype, obj.docname, obj.node_id, 1)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def setup(app):
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user