7¤0ìk`®zA¨"â0333333333“|mD¤¶Ev#Ê·•ÝMì�Ã#û]þ·�!B·­™u`:nÄ`ßö²;µ„¸GÕ@vƒ  	‰H(šè`@™(”Ž%â`”ä8Œ¢BÆc!Ä‘™™   ô•Æ©u
C                   This behavior was removed by CMake 3.28.

.. |CMAKE_SYSTEM_PREFIX_PATH_XXX| replace::
   ``<prefix>/lib/<arch>`` if :variable:`CMAKE_LIBRARY_ARCHITECTURE` is set,
   and |CMAKE_SYSTEM_PREFIX_PATH_XXX_SUBDIR|
.. |CMAKE_SYSTEM_XXX_PATH| replace::
   :variable:`CMAKE_SYSTEM_LIBRARY_PATH`
.. |CMAKE_SYSTEM_XXX_MAC_PATH| replace::
   :variable:`CMAKE_SYSTEM_FRAMEWORK_PATH`

.. |CMAKE_FIND_ROOT_PATH_MODE_XXX| replace::
   :variable:`CMAKE_FIND_ROOT_PATH_MODE_LIBRARY`

.. include:: include/FIND_XXX.rst

When more than one value is given to the ``NAMES`` option this command by
default will consider one name at a time and search every directory
for it.  The ``NAMES_PER_DIR`` option tells this command to consider one
directory at a time and search for asconnected)
      set(comment_disconnected "${comment}")
    endif()
    set(__cmdQuoted)
    foreach(__item IN LISTS cmd_disconnected)
      string(APPEND __cmdQuoted " [==[${__item}]==]")
    endforeach()

    cmake_language(EVAL CODE "
      ExternalProject_Add_Step(${name} update_disconnected
        INDEPENDENT TRUE
        COMMENT \${comment_disconnected}
        COMMAND ${__cmdQuoted}
        WORKING_DIRECTORY \${work_dir}
        DEPENDEES download
        DEPENDS \${file_deps}
        ${log}
        ${uses_terminal}
      )"
    )
  endif()

endfunction()


function(_ep_add_patch_command name)
  set(noValueOptions )
  set(singleValueOptions
    SCRIPT_FILE        # These should only be used by FetchContent
  )
  set(multiValueOptions )
  cmake_parse_arguments(PARSE_ARGV 1 arg
    "${noValueOptions}" "${singleValueOptions}" "${multiValueOptions}"
  )

  # The various _EP_... variables mentioned here and throughout this function
  # are expected to already have been set by the caller via a call to
  # _ep_parse_arguments() or ep_parse_arguments_to_vars(). Other variables
  # with different names are assigned to for historical reasons only to keep
  # the code more readable and minimize change.

  set(source_dir "${_EP_SOURCE_DIR}")
  set(stamp_dir  "${_EP_STAMP_DIR}")

  set(cmd "${_EP_PATCH_COMMAND}")
  set(step_script_contents "")

  set(work_dir)
  if(DEFINED _EP_PATCH_COMMAND)
    set(work_dir ${source_dir})
    if(arg_SCRIPT_FILE)
      _ep_add_script_commands(
        step_script_contents
        "${work_dir}"
        "${cmd}"   # Must be a single quoted argument
      )
    endif()
  endif()

  # We use configure_file() to write the patch_info_file so that the file's
  # timestamp is not updated if we don't change the contents
  set(patch_info_file ${stamp_dir}/${name}-patch-info.txt)
  configure_file(
    "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/PatchInfo.txt.in"
    "${patch_info_file}"
    @ONLY
  )

  if(arg_SCRIPT_FILE)
    set(step_name patch)
    cFILE> -Wp,-MT,<DEP_TARGET> -Wp,-MF,<DEP_FILE>")

  set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,")
  set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")

  if("${lang}" STREQUAL "CXX")
    set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}")
    if(CMAKE_${lang}_COMPILER_ARG1)
      separate_arguments(_COMPILER_ARGS NATIVE_COMMAND "${CMAKE_${lang}_COMPILER_ARG1}")
      list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND ${_COMPILER_ARGS})
      unset(_COMPILER_ARGS)
    endif()
    list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-Wp,-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
  endif()
endmacro()
include(Compiler/OrangeC)
include(Compiler/CMakeCommonCompilerMacros)

set(_ORANGEC_COMPILE_CXX " -x c++")
set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)

set(CMAKE_CXX_OUTPUT_EXTENSION ".o")
set(CMAKE_CXX_VERBOSE_FLAG "-yyyyy")



#- OrangeC is a little lax when accepting compiler version specifications.
#  Usually changing the version only changes the value of __cplusplus.
#  Also we don't support CXX98
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=c++11")
set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)

set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=c++14")
set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)

set(CMAKE_CXX_STANDARD_LATEST 14)

if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0")
  set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++17")
  set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=c++17")
  set(CMAKE_CXX17_STANDARD__HAS_FULL_SUPPORT ON)

  set(CMAKE_CXX_STANDARD_LATEST 17)
endif()

__compiler_orangec(CXX)
#- 6.38 is the earliest version which version info is available in the preprocessor
__compiler_check_default_language_standard(CXX 6.38 14)
include(Compiler/PathScale)
__compiler_pathscale(C)
string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT "_OPTION "-std=c11")
  set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)

  set(CMAKE_C_STANDARD_LATEST 11)
elseif (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.11)
  set(CMAKE_C90_STANDARD_COMPILE_OPTION "")
  set(CMAKE_C90_EXTENSION_COMPILE_OPTION "")
  set(CMAKE_C99_STANDARD_COMPILE_OPTION "-xc99")
  set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-xc99")

  set(CMAKE_C_STANDARD_LATEST 99)
endif()

__compiler_check_default_language_standard(C 5.11 90 5.14 11)

if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.15)
  set(CMAKE_C_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
endif()

set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")

set(testable_features
  cxx_alias_templates
  cxx_alignas
  cxx_attributes
  cxx_auto_type
  cxx_binary_literals
  cxx_constexpr
  cxx_contextual_conversions
  cxx_decltype
  cxx_default_function_template_args
  cxx_defaulted_functions
  cxx_delegating_constructors
  cxx_deleted_functions
  cxx_explicit_conversions
  cxx_generalized_initializers
  cxx_inheriting_constructors
  cxx_lambdas
  cxx_local_type_template_args
  cxx_noexcept
  cxx_nonstatic_member_init
  cxx_nullptr
  cxx_range_for
  cxx_raw_string_literals
  cxx_reference_qualified_functions
  cxx_relaxed_constexpr
  cxx_return_type_deduction
  cxx_rvalue_references
  cxx_static_assert
  cxx_strong_enums
  cxx_thread_local
  cxx_unicode_literals
  cxx_unrestricted_unions
  cxx_user_literals
  cxx_variable_templates
  cxx_variadic_templates
)
if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
  list(APPEND testable_features cxx_decltype_incomplete_return_types)
endif()

foreach(feature ${testable_features})
  set(_cmake_feature_test_${feature} "${_cmake_oldestSupported} && __has_feature(${feature})")
endforeach()

unset(testable_features)

set(_cmake_feature_test_cxx_aggregate_default_initiadif()

mark_as_advanced(
CMAKE_VERBOSE_MAKEFILE
)

set(CMAKE_OBJCXX_USE_LINKER_INFORMATION TRUE)

set(CMAKE_OBJCXX_INFORMATION_LOADED 1)
include(Compiler/GNU)
__compiler_gnu(OBJC)
__compiler_gnu_c_standards(OBJC)


if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
    AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
    AND CMAKE_DEPFILE_FLAGS_OBJC)
  # dependencies are computed by the compiler itself
  set(CMAKE_OBJC_DEPFILE_FORMAT gcc)
  set(CMAKE_OBJC_DEPENDS_USE_COMPILER TRUE)
endif()

set(_compiler_id_pp_test "defined(__NVCOMPILER)")

set(_compiler_id_version_compute "
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__NVCOMPILER_MAJOR__)
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__NVCOMPILER_MINOR__)
# if defined(__NVCOMPILER_PATCHLEVEL__)
#  define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__NVCOMPILER_PATCHLEVEL__)
# endif")
# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.

# This module is shared by multiple languages; use include blocker.
include_guard()

set(CMAKE_LIBRARY_PATH_FLAG "libpath ")
set(CMAKE_LINK_LIBRARY_FLAG "library ")
set(CMAKE_LINK_LIBRARY_FILE_FLAG "library ")
set(CMAKE_LINK_OBJECT_FILE_FLAG "file ")

if(CMAKE_VERBOSE_MAKEFILE)
  set(CMAKE_WCL_QUIET)
  set(CMAKE_WLINK_QUIET)
  set(CMAKE_LIB_QUIET)
else()
  set(CMAKE_WCL_QUIET "-zq")
  set(CMAKE_WLINK_QUIET "option quiet")
  set(CMAKE_LIB_QUIET "-q")
endif()

foreach(type CREATE_SHARED_LIBRARY CREATE_SHARED_MODULE LINK_EXECUTABLE)
  set(CMAKE_C_${type}_USE_WATCOM_QUOTE 1)
  set(CMAKE_CXX_${type}_USE_WATCOM_QUOTE 1)
endforeach()

foreach(type SHARED MODULE EXE)
  # linker map file creation directives
  string(APPEND CMAKE_${type}_LINKER_FLAGS_INIT " opt map")
  # linker debug directives
  string(APPEND CMAKE_${type}_LINKER_FLAGS_DEBUG_INIT " debug all")
  string(APPEND CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO_INIT " debug all")
endforeach()

foreach(lang C CXX)
  already.  In other words, if plugins are passed to
  :command:`fixup_bundle` command as its ``<libs>`` parameter, they should
  be installed or copied into the bundle before calling the
  :command:`fixup_bundle` command.

  Also, it changes the id of the item being fixed up to its own
  ``_EMBEDDED_ITEM`` value.

  Changes are accumulated in a local variable and *one* call is made to
  ``install_name_tool`` command-line tool at the end of this command with
  all the changes at once.

  The arguments are:

  ``<resolved-embedded-item>``
    The bundle item to be fixed up.

  ``<exepath>``
    The path to the top level executable used for ``@executable_path``
    replacement on Apple operating systems.

  ``<dirs>``
    A list of paths where libraries might be found.  These paths are searched
    first when a target without any path info is given.  Then standard system
    locations are also searched: ``PATH``, Framework locations, ``/usr/lib``,
    etc.

  The following variables can be set before invoking this command:

  ``BU_CHMOD_BUNDLE_ITEMS``
    If this variable is set to boolean true value then bundle items will be
    marked writable before ``install_name_tool`` tool tries to change them.

.. command:: verify_bundle_prerequisites

  Verifies that the sum of all prerequisites of all files inside the
  bundle are contained within the bundle or are ``system`` libraries,
  presumed to exist everywhere:

  .. code-block:: cmake

    verify_bundle_prerequisites(
      <bundle>
      <result-var>
      <info-var>
      [IGNORE_ITEM <files>...]
    )

  The arguments are:

  ``<bundle>``
    Name of the bundle being verified.

  ``<result-var>``
    Name of the variable in which to store a boolean result of whether a
    verification was successful.

  ``<info-var>``
    Name of the variable holding any informational messages produced by the
    verification.

  ``IGNORE_ITEM <files>...``
    .. versionadded:: 3.6

    Optional list of file names to ignore
    (e.
    "If this project generates any files for use by external projects, "
    "remove any use of the CMakeImportBuildSettings module from them.")
endif()

# This macro used to store build settings of a project in a file to be
# loaded by another project using CMAKE_IMPORT_BUILD_SETTINGS.  Now it
# creates a file that refuses to load (with comment explaining why).
macro(CMAKE_EXPORT_BUILD_SETTINGS SETTINGS_FILE)
  if(NOT ${SETTINGS_FILE} STREQUAL "")
    configure_file(${CMAKE_ROOT}/Modules/CMakeBuildSettings.cmake.in
                   ${SETTINGS_FILE} @ONLY)
  else()
    message(SEND_ERROR "CMAKE_EXPORT_BUILD_SETTINGS called with no argument.")
  endif()
endmacro()
set(@var@_KEYS "@keys@")@code@
# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.

#[=======================================================================[.rst:
FindosgDB
---------

Finds the osgDB library from the OpenSceneGraph toolkit.

.. note::

  In most cases, it's recommended to use the :module:`FindOpenSceneGraph` module
  instead and list osgDB as a component.  This will automatically handle
  dependencies such as the OpenThreads and core osg libraries:

  .. code-block:: cmake

    find_package(OpenSceneGraph COMPONENTS osgDB)

This module is used internally by :module:`FindOpenSceneGraph` to find the
osgDB library.  It is not intended to be included directly during typical
use of the :command:`find_package` command.  However, it is available as a
standalone module for advanced use cases where finer control over detection is
needed.  For example, to find the osgDB explicitly or bypass automatic
component detection:

.. code-block:: cmake

  find_package(osgDB)

OpenSceneGraph and osgDB headers are intended to be included in C++ project
source code as:

.. code-block:: c++
  :caption: ``example.cxx``

  #include <osg/PositionAttitudeTransform>
  #include <osgDB/DatabasePager>
  // ...

When working withr used by NVCC")
  else()
    set(CUDA_HOST_COMPILER "${CMAKE_C_COMPILER}"
      CACHE FILEPATH "Host side compiler used by NVCC")
  endif()
endif()

# Propagate the host flags to the host compiler via -Xcompiler
option(CUDA_PROPAGATE_HOST_FLAGS "Propagate C/CXX_FLAGS and friends to the host compiler via -Xcompile" ON)

# Enable CUDA_SEPARABLE_COMPILATION
option(CUDA_SEPARABLE_COMPILATION "Compile CUDA objects with separable compilation enabled.  Requires CUDA 5.0+" OFF)

# Specifies whether the commands used when compiling the .cu file will be printed out.
option(CUDA_VERBOSE_BUILD "Print out the commands run while compiling the CUDA source file.  With the Makefile generator this defaults to VERBOSE variable specified on the command line, but can be forced on with this option." OFF)

mark_as_advanced(
  CUDA_64_BIT_DEVICE_CODE
  CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE
  CUDA_GENERATED_OUTPUT_DIR
  CUDA_HOST_COMPILATION_CPP
  CUDA_NVCC_FLAGS
  CUDA_PROPAGATE_HOST_FLAGS
  CUDA_BUILD_CUBIN
  CUDA_BUILD_EMULATION
  CUDA_VERBOSE_BUILD
  CUDA_SEPARABLE_COMPILATION
  )

# Single config generators like Makefiles or Ninja don't usually have
# CMAKE_CONFIGURATION_TYPES defined (but note that it can be defined if set by
# projects or developers). Even CMAKE_BUILD_TYPE might not be defined for
# single config generators (and should not be defined for multi-config
# generators). To ensure we get a complete superset of all possible
# configurations, we combine CMAKE_CONFIGURATION_TYPES, CMAKE_BUILD_TYPE and
# all of the standard configurations, then weed out duplicates with
# list(REMOVE_DUPLICATES). Looping over the unique set then ensures we have
# each configuration-specific set of nvcc flags defined and marked as advanced.
set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo)
list(REMOVE_DUPLICATES CUDA_configuration_types)

###############################################################################
######r.
  * ``STANDARD``: The virtual environment is not used to look-up for the
    interpreter but environment variable ``PATH`` is always considered.
    In this case, variable ``Python2_FIND_REGISTRY`` (Windows) or
    ``CMAKE_FIND_FRAMEWORK`` (macOS) can be set with value ``LAST`` or
    ``NEVER`` to select preferably the interpreter from the virtual
    environment.

  .. versionadded:: 3.17
    Added support for ``conda`` environments.

  .. note::

    If the component ``Development`` is requested (or one of its
    sub-components) and is not found or the wrong artifacts are returned,
    including also the component ``Interpreter`` may be helpful.

``Python2_FIND_IMPLEMENTATIONS``
  .. versionadded:: 3.18

  This variable defines, in an ordered list, the different implementations
  which will be searched. The ``Python2_FIND_IMPLEMENTATIONS`` variable can
  hold the following values:

  * ``CPython``: this is the standard implementation. Various products, like
    ``Anaconda`` or ``ActivePython``, rely on this implementation.
  * ``IronPython``: This implementation use the ``CSharp`` language for
    ``.NET Framework`` on top of the `Dynamic Language Runtime` (``DLR``).
    See `IronPython <https://ironpython.net>`_.
  * ``PyPy``: This implementation use ``RPython`` language and
    ``RPython translation toolchain`` to produce the python interpreter.
    See `PyPy <https://pypy.org>`_.

  The default value is:

  * Windows platform: ``CPython``, ``IronPython``
  * Other platforms: ``CPython``

  .. note::

    This hint has the lowest priority of all hints, so even if, for example,
    you specify ``IronPython`` first and ``CPython`` in second, a python
    product based on ``CPython`` can be selected because, for example with
    ``Python2_FIND_STRATEGY=LOCATION``, each location will be search first for
    ``IronPython`` and second for ``CPython``.

  .. note::

    When ``IronPython`` is specified, on platforms other than ``Windows``, the
    ``.Net`` interpL_ERROR
      "Error running test executable.\n"
      "  Path: '${path}'\n"
      "  Working directory: '${arg_TEST_WORKING_DIR}'\n"
      "  Timeout: '${arg_TEST_DISCOVERY_TIMEOUT}'\n"
      "  Result: ${result}\n"
      "  Output:\n"
      "    ${output}\n"
    )
  endif()

  if(EXISTS "${json_file}")
    parse_tests_from_json("${json_file}" write_test_to_file)
  else()
    # gtest < 1.8.1, and all gtest compiled with GTEST_HAS_FILE_SYSTEM=0, don't
    # recognize the --gtest_output=json option, and issue a warning or error on
    # stdout about it being unrecognized, but still return an exit code 0 for
    # success. All versions report the test list on stdout whether
    # --gtest_output=json is recognized or not.

    # NOTE: Because we are calling a macro, we don't want to pass "output" as
    # an argument because it messes up the contents passed through due to the
    # different escaping, etc. that gets applied. We rely on it picking up the
    # "output" variable we have already set here.
    parse_tests_from_output(write_test_to_file)
  endif()

  if(NOT tests_buffer STREQUAL "")
    list(APPEND tests "${tests_buffer}")
  endif()

  # Create a list of all discovered tests, which users may use to e.g. set
  # properties on the tests
  list(JOIN tests "]==] [==[" tests)
  string(APPEND script "set(${arg_TEST_LIST} [==[${tests}]==])\n")

  # Write remaining content to the CTest script
  file(APPEND "${arg_CTEST_FILE}" "${script}")
endfunction()
# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.


# Use of this file is deprecated, and is here for backwards compatibility with CMake 1.4
# GLU library is now found by FindOpenGL.cmake
#

message(STATUS
  "WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead")

include(${CMAKE_CURRENT_LIST_DIR}/FindOpenGL.cmake)

if (OPENGL_GLU_FOUND)
  set (GLU_LIBRARY ${OPENGL_LIBRARIES})
  set (GLU_INCLUDE_PATH ers to display the component name.  This value can be any
string.

DESCRIPTION is an extended description of the component, used in
graphical installers to give the user additional information about the
component.  Descriptions can span multiple lines using ``\n`` as the
line separator.  Typically, these descriptions should be no more than
a few lines long.

HIDDEN indicates that this component will be hidden in the graphical
installer, so that the user cannot directly change whether it is
installed or not.

REQUIRED indicates that this component is required, and therefore will
always be installed.  It will be visible in the graphical installer,
but it cannot be unselected.  (Typically, required components are
shown grayed out).

DISABLED indicates that this component should be disabled (unselected)
by default.  The user is free to select this component for
installation, unless it is also HIDDEN.

DEPENDS lists the components on which this component depends.  If this
component is selected, then each of the components listed must also be
selected.  The dependency information is encoded within the installer
itself, so that users cannot install inconsistent sets of components.

GROUP names the component group of which this component is a part.  If
not provided, the component will be a standalone component, not part
of any component group.  Component groups are described with the
cpack_add_component_group command, detailed below.

INSTALL_TYPES lists the installation types of which this component is
a part.  When one of these installations types is selected, this
component will automatically be selected.  Installation types are
described with the cpack_add_install_type command, detailed below.

DOWNLOADED indicates that this component should be downloaded
on-the-fly by the installer, rather than packaged in with the
installer itself.  For more information, see the
cpack_configure_downloads command.

ARCHIVE_FILE provides a name for the archive file created by CPack to}\n"
    "This is not supported.  Use Clang directly, or let CMake pick a default."
    )
else()
  _cmake_find_compiler_path(HIP)
endif()

mark_as_advanced(CMAKE_HIP_COMPILER)

# Build a small source file to identify the compiler.
if(NOT CMAKE_HIP_COMPILER_ID_RUN)
  set(CMAKE_HIP_COMPILER_ID_RUN 1)

  include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)

  # We determine the vendor to use the right flags for detection right away.
  # The main compiler identification is still needed below to extract other information.
  list(APPEND CMAKE_HIP_COMPILER_ID_VENDORS NVIDIA Clang)
  set(CMAKE_HIP_COMPILER_ID_VENDOR_REGEX_NVIDIA "nvcc: [^\n]+ Cuda compiler driver")
  set(CMAKE_HIP_COMPILER_ID_VENDOR_REGEX_Clang "(clang version)")
  CMAKE_DETERMINE_COMPILER_ID_VENDOR(HIP "--version")

  if(CMAKE_HIP_COMPILER_ID STREQUAL "NVIDIA")
    # Find the CUDA toolkit to get:
    # - CMAKE_HIP_COMPILER_CUDA_TOOLKIT_VERSION
    # - CMAKE_HIP_COMPILER_CUDA_TOOLKIT_ROOT
    # - CMAKE_HIP_COMPILER_CUDA_LIBRARY_ROOT
    # We save them in CMakeHIPCompiler.cmake.
    # Match arguments with cmake_cuda_architectures_all call.
    include(Internal/CMakeCUDAFindToolkit)
    cmake_cuda_find_toolkit(HIP CMAKE_HIP_COMPILER_CUDA_)

    # If the user set CMAKE_HIP_ARCHITECTURES, validate its value.
    include(Internal/CMakeCUDAArchitecturesValidate)
    cmake_cuda_architectures_validate(HIP)

    if(NOT CMAKE_HIP_HOST_COMPILER AND NOT $ENV{HIPHOSTCXX} STREQUAL "")
      get_filename_component(CMAKE_HIP_HOST_COMPILER $ENV{HIPHOSTCXX} PROGRAM)
      if(NOT EXISTS "${CMAKE_HIP_HOST_COMPILER}")
        message(FATAL_ERROR "Could not find the compiler specified in the environment variable HIPHOSTCXX:\n$ENV{HIPHOSTCXX}.\n${CMAKE_HIP_HOST_COMPILER}")
      endif()
    elseif(CMAKE_HIP_HOST_COMPILER)
      # We get here if CMAKE_HIP_HOST_COMPILER was specified by the user or toolchain file.
      if(IS_ABSOLUTE "${CMAKE_HIP_HOST_COMPILER}")
        # Convert to forward slashes.
        cmake_path(cker.")
else ()
  set (SELF_PACKER_FOR_SHARED_LIB_FLAGS "" CACHE STRING
       "Flags for the shared lib self-packer.")
endif ()

mark_as_advanced(
  SELF_PACKER_FOR_EXECUTABLE_FLAGS
  SELF_PACKER_FOR_SHARED_LIB_FLAGS
)

if(SELF_PACKER_FOR_EXECUTABLE AND SELF_PACKER_FOR_SHARED_LIB)
  set(SelfPackers_FOUND TRUE)
else()
  set(SelfPackers_FOUND FALSE)
endif()
#ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif

#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
#if defined(__CLASSIC_C__)
/* cv-qualifiers did not exist in K&R C */
# define const
# define volatile
#endif

#if !defined(__has_include)
/* If the compiler does not have __has_include, pretend the answer is
   always no.  */
#  define __has_include(x) 0
#endif

@CMAKE_C_COMPILER_ID_CONTENT@

/* Construct the string literal in pieces to prevent the source from
   getting matched.  Store it in a pointer rather than an array
   because some compilers will just produce instructions to fill the
   array rather than assigning a pointer to a static array.  */
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
#ifdef SIMULATE_ID
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
#endif

#ifdef __QNXNTO__
char const* qnxnto = "INFO" ":" "qnxnto[]";
#endif

#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
#endif

@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
@CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@

#define C_STD_99 199901L
#define C_STD_11 201112L
#define C_STD_17 201710L
#define C_STD_23 202311L

#if defined(__STDC_VERSION__)
# define C_STD __STDC_VERSION__
#elif defined(__POCC_STDC_VERSION__)
# define C_STD __POCC_STDC_VERSION__
#elif defined(__STDC__) || defined(__clang__) || defined(_MSC_VER) ||         \
  defined(__ibmxl__) || defined(__IBMC__) || defined(__RENESAS__)
# define C_STD 1
#endif

#if !defined(C_STD)
# define C_VERSION
#elif C_STD > C_STD_17
# define C_VERSION "23"
#elif C_STD > C_STD_11
# defis.


# This file contains common code blocks used by all the language information
# files

# load any compiler-wrapper specific information
macro(__cmake_include_compiler_wrapper lang)
  set(_INCLUDED_WRAPPER_FILE 0)
  if (CMAKE_${lang}_COMPILER_ID)
    include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
  endif()
  if (NOT _INCLUDED_WRAPPER_FILE)
    include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
  endif ()

  # No platform - wrapper - lang information so maybe there's just wrapper - lang information
  if(NOT _INCLUDED_WRAPPER_FILE)
    if (CMAKE_${lang}_COMPILER_ID)
      include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
    endif()
    if (NOT _INCLUDED_WRAPPER_FILE)
      include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
    endif ()
  endif ()
endmacro ()
# This is a basic version file for the Config-mode of find_package().
# It is used by write_basic_package_version_file() as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
# The variable CVF_VERSION must be set before calling configure_file().

set(PACKAGE_VERSION "@CVF_VERSION@")

if (PACKAGE_FIND_VERSION_RANGE)
  # Package version must be in the requested version range
  if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
      OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PAC files returning an exit code
  can be used as well (0 indicating a success).

  This command requires the component ``MAIN_PROGRAM`` and hence is not
  available for an MCR installation.

  The unit test uses the MATLAB unittest framework (default, available
  starting MATLAB 2013b+) except if the option ``NO_UNITTEST_FRAMEWORK``
  is given.

  The command expects one MATLAB test script file to be given.
  In the case ``NO_UNITTEST_FRAMEWORK`` is given, the unittest script file
  should contain the script to be run, plus an exit command with the exit
  value.  This exit value will be passed to the ctest framework (0 success,
  non 0 failure).  Additional arguments accepted by :command:`add_test` can
  be passed through ``TEST_ARGS`` (e.g. ``CONFIGURATIONS <config> ...``).

  The arguments are:

  ``NAME <name>``
    The name of the unittest in ctest.

  ``UNITTEST_FILE <matlab-file-containing-unittest.m>``
    The MATLAB unittest file.  Its path will be automatically added to the
    MATLAB path.

  ``CUSTOM_TEST_COMMAND <matlab-command-to-run-as-test>``
    MATLAB script command to run as the test.
    If this is not set, then the following is run:
    ``runtests('matlab_file_name'), exit(max([ans(1,:).Failed]))`` where
    ``matlab_file_name`` is the ``UNITTEST_FILE`` without the extension.

  ``UNITTEST_PRECOMMAND <matlab-command-to-run>``
    MATLAB script command to be ran before the file
    containing the test (e.g. GPU device initialization based on CMake
    variables).

  ``TIMEOUT <timeout>``
    The test timeout in seconds.  Defaults to 180 seconds as the
    MATLAB unit test may hang.

  ``ADDITIONAL_PATH <paths>...``
    A list of paths to add to the MATLAB path prior to running the unit
    test.

  ``MATLAB_ADDITIONAL_STARTUP_OPTIONS <options>``
    A list of additional option in order to run MATLAB from the command
    line.  The ``-nosplash``, ``-nodesktop``, and ``-nodisplay`` options
    are always added automatically.

  ``TEST_ARGS <args>..."wxWidgets-${version}.${patch}")
      foreach(tweak RANGE 3 1 -1)
        list(APPEND wx_paths "wxWidgets-${version}.${patch}.${tweak}")
      endforeach()
    endforeach()
  endforeach()

  # Look for an installation tree.
  find_path(wxWidgets_ROOT_DIR
    NAMES include/wx/wx.h
    PATHS
      ENV wxWidgets_ROOT_DIR
      ENV WXWIN
      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno Setup: App Path]"  # WX 2.6.x
      C:/
      D:/
      ENV ProgramFiles
    PATH_SUFFIXES
      ${wx_paths}
    DOC "wxWidgets base/installation directory"
    )

  # If wxWidgets_ROOT_DIR changed, clear lib dir.
  if(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR)
    if(NOT wxWidgets_LIB_DIR OR WX_ROOT_DIR)
      set(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND"
          CACHE PATH "Cleared." FORCE)
    endif()
    set(WX_ROOT_DIR ${wxWidgets_ROOT_DIR}
        CACHE INTERNAL "wxWidgets_ROOT_DIR")
  endif()

  if(WX_ROOT_DIR)
    # Select one default tree inside the already determined wx tree.
    # Prefer static/shared order usually consistent with build
    # settings.
    set(_WX_TOOL "")
    set(_WX_TOOLVER "")
    set(_WX_ARCH "")
    if(MINGW)
      set(_WX_TOOL gcc)
    elseif(MSVC)
      set(_WX_TOOL vc)
      set(_WX_TOOLVER ${MSVC_TOOLSET_VERSION})
      # support for a lib/vc14x_x64_dll/ path from wxW 3.1.3 distribution
      string(REGEX REPLACE ".$" "x" _WX_TOOLVERx ${_WX_TOOLVER})
      if(CMAKE_SIZEOF_VOID_P EQUAL 8)
        set(_WX_ARCH _x64)
      endif()
    endif()
    if(BUILD_SHARED_LIBS)
      find_path(wxWidgets_LIB_DIR
        NAMES
          qtu/wx/setup.h
          qtud/wx/setup.h
          msw/wx/setup.h
          mswd/wx/setup.h
          mswu/wx/setup.h
          mswud/wx/setup.h
          mswuniv/wx/setup.h
          mswunivd/wx/setup.h
          mswunivu/wx/setup.h
          mswunivud/wx/setup.h
        PATHS
        ${WX_ROOT_DIR}/lib/${_WX_TOOL}${_WX_TOOLVER}_xp${_WX_ARCH}_dll   # prefer shared
   ame} PROPERTY ${CUDA_IMPORT_PROPERTY} "${CUDA_${lib_name}_LIBRARY}")
      foreach(dep ${arg_DEPS})
        if(TARGET CUDA::${dep})
          target_link_libraries(CUDA::${lib_name} INTERFACE CUDA::${dep})
        endif()
      endforeach()
      if(arg_EXTRA_INCLUDE_DIRS)
        target_include_directories(CUDA::${lib_name} SYSTEM INTERFACE "${arg_EXTRA_INCLUDE_DIRS}")
      endif()
    endif()
  endfunction()

  if(NOT TARGET CUDA::toolkit)
    add_library(CUDA::toolkit IMPORTED INTERFACE)
    target_include_directories(CUDA::toolkit SYSTEM INTERFACE "${CUDAToolkit_INCLUDE_DIRS}")
    target_link_directories(CUDA::toolkit INTERFACE "${CUDAToolkit_LIBRARY_DIR}")
  endif()

  # setup dependencies that are required for cudart/cudart_static when building
  # on linux. These are generally only required when using the CUDA toolkit
  # when CUDA language is disabled
  if(NOT TARGET CUDA::cudart_static_deps)
    add_library(CUDA::cudart_static_deps IMPORTED INTERFACE)
    if(UNIX AND (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED))
      find_package(Threads REQUIRED)
      target_link_libraries(CUDA::cudart_static_deps INTERFACE Threads::Threads ${CMAKE_DL_LIBS})
    endif()

    if(UNIX AND NOT APPLE AND NOT (CMAKE_SYSTEM_NAME STREQUAL "QNX"))
      # On Linux, you must link against librt when using the static cuda runtime.
      find_library(CUDAToolkit_rt_LIBRARY rt)
      mark_as_advanced(CUDAToolkit_rt_LIBRARY)
      if(NOT CUDAToolkit_rt_LIBRARY)
        message(WARNING "Could not find librt library, needed by CUDA::cudart_static")
      else()
        target_link_libraries(CUDA::cudart_static_deps INTERFACE ${CUDAToolkit_rt_LIBRARY})
      endif()
    endif()
  endif()

  _CUDAToolkit_find_and_add_import_lib(cuda_driver ALT cuda DEPS cudart_static_deps)
  _CUDAToolkit_find_and_add_import_lib(cudart DEPS cudart_static_deps)
  _CUDAToolkit_find_and_add_import_lib(cudart_static DEPS cudart_static_deps)

  if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 12.0.0)
NUOBJCXX 1)
  endif()
  if(CMAKE_OBJCXX_COMPILER_ID MATCHES "Clang")
    set(CMAKE_COMPILER_IS_CLANGOBJCXX 1)
  endif()
endif()

if (NOT _CMAKE_TOOLCHAIN_LOCATION)
  get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_OBJCXX_COMPILER}" PATH)
endif ()

# if we have a g++ cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++ , optionally
# with a 3-component version number at the end (e.g. arm-eabi-gcc-4.5.2).
# The other tools of the toolchain usually have the same prefix
# NAME_WE cannot be used since then this test will fail for names like
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"


if (NOT _CMAKE_TOOLCHAIN_PREFIX)

  if("${CMAKE_OBJCXX_COMPILER_ID}" MATCHES "GNU|Clang|QCC")
    get_filename_component(COMPILER_BASENAME "${CMAKE_OBJCXX_COMPILER}" NAME)
    if (COMPILER_BASENAME MATCHES "^(.+-)(clan)?[gc]\\+\\+(-[0-9]+(\\.[0-9]+)*)?(-[^.]+)?(\\.exe)?$")
      set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
      set(_CMAKE_COMPILER_SUFFIX ${CMAKE_MATCH_5})
    elseif("${CMAKE_OBJCXX_COMPILER_ID}" MATCHES "Clang")
      if(CMAKE_OBJCXX_COMPILER_TARGET)
        set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_OBJCXX_COMPILER_TARGET}-)
      endif()
    elseif(COMPILER_BASENAME MATCHES "QCC(\\.exe)?$")
      if(CMAKE_OBJCXX_COMPILER_TARGET MATCHES "gcc_nto([a-z0-9]+_[0-9]+|[^_le]+)(le)")
        set(_CMAKE_TOOLCHAIN_PREFIX nto${CMAKE_MATCH_1}-)
      endif()
    endif ()

    # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
    # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
    if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
      set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
    endif ()
  endif()

endif ()

set(_CMAKE_PROCESSING_LANGUAGE "OBJCXX")
include(CMakeFindBinUtils)
include(Compiler/${CMAKE_OBJCXX_COMPILER_ID}-FindBinUtils OPTIONAL)
unset(_CMxes>...]
      [SRC_EXT <extension>]
    )

  This command checks once that the source supplied in ``<code>`` can be
  compiled (and linked into an executable).  The result of the check is
  stored in the internal cache variable specified by ``<variable>``.

  The arguments are:

  ``<code>``
    Fortran source code to check.  This must be an entire program, as
    written in a file containing the body block.  All symbols used in the
    source code are expected to be declared as usual in their corresponding
    headers.

  ``<variable>``
    Variable name of an internal cache variable to store the result of the
    check, with boolean true for success and boolean false for failure.

  ``FAIL_REGEX <regexes>...``
    If this option is provided with one or more regular expressions, then
    failure is determined by checking if anything in the compiler output
    matches any of the specified regular expressions.

  ``SRC_EXT <extension>``
    .. versionadded:: 3.7

    By default, the test source file used for the check will be given a
    ``.F`` file extension.  This option can be used to override this with
    ``.<extension>`` instead - ``.F90`` is a typical choice.

  .. rubric:: Variables Affecting the Check

  The following variables may be set before calling this command to modify
  the way the check is run:

  .. include:: /module/include/CMAKE_REQUIRED_FLAGS.rst

  .. include:: /module/include/CMAKE_REQUIRED_DEFINITIONS.rst

  .. include:: /module/include/CMAKE_REQUIRED_INCLUDES.rst

  .. include:: /module/include/CMAKE_REQUIRED_LINK_OPTIONS.rst

  .. include:: /module/include/CMAKE_REQUIRED_LIBRARIES.rst

  .. include:: /module/include/CMAKE_REQUIRED_LINK_DIRECTORIES.rst

  .. include:: /module/include/CMAKE_REQUIRED_QUIET.rst

  .. include:: /module/include/CMAKE_TRY_COMPILE_TARGET_TYPE.rst

Examples
^^^^^^^^

Checking whether the Fortran compiler supports the ``pure`` procedure
attribute:

.. code-block:: cmake

  include(CheckFortranSourceCompiles)

  chPlatform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
endif()

# This should be included before the _INIT variables are
# used to initialize the cache.  Since the rule variables
# have if blocks on them, users can still define them here.
# But, it should still be after the platform file so changes can
# be made to those values.

if(CMAKE_USER_MAKE_RULES_OVERRIDE)
  # Save the full path of the file so try_compile can use it.
  include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
  set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
endif()

if(CMAKE_USER_MAKE_RULES_OVERRIDE_ASM)
  # Save the full path of the file so try_compile can use it.
  include(${CMAKE_USER_MAKE_RULES_OVERRIDE_ASM} RESULT_VARIABLE _override)
  set(CMAKE_USER_MAKE_RULES_OVERRIDE_ASM "${_override}")
endif()

# Set default assembler file extensions:
if(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
  set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)
endif()


# Support for CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT and friends:
set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT "$ENV{ASM${ASM_DIALECT}FLAGS} ${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}")

cmake_initialize_per_config_variable(CMAKE_ASM${ASM_DIALECT}_FLAGS "Flags used by the ASM${ASM_DIALECT} compiler")

if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
  set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>")
endif()

if(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
  set(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY
      "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
      "<CMAKE_RANLIB> <TARGET>")
endif()

if(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
  set(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
    "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
endif()

if(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG)
  set(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED} mpi serialization)
      set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
      set(_Boost_THREAD_DEPENDENCIES chrono atomic)
      set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono atomic)
      set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
    elseif(Boost_VERSION_STRING VERSION_LESS 1.91.0)
      set(_Boost_COBALT_DEPENDENCIES cobalt_io cobalt_io_ssl container context)
      set(_Boost_CONTRACT_DEPENDENCIES thread chrono)
      set(_Boost_COROUTINE_DEPENDENCIES context)
      set(_Boost_FIBER_DEPENDENCIES context)
      set(_Boost_IOSTREAMS_DEPENDENCIES regex)
      set(_Boost_JSON_DEPENDENCIES container)
      set(_Boost_LOG_DEPENDENCIES log_setup filesystem thread regex atomic)
      set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)
      set(_Boost_MPI_DEPENDE# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.

# Function to parse implicit linker options.
#
# This is used internally by CMake and should not be included by user
# code.
#
# Note: this function is leaked/exposed by FindOpenMP and therefore needs
# to have a stable API so projects that copied `FindOpenMP` for backwards
# compatibility don't break.
#
function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj_regex)
  set(keywordArgs)
  set(oneValueArgs LANGUAGE COMPUTE_IMPLICIT_OBJECTS)
  set(multiValueArgs )
  cmake_parse_arguments(EXTRA_PARSE "${keywordArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

  cmake_parse_implicit_link_info2("${text}" "${log_var}" "${obj_regex}"
    COMPUTE_IMPLICIT_LIBS "${lib_var}" COMPUTE_IMPLICIT_DIRS "${dir_var}"
    COMPUTE_IMPLICIT_FWKS "${fwk_var}" ${ARGN})

  set(${lib_var} "${${lib_var}}" PARENT_SCOPE)
  set(${dir_var} "${${dir_var}}" PARENT_SCOPE)
  set(${fwk_var} "${${fwk_var}}" PARENT_SCOPE)
  set(${log_var} "${${log_var}}" PARENT_SCOPE)

  if(EXTRA_PARSE_COMPUTE_OUTPUT)
  unset(__TestCompiler_testCudaCompilerSource)

  if(NOT CMAKE_CUDA_COMPILER_WORKS)
    PrintTestCompilerResult(CHECK_FAIL "broken")
    string(REPLACE "\n" "\n  " _output "${__CMAKE_CUDA_COMPILER_OUTPUT}")
    message(FATAL_ERROR "The CUDA compiler\n  \"${CMAKE_CUDA_COMPILER}\"\n"
      "is not able to compile a simple test program.\nIt fails "
      "with the following output:\n  ${_output}\n\n"
      "CMake will not be able to correctly generate this project.")
  endif()
  PrintTestCompilerResult(CHECK_PASS "works")
endif()

# Try to identify the compiler features
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerSupport.cmake)
CMAKE_DETERMINE_COMPILER_SUPPORT(CUDA)

if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC")
  set(CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES "${CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES}")
  set(CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES "${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES}")
endif()

include(Internal/CMakeCUDAFilterImplicitLibs)
# Filter out implicit link libraries that should not be passed unconditionally.
cmake_cuda_filter_implicit_libs(CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES)

if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA")
  include(Internal/CMakeNVCCFilterImplicitInfo)
  # Match arguments with cmake_nvcc_parse_implicit_info call in CMakeDetermineCUDACompiler.
  cmake_nvcc_filter_implicit_info(CUDA CMAKE_CUDA_)
endif()

# Re-configure to save learned information.
configure_file(
  ${CMAKE_ROOT}/Modules/CMakeCUDACompiler.cmake.in
  ${CMAKE_PLATFORM_INFO_DIR}/CMakeCUDACompiler.cmake
  @ONLY
  )
include(${CMAKE_PLATFORM_INFO_DIR}/CMakeCUDACompiler.cmake)

unset(__CMAKE_CUDA_COMPILER_OUTPUT)
# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.


# determine the compiler to use for ASM programs

include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)

cmake_policy(GET CMP0194 _CMAKE_ASM_CMP0194)

if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
  # prefer the en inclusion from an
  Apple-specific ``<PackageName>Config.cmake`` file.

  ``INSTALL_DESTINATION <path>``
    Path to which the generated file will be installed by the caller, e.g.,
    via :command:`install(FILES)`.  The path may be either relative to the
    ``INSTALL_PREFIX`` or absolute.

  ``INSTALL_PREFIX <path>``
    Path prefix to which the package will be installed by the caller.
    The ``<path>`` argument must be an absolute path.  If this argument
    is not passed, the :variable:`CMAKE_INSTALL_PREFIX` variable will be
    used instead.

  ``SINGLE_ARCHITECTURES <arch>...``
    Architectures provided by entries of ``SINGLE_ARCHITECTURE_INCLUDE_FILES``.

  ``SINGLE_ARCHITECTURE_INCLUDE_FILES <file>...``
    Architecture-specific files.  One of them will be loaded
    when :variable:`CMAKE_OSX_ARCHITECTURES` contains a single
    architecture matching the corresponding entry of
    ``SINGLE_ARCHITECTURES``.

  ``UNIVERSAL_ARCHITECTURES <arch>...``
    Architectures provided by the ``UNIVERSAL_INCLUDE_FILE``.

    The list may include ``$(ARCHS_STANDARD)`` to support consumption using
    the :generator:`Xcode` generator, but the architectures should always
    be listed individually too.

  ``UNIVERSAL_INCLUDE_FILE <file>``
    A file to load when :variable:`CMAKE_OSX_ARCHITECTURES` contains
    a (non-strict) subset of the ``UNIVERSAL_ARCHITECTURES`` and
    does not match any one of the ``SINGLE_ARCHITECTURES``.

  ``ERROR_VARIABLE <variable>``
    If the consuming project is built for an unsupported architecture,
    set ``<variable>`` to an error message.  The includer may use this
    information to pretend the package was not found.  If this option
    is not given, the default behavior is to issue a fatal error.

.. _`CMakePackageConfigHelpers Examples`:

Example Generating Package Files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Example using both the :command:`configure_package_config_file` and
:command:`write_basic_package_version_file()` commands:

.. automatically as part of the build phase.

  ``USE_STAMP_FILE``
    .. versionadded:: 3.16

    Enables use of a stamp file to avoid regenerating documentation unless
    source files have changed.

    Stamp file named ``<target-name>.stamp`` is created in the current binary
    directory by an underlying custom command.

    With this option present, all entries in ``<files-or-dirs>`` must be
    existing files (i.e. no directories, symlinks or wildcards) when this
    command is called.  An error is raised if any listed path is invalid.

    Without this option, CMake will re-run Doxygen every time the
    ``<target-name>`` target is built, regardless of whether any input source
    file listed in ``<files-or-dirs>`` has changed.

  ``WORKING_DIRECTORY <dir>``
    By default, the Doxygen working directory is the current source directory
    (:variable:`CMAKE_CURRENT_SOURCE_DIR`).  This aligns with using relative
    input paths.

    Use this option, to change and override the directory where Doxygen is
    being run.  The absolute path ``<dir>`` will then be used as the base
    point for relative paths.

    Note also that Doxygen's default behavior is to strip the working
    directory from relative paths in the generated documentation.  See the
    ``STRIP_FROM_PATH`` config tag in the `Doxygen manual
    <https://www.doxygen.nl/manual/config.html>`_ for more details.

  ``COMMENT <comment>``
    If provided, the ``<comment>`` string will be passed as the ``COMMENT``
    argument to the underlying :command:`add_custom_target` command used to
    create the custom target internally.  This appears in the build system
    output, when the target is built.

  ``CONFIG_FILE <file>``
    .. versionadded:: 3.27

    If specified, the given file provided with full-path will be used as
    Doxygen configuration file instead of the default
    ``Doxyfile.<target-name>``.

  .. rubric:: Variables for customizing Doxygen configuration

  The ``doxygen_add_docs()`` comm.

``OSGQT_LIBRARY``
  A result variable that is set to the same value as the ``OSGQT_LIBRARIES``
  variable.

Cache Variables
^^^^^^^^^^^^^^^

The following cache variables may also be set:

``OSGQT_INCLUDE_DIR``
  The include directory containing headers needed to use osgQt.

``OSGQT_LIBRARY_DEBUG``
  The path to the osgQt debug library.

Hints
^^^^^

This module accepts the following variables:

``OSGDIR``
  Environment variable that can be set to help locate the OpenSceneGraph
  toolkit, including its osgQt library, when installed in a custom
  location.  It should point to the OpenSceneGraph installation prefix used when
  it was configured, built, and installed: ``./configure --prefix=$OSGDIR``.

Deprecated Variables
^^^^^^^^^^^^^^^^^^^^

The following variables are provided for backward compatibility:

``OSGQT_FOUND``
  .. deprecated:: 4.2
    Use ``osgQt_FOUND``, which has the same value.

  Boolean indicating whether the osgQt library of the OpenSceneGraph toolkit
  was found.

Examples
^^^^^^^^

Finding osgQt explicitly with this module and creating an interface
:ref:`imported target <Imported Targets>` that encapsulates its usage
requirements for linking it to a project target:

.. code-block:: cmake

  find_package(osgQt)

  if(osgQt_FOUND AND NOT TARGET osgQt::osgQt)
    add_library(osgQt::osgQt INTERFACE IMPORTED)
    set_target_properties(
      osgQt::osgQt
      PROPERTIES
        INTERFACE_INCLUDE_DIRECTORIES "${OSGQT_INCLUDE_DIR}"
        INTERFACE_LINK_LIBRARIES "${OSGQT_LIBRARIES}"
    )
  endif()

  target_link_libraries(example PRIVATE osgQt::osgQt)

See Also
^^^^^^^^

* The :module:`FindOpenSceneGraph` module to find OpenSceneGraph toolkit.
#]=======================================================================]

# Created by Eric Wing.
# Modified to work with osgQt by Robert Osfield, January 2012.

include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH   (OSGQT osgQt/GraphicsWindowQt)
OSG_FIND_LIBRARY(OSGQT osgQt)

incl[.rst:
FindEXPAT
---------

Finds the native Expat headers and library:

.. code-block:: cmake

  find_package(EXPAT [<version>] [...])

Expat is a stream-oriented XML parser library written in C.

Imported Targets
^^^^^^^^^^^^^^^^

This module provides the following :ref:`Imported Targets`:

``EXPAT::EXPAT``
  .. versionadded:: 3.10

  Target encapsulating the Expat library (``expat``) usage requirements.  This
  target is available only if Expat is found.

Result Variables
^^^^^^^^^^^^^^^^

This module defines the following variables:

``EXPAT_FOUND``
  Boolean indicating whether (the requested version of) Expat was found.

``EXPAT_VERSION``
  .. versionadded:: 4.2

  The version of Expat found.

``EXPAT_INCLUDE_DIRS``
  Include directories containing ``expat.h`` and related headers needed to use
  Expat.

``EXPAT_LIBRARIES``
  Libraries needed to link against to use Expat.

Hints
^^^^^

This module accepts the following variables:

``EXPAT_USE_STATIC_LIBS``
  .. versionadded:: 3.28

  Set to ``TRUE`` to use static libraries.

  .. versionadded:: 3.31

    Implemented on non-Windows platforms.

Deprecated Variables
^^^^^^^^^^^^^^^^^^^^

The following variables are provided for backward compatibility:

``EXPAT_VERSION_STRING``
  .. deprecated:: 4.2
    Superseded by the ``EXPAT_VERSION``.

  The version of Expat found.

Examples
^^^^^^^^

Finding Expat library and linking it to a project target:

.. code-block:: cmake

  find_package(EXPAT)
  target_link_libraries(project_target PRIVATE EXPAT::EXPAT)
#]=======================================================================]

cmake_policy(PUSH)
cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_<n>

find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
  pkg_check_modules(PC_EXPAT QUIET expat)
endif()

# Look for the header file.
find_path(EXPAT_INCLUDE_DIR NAMES expat.h HINTS ${PC_EXPAT_INCLUDE_DIRS})

set(EXPAT_NAMES expat expatw)
set(EXPAT_NAMES_DEBUG expatd expatwd)

if(WIN32)
  if(EXPAT_CLUDE_DIR)
    #add the include directory to QT_INCLUDES
    set(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES})
  endif ()

  # Make variables changeable to the advanced user
  mark_as_advanced(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR)
endmacro ()

function(_QT4_QUERY_QMAKE VAR RESULT)
  execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query ${VAR}
    RESULT_VARIABLE return_code
    OUTPUT_VARIABLE output
    OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE)
  if(NOT return_code)
    file(TO_CMAKE_PATH "${output}" output)
    set(${RESULT} ${output} PARENT_SCOPE)
  endif()
endfunction()

function(_QT4_GET_VERSION_COMPONENTS VERSION RESULT_MAJOR RESULT_MINOR RESULT_PATCH)
  string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
  string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
  string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")

  set(${RESULT_MAJOR} ${QT_VERSION_MAJOR} PARENT_SCOPE)
  set(${RESULT_MINOR} ${QT_VERSION_MINOR} PARENT_SCOPE)
  set(${RESULT_PATCH} ${QT_VERSION_PATCH} PARENT_SCOPE)
endfunction()

function(_QT4_FIND_QMAKE QMAKE_NAMES QMAKE_RESULT VERSION_RESULT)
  list(LENGTH QMAKE_NAMES QMAKE_NAMES_LEN)
  if(${QMAKE_NAMES_LEN} EQUAL 0)
    return()
  endif()
  list(GET QMAKE_NAMES 0 QMAKE_NAME)

  get_filename_component(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)

  find_program(QT_QMAKE_EXECUTABLE NAMES ${QMAKE_NAME}
    PATHS
      ENV QTDIR
      "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]"
    PATH_SUFFIXES bin
    DOC "The qmake executable for the Qt installation to use"
  )

  set(major 0)
  if (QT_QMAKE_EXECUTABLE)
    _qt4_query_qmake(QT_VERSION QTVERSION)
    _qt4_get_version_components("${QTVERSION}" major minor patch)
  endif()

  ied for
    compilation, this variable will be set to that compiler.
    If the check detects that no explicit host compiler is needed,
    this variable will be cleared.

    If this variable is already set, its value is preserved only if
    :variable:`CMAKE_<LANG>_COMPILER` is also set.
    Otherwise, the check runs and overwrites
    :variable:`CMAKE_<LANG>_HOST_COMPILER` with a new result.
    Note that :variable:`CMAKE_<LANG>_HOST_COMPILER` documents it should
    not be set without also setting
    :variable:`CMAKE_<LANG>_COMPILER` to a NVCC compiler.

  :variable:`CMAKE_<LANG>_PLATFORM <CMAKE_HIP_PLATFORM>`
    This variable is set to the detected GPU platform when ``<lang>`` is ``HIP``.

    If this variable is already set, its value is always preserved.  Only
    compatible values will be considered for :variable:`CMAKE_<LANG>_COMPILER`.

Examples
^^^^^^^^

The following example checks for the availability of the ``Fortran`` language
and enables it if possible:

.. code-block:: cmake

  include(CheckLanguage)
  check_language(Fortran)
  if(CMAKE_Fortran_COMPILER)
    enable_language(Fortran)
  else()
    message(STATUS "No Fortran support")
  endif()
#]=======================================================================]

include_guard(GLOBAL)

block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0126 NEW)

macro(check_language lang)
  if(NOT DEFINED CMAKE_${lang}_COMPILER)
    set(_desc "Looking for a ${lang} compiler")
    message(CHECK_START "${_desc}")
    file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Check${lang})

    set(_input_variables "set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\")\n")
    get_property(_languages GLOBAL PROPERTY ENABLED_LANGUAGES)
    list(REMOVE_ITEM _languages "NONE")
    if(NOT _languages STREQUAL "")
      string(APPEND _input_variables "set(_CMAKE_CHECK_ENABLED_LANGUAGES \"${_languages}\")\n")
      foreach(l IN LISTS _languages)
        string(APPEND _input_variables
          "set(CMAKE_${l}_COMPILER \"${CMAKE_$.. include:: /module/include/CMAKE_REQUIRED_LINK_DIRECTORIES.rst

  .. include:: /module/include/CMAKE_REQUIRED_QUIET.rst

Examples
^^^^^^^^

Checking if the ``getpwent_r()`` function on Solaris/illumos systems has the
expected prototype:

.. code-block:: cmake

  include(CheckPrototypeDefinition)

  check_prototype_definition(
    getpwent_r
    "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
    "NULL"
    "unistd.h;pwd.h"
    HAVE_SOLARIS_GETPWENT_R
  )
#]=======================================================================]

include_guard(GLOBAL)
include(Internal/CheckCommon)

function(check_prototype_definition _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)

  if (NOT DEFINED ${_VARIABLE})
    if(NOT CMAKE_REQUIRED_QUIET)
      message(CHECK_START "Checking prototype ${_FUNCTION} for ${_VARIABLE}")
    endif()
    set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")

    foreach(_FILE ${_HEADER})
      string(APPEND CHECK_PROTOTYPE_DEFINITION_HEADER
        "#include <${_FILE}>\n")
    endforeach()

    set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
    set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
    set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})

    file(READ ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CheckPrototypeDefinition.c.in _SOURCE)
    string(CONFIGURE "${_SOURCE}" _SOURCE @ONLY)

    cmake_check_common_init_args(_CPD)

    try_compile(${_VARIABLE}
      SOURCE_FROM_VAR CheckPrototypeDefinition.c _SOURCE
      COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
      ${_CPD_ADD_LINK_OPTIONS}
      ${_CPD_ADD_LINK_LIBRARIES}
      CMAKE_FLAGS
        -DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS}
        ${_CPD_EXTRA_CMAKE_ARGUMENTS}
        "${_CPD_INCLUDE_DIRECTORIES}"
        "${_CPD_LINK_DIRECTORIES}"
      )

    if (${_VARIABLE})
      set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
      if(NOT CMAKE_REQUIRED_QUIET)
        message(CHECK_PASS "True")
      endif()
    else ()
    ENAME STREQUAL "rustup")
  get_filename_component(RUSTC_DIR "${CMAKE_Rust_COMPILER}" DIRECTORY)
  set(RUSTUP_PATH "${RUSTC_DIR}/rustup")

  # Fix RUSTUP_HOME in ctest.
  if(RUSTC_FILENAME STREQUAL "rustup" AND NOT "$ENV{CTEST_REAL_HOME}" STREQUAL "" AND "$ENV{RUSTUP_HOME}" STREQUAL "")
    set(ENV{RUSTUP_HOME} "$ENV{CTEST_REAL_HOME}/.rustup")
  endif()

  execute_process(
    COMMAND ${RUSTUP_PATH} which rustc
    OUTPUT_VARIABLE REAL_RUSTC
    OUTPUT_STRIP_TRAILING_WHITESPACE
    RESULT_VARIABLE _rust_result
    )

  if(NOT _rust_result EQUAL 0 OR "${REAL_RUSTC}" STREQUAL "")
    message(FATAL_ERROR "Failed to find path to real rustc")
  endif()

  set_property(CACHE CMAKE_Rust_COMPILER PROPERTY VALUE "${REAL_RUSTC}")
endif()

if(CMAKE_Rust_COMPILER)
  set(CMAKE_Rust_COMPILER_WORKS TRUE)
endif()

configure_file(
  "${CMAKE_ROOT}/Modules/CMakeRustCompiler.cmake.in"
  "${CMAKE_PLATFORM_INFO_DIR}/CMakeRustCompiler.cmake"
  @ONLY)
# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.

#[=======================================================================[.rst:
CheckLinkerFlag
---------------

.. versionadded:: 3.18

This module provides a command to check whether a given link flag is
supported by the compiler.

Load this module in a CMake project with:

.. code-block:: cmake

  include(CheckLinkerFlag)

Commands
^^^^^^^^

This module provides the following command:

.. command:: check_linker_flag

  Checks once whether the compiler supports a given link flag:

  .. code-block:: cmake

    check_linker_flag(<lang> <flag> <variable>)

  This command checks once whether the linker flag ``<flag>`` is accepted
  by the ``<lang>`` compiler without producing a diagnostic message.

  The arguments are:

  ``<lang>``
    The language of the compiler used for the check.  Supported languages are
    ``C``, ``CXX``, ``CUDA``, ``Fortran``, ``HIP``, ``OBJC``, ``OBJCXX``,
    and ``Swift``.

  UAGES_RELEASE "C"
            IMPORTED_LOCATION_RELEASE "${PNG_LIBRARY_RELEASE}")
        endif()
        if(EXISTS "${PNG_LIBRARY_DEBUG}")
          set_property(TARGET PNG::PNG APPEND PROPERTY
            IMPORTED_CONFIGURATIONS DEBUG)
          set_target_properties(PNG::PNG PROPERTIES
            IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
            IMPORTED_LOCATION_DEBUG "${PNG_LIBRARY_DEBUG}")
        endif()
      endif()

      unset(_PNG_COMPILE_DEFINITIONS)
  endif ()

  if (PNG_PNG_INCLUDE_DIR AND EXISTS "${PNG_PNG_INCLUDE_DIR}/png.h")
      file(STRINGS "${PNG_PNG_INCLUDE_DIR}/png.h" png_version_str REGEX "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\".+\"")

      string(REGEX REPLACE "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\"([^\"]+)\".*" "\\1" PNG_VERSION "${png_version_str}")
      set(PNG_VERSION_STRING "${PNG_VERSION}")
      unset(png_version_str)
  endif ()
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PNG
                                  REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR
                                  VERSION_VAR PNG_VERSION)

cmake_policy(POP)
@CHECK_PROTOTYPE_DEFINITION_HEADER@

static void cmakeRequireSymbol(int dummy, ...) {
  (void) dummy;
}

static void checkSymbol(void) {
#ifndef @CHECK_PROTOTYPE_DEFINITION_SYMBOL@
  cmakeRequireSymbol(0, &@CHECK_PROTOTYPE_DEFINITION_SYMBOL@);
#endif
}

@CHECK_PROTOTYPE_DEFINITION_PROTO@ {
  return @CHECK_PROTOTYPE_DEFINITION_RETURN@;
}

#ifdef __CLASSIC_C__
int main() {
  int ac;
  char*av[];
#else
int main(int ac, char *av[]) {
#endif
  checkSymbol();
  if (ac > 1000) {
    return *av[0];
  }
  return 0;
}
set(CMAKE_Java_COMPILER "@CMAKE_Java_COMPILER@")
set(CMAKE_Java_COMPILER_ARG1 "@CMAKE_Java_COMPILER_ARG1@")
set(CMAKE_Java_RUNTIME  "@CMAKE_Java_RUNTIME@")
set(CMAKE_Java_ARCHIVE  "@CMAKE_Java_ARCHIVE@")
set(CMAKE_Java_COMPILER_LOADED 1)

set(CMAKE_Java_SOURCE_FILE_EXTENSIONS java)
set(CMAKE_Java_LINKER_PREFERENCE 40)
set(CMAKE_Java_OUTPUT_EXTENSerly created.  For best compatibility, it's recommended to build on
an old LTS distribution and to include any dependencies in the generated file.

The snippet below can be added to your ``CMakeLists.txt`` file.
Replace ``my_application_target`` with your application target.
The example will do a best effort to identify the libraries your
application links to and copy them to the install location.

.. code-block:: cmake

  install(CODE [[
      file(GET_RUNTIME_DEPENDENCIES
          EXECUTABLES $<TARGET_FILE:my_application_target>
          RESOLVED_DEPENDENCIES_VAR resolved_deps
      )

      foreach(dep ${resolved_deps})
          # copy the symlink
          file(COPY ${dep} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)

          # Resolve the real path of the dependency (follows symlinks)
          file(REAL_PATH ${dep} resolved_dep_path)

          # Copy the resolved file to the destination
          file(COPY ${resolved_dep_path} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
      endforeach()
  ]])

The CPack AppImage generator will generate a default `AppRun`_ based on the
provided ``.desktop`` entry.  Alternatively, if a custom ``AppRun`` is
installed, e.g., via the :command:`install` command, it will be used instead
of the generated one.

.. _`AppRun`: https://docs.appimage.org/introduction/software-overview.html#apprun

For Qt-based projects, it is recommended to call
``qt_generate_deploy_app_script()`` or ``qt_generate_deploy_qml_app_script()``
and install the files generated by the script.  This will install the
Qt plugins.

You must also set :variable:`CPACK_PACKAGE_ICON` with the same value
listed in the Desktop file.

Variables Specific to CPack AppImage Generator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. variable:: CPACK_APPIMAGE_TOOL_EXECUTABLE

  Name of the ``appimagetool`` executable.  If not given as an absolute path,
  logic based on :command:`find_program` will be used internally with this
  value to find the executable.

  :Default: ``a
  elseif(CMAKE_C_COMPILER_ID STREQUAL "SunPro" AND CMAKE_SYSTEM_NAME STREQUAL "SunOS")
    set(CMAKE_C_LINK_GROUP_USING_cross_refs
      "LINKER:-z,rescan-start"
      "LINKER:-z,rescan-end"
    )
  else()
    # feature not yet supported for the other environments
    set(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED FALSE)
  endif()

  add_library(lib1 STATIC ...)
  add_library(lib2 SHARED ...)

  if(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED)
    target_link_libraries(lib2 PRIVATE "$<LINK_GROUP:cross_refs,lib1,external>")
  else()
    target_link_libraries(lib2 PRIVATE lib1 external)
  endif()

CMake will generate the following linker command line fragments when linking
``lib2``:

* ``GNU``: ``-Wl,--start-group /path/to/lib1.a -lexternal -Wl,--end-group``
* ``SunPro``: ``-Wl,-z,rescan-start /path/to/lib1.a -lexternal -Wl,-z,rescan-end``


Predefined Features
^^^^^^^^^^^^^^^^^^^

The following built-in group features are pre-defined by CMake:

.. include:: include/LINK_GROUP_PREDEFINED_FEATURES.rst
The value of this variable should be set prior to the first
:command:`project` or :command:`enable_language` command invocation
because it may influence configuration of the toolchain and flags.
It is intended to be set locally by the user creating a build tree.
This variable should be set as a ``CACHE`` entry (or else CMake may
remove it while initializing a cache entry of the same name) unless
policy :policy:`CMP0126` is set to ``NEW``.

Despite the ``OSX`` part in the variable name(s) they apply also to
other SDKs than macOS like iOS, tvOS, visionOS, or watchOS.

This variable is ignored on platforms other than Apple.

.. include:: ../command/include/LINK_LIBRARIES_LINKER.rst

This support implies to parse and re-quote the content of the variable. See
policy :policy:`CMP0181`.
The components are:

``<major>.<minor>``

  The VS major and minor version numbers.
  These are the same as the release version numbers.

``<date>``

  A build date in the format ``MMMDD``raries that you link to.

The prefix to use for the name of a static library, ``lib`` on UNIX.

``CMAKE_STATIC_LIBRARY_PREFIX_<LANG>`` overrides this for language ``<LANG>``.
CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT
----------------------------------

.. versionadded:: 3.7

This variable is the ``MinSizeRel`` variant of the
:variable:`CMAKE_<LANG>_FLAGS_<CONFIG>_INIT` variable.
CMAKE_COMMAND
-------------

The full path to the :manual:`cmake(1)` executable.

This is the full path to the CMake executable :manual:`cmake(1)` which is
useful from custom commands that want to use the :option:`cmake -E` option for
portable system commands.  (e.g.  ``/usr/local/bin/cmake``)
CMAKE_OBJECT_PATH_MAX
---------------------

Maximum object file full-path length allowed by native build tools.

CMake computes for every source file an object file name that is
unique to the source file and deterministic with respect to the full
path to the source file.  This allows multiple source files in a
target to share the same name if they lie in different directories
without rebuilding when one is added or removed.  However, it can
produce long full paths in a few cases, so CMake shortens the path
using a hashing scheme when the full path to an object file exceeds a
limit.  CMake has a built-in limit for each platform that is
sufficient for common tools, but some native tools may have a lower
limit.  This variable may be set to specify the limit explicitly.  The
value must be an integer no less than 128.
PROJECT_VERSION_PATCH
---------------------

Third version number component of the :variable:`PROJECT_VERSION`
variable as set by the :command:`project` command.
CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH
-------------------------------------

.. versionadded:: 3.16

Controls the default behavior of the following commands for whether or not to
search paths provided by cmake-specific environment variables:

* :command:`find_program`
* :command:`find_library`
* :command:`find_file`
* :command:`find_path`ual:`ctest(1)` :ref:`Dashboard Client` script,
or on the :program:`ctest` command line via the :ctest-dashboard-option:`-D`
option.

Valid part names are the same as those accepted by the ``PARTS`` option of
:command:`ctest_submit`: ``Start``, ``Update``, ``Configure``, ``Build``,
``Test``, ``Coverage``, ``MemCheck``, ``Submit``, ``Notes``, ``ExtraFiles``,
``Upload``, and ``Done``.

If the :command:`ctest_submit` command is given an explicit ``PARTS``
argument, that argument takes precedence and this variable is ignored.

When this variable is empty or unset (and no explicit ``PARTS`` argument is
given), all available parts are submitted (the default behavior).

Example --- submit only the Configure result in a single ``ctest`` invocation::

  ctest -T Configure -T Submit -D CTEST_SUBMIT_PARTS=Configure
CMAKE_MESSAGE_INDENT
--------------------

.. versionadded:: 3.16

The :command:`message` command joins the strings from this list and for
log levels of ``NOTICE`` and below, it prepends the resultant string to
each line of the message.

Example:

.. code-block:: cmake

  list(APPEND listVar one two three)

  message(VERBOSE [[Collected items in the "listVar":]])
  list(APPEND CMAKE_MESSAGE_INDENT "  ")

  foreach(item IN LISTS listVar)
    message(VERBOSE ${item})
  endforeach()

  list(POP_BACK CMAKE_MESSAGE_INDENT)
  message(VERBOSE "No more indent")

Which results in the following output:

.. code-block:: none

  -- Collected items in the "listVar":
  --   one
  --   two
  --   three
  -- No more indent
CMAKE_LINK_DEPENDS_USE_LINKER
-----------------------------

.. versionadded:: 3.27

For the :ref:`Makefile <Makefile Generators>` and
:ref:`Ninja <Ninja Generators>` generators, link dependencies are now, for a
selection of linkers, generated by the linker itself. By defining this
variable with value ``FALSE``, you can deactivate this feature.

This feature is also deactivated if the :prop_tgt:`LINK_DEPENDS_NO_SHARED`
target property is true.

.. note::

  CMak()`` functions
  either in the default library that is implicitly linked (e.g., BSD-like
  systems, Haiku, macOS, SunOS, etc.), or on systems that don't provide these
  functions (e.g., Windows).

Examples
^^^^^^^^

Example: Linking Dynamic Loading Library
""""""""""""""""""""""""""""""""""""""""

Using this variable in a project that uses dynamic loading functionality:

.. code-block:: cmake

  target_link_libraries(example PRIVATE ${CMAKE_DL_LIBS})

Example: Checking Symbols
"""""""""""""""""""""""""

Checking for symbols with the dynamic loading library linked during the check:

.. code-block:: cmake

  include(CheckSymbolExists)
  include(CMakePushCheckState)

  cmake_push_check_state(RESET)
    set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
    check_symbol_exists(dlopen "dlfcn.h" HAVE_DLOPEN)
  cmake_pop_check_state()
CMAKE_COMPILE_WARNING_AS_ERROR
------------------------------

.. versionadded:: 3.24

Specify whether to treat warnings on compile as errors.

This variable is used to initialize the
:prop_tgt:`COMPILE_WARNING_AS_ERROR` property on all the targets.
CMAKE_BUILD_WITH_INSTALL_NAME_DIR
---------------------------------

.. versionadded:: 3.9

Whether to use :prop_tgt:`INSTALL_NAME_DIR` on targets in the build tree.

This variable is used to initialize the :prop_tgt:`BUILD_WITH_INSTALL_NAME_DIR`
property on all targets.
CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG
------------------------------------

.. versionadded:: 3.7.1

When :ref:`Cross Compiling for Android with the NDK`, this variable
provides the NDK's "host tag" used to construct the path to prebuilt
toolchains that run on the host.
CMAKE_<LANG>_STANDARD_LIBRARIES
-------------------------------

.. versionadded:: 3.6

Libraries linked into every executable and shared library linked
for language ``<LANG>``.  This is meant for specification of system
libraries needed by the language for the current platform.

This variable should not be set by project code.  It is meant to be set by
CMake's platfo    (packages are not resolved prior to the build), and "only"
            (packages are resolved, but no build will be performed).
          sphinxDescription: |
            An optional string that specifies the package resolve mode.

            Package references are used to define dependencies to packages from
            external package managers. Currently only NuGet in combination with
            the :ref:`Visual Studio generators` is supported. If there are no
            targets that define package references, this option does nothing.
            Valid values are:

            ``on``
              Causes package references to be resolved before attempting a
              build.

            ``off``
              Package references will not be resolved. Note that this may cause
              errors in some build environments, such as .NET SDK style
              projects.

            ``only``
              Only resolve package references, but do not perform a build.

            .. note::

              The command line parameter
              :cmake-build-option:`--resolve-package-references`
              will take priority over this setting. If the command line
              parameter is not provided and this setting is not specified, an
              environment-specific cache variable will be evaluated to decide,
              if package restoration should be performed.

              When using the :ref:`Visual Studio generators`,
              package  references are defined using the
              :prop_tgt:`VS_PACKAGE_REFERENCES` property. Package references
              are restored using NuGet. It can be disabled by setting the
              :variable:`CMAKE_VS_NUGET_PACKAGE_RESTORE` variable to ``OFF``.
              This can also be done from within a configure preset.
        verbose:
          type: boolean
          description:
            An optional boolean. If true, equivalent to passing --verbose on
            the command line.
  ne of the following values:

  ``default``
    Equivalent to not passing any value on the command line.

  ``error``
    Equivalent to passing :ctest-option:`--no-tests=error`
    on the command line.

  ``ignore``
    Equivalent to passing :ctest-option:`--no-tests=ignore`
    on the command line.

.. _`CMakePresets.testPresets.execution.testPassthroughArguments`:

``testPassthroughArguments``
  .. presets-versionadded:: 12

  An optional array of strings. Each element is forwarded as an
  argument to every test executable, equivalent to passing
  arguments after :option:`ctest --` on the command line.

  When both preset and command-line passthrough arguments are
  specified, preset arguments appear first, followed by
  command-line arguments.
.. This file was generated by Utilities/Scripts/regenerate-presets.py
   from Help/manual/presets/schema.yaml. Do not edit.

.. _`CMakePresets.testPresets.execution.repeat.mode`:

``mode``
  A required string. Must be one of the following values:

  * ``until-fail``

  * ``until-pass``

  * ``after-timeout``

.. _`CMakePresets.testPresets.execution.repeat.count`:

``count``
  A required integer.
{
  "$schema": "http://json-schema.org/draft/2020-12/schema#",
  "type": "object",
  "oneOf": [
    {
      "description": "The presets specify the generator and the build directory, and optionally an array of variables and other arguments to pass to CMake.",
      "properties": {
        "version": {
          "type": "integer",
          "description": "A required integer representing the version of the JSON schema.",
          "const": 1
        },
        "cmakeMinimumRequired": {
          "$ref": "#/definitions/cmakeMinimumRequired@v1..v9"
        },
        "vendor": {
          "$ref": "#/definitions/vendor@v1.."
        },
        "configurePresets": {
          "$ref": "#/definitions/configurePresets@v1..v2"
        }
      },
      "required": [
        "version"
      ],
      "additionalProperties": false
    },
    {
) DESTINATION paths are normalized. </policy/CMP0177>
   CMP0176: execute_process() ENCODING is UTF-8 by default. </policy/CMP0176>
   CMP0175: add_custom_command() rejects invalid arguments. </policy/CMP0175>
   CMP0174: cmake_parse_arguments(PARSE_ARGV) defines a variable for an empty string after a single-value keyword. </policy/CMP0174>
   CMP0173: The CMakeFindFrameworks module is removed. </policy/CMP0173>
   CMP0172: The CPack module enables per-machine installation by default in the CPack WIX Generator. </policy/CMP0172>
   CMP0171: 'codegen' is a reserved target name. </policy/CMP0171>

Policies Introduced by CMake 3.30
---------------------------------

.. toctree::
   :maxdepth: 1

   CMP0170: FETCHCONTENT_FULLY_DISCONNECTED requirements are enforced. </policy/CMP0170>
   CMP0169: FetchContent_Populate(depName) single-argument signature is deprecated. </policy/CMP0169>
   CMP0168: FetchContent implements steps directly instead of through a sub-build. </policy/CMP0168>
   CMP0167: The FindBoost module is removed. </policy/CMP0167>
   CMP0166: TARGET_PROPERTY evaluates link properties transitively over private dependencies of static libraries. </policy/CMP0166>
   CMP0165: enable_language() must not be called before project(). </policy/CMP0165>
   CMP0164: add_library() rejects SHARED libraries when not supported by the platform. </policy/CMP0164>
   CMP0163: The GENERATED source file property is now visible in all directories. </policy/CMP0163>
   CMP0162: Visual Studio generators add UseDebugLibraries indicators by default. </policy/CMP0162>

Policies Introduced by CMake 3.29
---------------------------------

.. toctree::
   :maxdepth: 1

   CMP0161: CPACK_PRODUCTBUILD_DOMAINS defaults to true. </policy/CMP0161>
   CMP0160: More read-only target properties now error when trying to set them. </policy/CMP0160>
   CMP0159: file(STRINGS) with REGEX updates CMAKE_MATCH_<n>. </policy/CMP0159>
   CMP0158: add_test() honors CMAKE_CROSSCOMPILING_EMULATOR only wCURRENT_LIST_LINE
   /variable/CMAKE_CURRENT_SOURCE_DIR
   /variable/CMAKE_CXX_STDLIB_MODULES_JSON
   /variable/CMAKE_DEBUG_TARGET_PROPERTIES
   /variable/CMAKE_DIRECTORY_LABELS
   /variable/CMAKE_DL_LIBS
   /variable/CMAKE_DOTNET_SDK
   /variable/CMAKE_DOTNET_TARGET_FRAMEWORK
   /variable/CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
   /variable/CMAKE_EDIT_COMMAND
   /variable/CMAKE_EXECUTABLE_SUFFIX
   /variable/CMAKE_EXECUTABLE_SUFFIX_LANG
   /variable/CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
   /variable/CMAKE_FASTBUILD_ALLOW_RESPONSE_FILE
   /variable/CMAKE_FASTBUILD_CACHE_PATH
   /variable/CMAKE_FASTBUILD_CAPTURE_SYSTEM_ENV
   /variable/CMAKE_FASTBUILD_CLANG_GCC_UPDATE_XLANG_ARG
   /variable/CMAKE_FASTBUILD_CLANG_REWRITE_INCLUDES
   /variable/CMAKE_FASTBUILD_COMPILER_EXTRA_FILES
   /variable/CMAKE_FASTBUILD_ENV_OVERRIDES
   /variable/CMAKE_FASTBUILD_FORCE_RESPONSE_FILE
   /variable/CMAKE_FASTBUILD_IDE_ARGS
   /variable/CMAKE_FASTBUILD_SOURCE_MAPPING
   /variable/CMAKE_FASTBUILD_TRACK_BYPRODUCTS_AS_OUTPUT
   /variable/CMAKE_FASTBUILD_USE_DETERMINISTIC_PATHS
   /variable/CMAKE_FASTBUILD_USE_LIGHTCACHE
   /variable/CMAKE_FASTBUILD_USE_RELATIVE_PATHS
   /variable/CMAKE_FASTBUILD_VERBOSE_GENERATOR
   /variable/CMAKE_FIND_DEBUG_MODE
   /variable/CMAKE_FIND_DEBUG_MODE_NO_IMPLICIT_CONFIGURE_LOG
   /variable/CMAKE_FIND_PACKAGE_NAME
   /variable/CMAKE_FIND_PACKAGE_REDIRECTS_DIR
   /variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION
   /variable/CMAKE_FIND_PACKAGE_SORT_ORDER
   /variable/CMAKE_FIND_REQUIRED
   /variable/CMAKE_GENERATOR
   /variable/CMAKE_GENERATOR_INSTANCE
   /variable/CMAKE_GENERATOR_PLATFORM
   /variable/CMAKE_GENERATOR_TOOLSET
   /variable/CMAKE_IMPORT_LIBRARY_PREFIX
   /variable/CMAKE_IMPORT_LIBRARY_SUFFIX
   /variable/CMAKE_JOB_POOL_COMPILE
   /variable/CMAKE_JOB_POOL_LINK
   /variable/CMAKE_JOB_POOL_PRECOMPILE_HEADER
   /variable/CMAKE_JOB_POOLS
   /variable/CMAKE_LANG_COMPILER_AR
   /variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID
   /variable/CMAKE_LANG_COMPILER_FRONs multiple lines, this field will
       be set to the line where the function call ends. If the function
       calls spans a single line, this field will be unset. This field
       was added in minor version 2 of the ``json-v1`` format.

     ``defer``
       Optional member that is present when the function call was deferred
       by :command:`cmake_language(DEFER)`.  If present, its value is a
       string containing the deferred call ``<id>``.

     ``cmd``
       The name of the function that was called.

     ``args``
       A string list of all function parameters.

     ``time``
       Timestamp (seconds since epoch) of the function call.

     ``frame``
       Stack frame depth of the function that was called, within the
       context of the  ``CMakeLists.txt`` being processed currently.

     ``global_frame``
       Stack frame depth of the function that was called, tracked globally
       across all ``CMakeLists.txt`` files involved in the trace. This field
       was added in minor version 2 of the ``json-v1`` format.

     Additionally, the first JSON document outputted contains the
     ``version`` key for the current major and minor version of the

     .. code-block:: json
       :caption: JSON version format

       {
         "version": {
           "major": 1,
           "minor": 2
         }
       }

     The members are:

     ``version``
       Indicates the version of the JSON format. The version has a
       major and minor components following semantic version conventions.

.. option:: --trace-source=<file>

 Put cmake in trace mode, but output only lines of a specified file.

 Multiple options are allowed.

.. option:: --trace-redirect=<file>

 Put cmake in trace mode and redirect trace output to a file instead of stderr.

.. option:: --warn-uninitialized

 .. deprecated:: 4.4

 Compatibility synonym for ``-Wuninitialized``.

.. option:: --warn-unused-vars

 .. deprecated:: 3.19

 Does nothing.  In CMake versions 3.2 and below this ate a
not-found library (e.g. ``Xxx_ROOT_DIR``).  For the same reason, mark
most cache options as advanced.  For packages which provide both debug
and release binaries, it is common to create cache variables with a
``_LIBRARY_<CONFIG>`` suffix, such as ``Foo_LIBRARY_RELEASE`` and
``Foo_LIBRARY_DEBUG``.  The :module:`SelectLibraryConfigurations` module
can be helpful for such cases.

While these are the standard variable names, backward compatibility should be
provided for any previously used names in the find module that is replacing an
older version.  Old variable names should be documented as deprecated to
discourage further use.

A Sample Find Module
--------------------

We will describe how to create a simple find module for a library ``Foo``.

The top of the module should begin with a license notice, followed by
a blank line, and then followed by a :ref:`Bracket Comment`.  The comment
should begin with ``.rst:`` to indicate that the rest of its content is
reStructuredText-format documentation.  For example:

::

  # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
  # file LICENSE.rst or https://cmake.org/licensing for details.

  #[=======================================================================[.rst:
  FindFoo
  -------

  Finds the Foo library.

  Imported Targets
  ^^^^^^^^^^^^^^^^

  This module provides the following imported targets, if found:

  ``Foo::Foo``
    The Foo library

  Result Variables
  ^^^^^^^^^^^^^^^^

  This module defines the following variables:

  ``Foo_FOUND``
    Boolean indicating whether (the requested version of) Foo was found.
  ``Foo_VERSION``
    The version of the Foo library which was found.
  ``Foo_INCLUDE_DIRS``
    Include directories needed to use Foo.
  ``Foo_LIBRARIES``
    Libraries needed to link to Foo.

  Cache Variables
  ^^^^^^^^^^^^^^^

  The following cache variables may also be set:

  ``Foo_INCLUDE_DIR``
    The directory containing ``foo.h``.
  ``Foo_LIBRARY``
    The pathe test does not have to be performed again the next time
CMake runs.

Some toolchain features have built-in handling in CMake, and do not require
compile-tests. For example, :prop_tgt:`POSITION_INDEPENDENT_CODE` allows
specifying that a target should be built as position-independent code, if
the compiler supports that feature. The :prop_tgt:`<LANG>_VISIBILITY_PRESET`
and :prop_tgt:`VISIBILITY_INLINES_HIDDEN` target properties add flags for
hidden visibility, if supported by the compiler.

.. _`Cross Compiling Toolchain`:

Cross Compiling
===============

If :manual:`cmake(1)` is invoked with the command line parameter
:option:`--toolchain path/to/file <cmake --toolchain>` or
:option:`-DCMAKE_TOOLCHAIN_FILE=path/to/file <cmake -D>`, the
file will be loaded early to set values for the compilers.
The :variable:`CMAKE_CROSSCOMPILING` variable is set to true when CMake is
cross-compiling.

Note that using the :variable:`CMAKE_SOURCE_DIR` or :variable:`CMAKE_BINARY_DIR`
variables inside a toolchain file is typically undesirable.  The toolchain
file is used in contexts where these variables have different values when used
in different places (e.g. as part of a call to :command:`try_compile`).  In most
cases, where there is a need to evaluate paths inside a toolchain file, the more
appropriate variable to use would be :variable:`CMAKE_CURRENT_LIST_DIR`, since
it always has an unambiguous, predictable value.

Cross Compiling for Linux
-------------------------

A typical cross-compiling toolchain for Linux has content such
as:

.. code-block:: cmake

  set(CMAKE_SYSTEM_NAME Linux)
  set(CMAKE_SYSTEM_PROCESSOR arm)

  set(CMAKE_SYSROOT /home/devel/rasp-pi-rootfs)
  set(CMAKE_STAGING_PREFIX /home/devel/stage)

  set(tools /home/devel/gcc-4.7-linaro-rpi-gnueabihf)
  set(CMAKE_C_COMPILER ${tools}/bin/arm-linux-gnueabihf-gcc)
  set(CMAKE_CXX_COMPILER ${tools}/bin/arm-linux-gnueabihf-g++)

  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLreated.  The property may be explicitly enabled on an imported
target to check its link interface.

In the following example, CMake will halt with an error at configure time
because ``miLib`` is not a target:

.. code-block:: cmake

  set(CMAKE_LINK_LIBRARIES_ONLY_TARGETS ON)
  add_library(myLib STATIC myLib.c)
  add_executable(myExe myExe.c)
  target_link_libraries(myExe PRIVATE miLib) # typo for myLib

In order to link toolchain-provided libraries by name while still
enforcing ``LINK_LIBRARIES_ONLY_TARGETS``, use an
:ref:`imported <Imported Targets>`
:ref:`Interface Library <Interface Libraries>` with the
:prop_tgt:`IMPORTED_LIBNAME` target property:

.. code-block:: cmake

  add_library(toolchain::m INTERFACE IMPORTED)
  set_property(TARGET toolchain::m PROPERTY IMPORTED_LIBNAME "m")
  target_link_libraries(myExe PRIVATE toolchain::m)

See also policy :policy:`CMP0028`.

.. note::

  If :prop_tgt:`INTERFACE_LINK_LIBRARIES` contains generator expressions,
  its actual list of link items may depend on the type and properties of
  the consuming target.  In such cases CMake may not always detect names
  of missing targets that only appear for specific consumers.
  A future version of CMake with improved heuristics may start triggering
  errors on projects accepted by previous versions of CMake.
BUNDLE
------

This target is a ``CFBundle`` on the macOS.

If a module library target has this property set to true it will be
built as a ``CFBundle`` when built on the mac.  It will have the directory
structure required for a ``CFBundle`` and will be suitable to be used for
creating Browser Plugins or other application resources.
SYMBOLIC
--------

.. versionadded:: 4.2

Read-only indication of whether a target is ``SYMBOLIC``.

Symbolic targets are created by calls to
:command:`add_library(INTERFACE SYMBOLIC) <add_library(INTERFACE-SYMBOLIC)>`.
They are useful for packages to represent additional **components** or
**feature selectors** that consumers can request via ``fin major version is taken.  If no matching major
version was found, an error is generated.
If  ``INTERFACE_QT_MAJOR_VERSION`` is not a valid number, the first
entry in the list is taken.

A ``find_package(Qt[456]...)`` call sets the ``QT/Qt[56]Core_VERSION_MAJOR/MINOR``
variables.  If the call is in a different context than the
:command:`add_executable` or :command:`add_library` call, e.g. in a function,
then the version variables might not be available to the ``AUTOMOC``
enabled target.
In that case the version variables can be forwarded from the
``find_package(Qt[456]...)`` calling context to the :command:`add_executable`
or :command:`add_library` calling context as directory properties.
The following Qt5 example demonstrates the procedure.

.. code-block:: cmake

  function (add_qt5_client)
    find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets)
    ...
    set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
      PROPERTY Qt5Core_VERSION_MAJOR "${Qt5Core_VERSION_MAJOR}")
    set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
      PROPERTY Qt5Core_VERSION_MINOR "${Qt5Core_VERSION_MAJOR}")
    ...
  endfunction ()
  ...
  add_qt5_client()
  add_executable(myTarget main.cpp)
  target_link_libraries(myTarget Qt5::QtWidgets)
  set_property(TARGET myTarget PROPERTY AUTOMOC ON)


Modifiers
^^^^^^^^^

:prop_tgt:`AUTOMOC_EXECUTABLE`:
The ``moc`` executable will be detected automatically, but can be forced to
a certain binary using this target property.

:prop_tgt:`AUTOMOC_MOC_OPTIONS`:
Additional command line options for ``moc`` can be set in this target property.

:prop_tgt:`AUTOMOC_MACRO_NAMES`:
This list of Qt macro names can be extended to search for additional macros in
headers and sources.

:prop_tgt:`AUTOMOC_DEPEND_FILTERS`:
``moc`` dependency file names can be extracted from headers or sources by
defining file name filters in this target property.

:prop_tgt:`AUTOMOC_COMPILER_PREDEFINES`:
Compiler pre definitions for ``moc`` are written to the ``moc_predes to ``.fatbin`` files instead of ``.obj`` files
within :ref:`Object Libraries`.

For example:

.. code-block:: cmake

  add_library(myfbins OBJECT a.cu b.cu)
  set_property(TARGET myfbins PROPERTY CUDA_FATBIN_COMPILATION ON)
IMPORTED_SONAME
---------------

The ``soname`` of an ``IMPORTED`` target of shared library type.

Set this to the ``soname`` embedded in an imported shared library.  This
is meaningful only on platforms supporting the feature.  Ignored for
non-imported targets.
XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE
------------------------------------------

.. versionadded:: 3.23

Property value for ``GPU Frame Capture`` in the Options section of
the generated Xcode scheme. Example values are ``Metal`` and
``Disabled``.

This property is initialized by the value of the variable
:variable:`CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE`
if it is set when a target is created.

Please refer to the :prop_tgt:`XCODE_GENERATE_SCHEME` target property
documentation to see all Xcode schema related properties.
RUNTIME_OUTPUT_NAME_<CONFIG>
----------------------------

Per-configuration output name for
:ref:`RUNTIME <Runtime Output Artifacts>` target files.

This is the configuration-specific version of the
:prop_tgt:`RUNTIME_OUTPUT_NAME` target property.
CUDA_STANDARD_REQUIRED
----------------------

.. versionadded:: 3.8

Boolean describing whether the value of :prop_tgt:`CUDA_STANDARD` is a requirement.

If this property is set to ``ON``, then the value of the
:prop_tgt:`CUDA_STANDARD` target property is treated as a requirement.  If this
property is ``OFF`` or unset, the :prop_tgt:`CUDA_STANDARD` target property is
treated as optional and may "decay" to a previous standard if the requested is
not available.  For compilers that have no notion of a standard level, such as
MSVC 1800 (Visual Studio 2013) and lower, this has no effect.

See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.

Thi package description.  See the :command:`install(PACKAGE_INFO)`
    documentation for details.

.. _CPS: https://cps-org.github.io/cps/
.. |CPS| replace:: Common Package Specification

Instrumentation
---------------

* :manual:`cmake-instrumentation(7)` was added to enable collection of
  timing data, target information, and system diagnostic information during
  the configure, generate, build, test, and install steps of a CMake project:

  * Instrumentation data are :ref:`indexed <cmake-instrumentation Indexing>`
    and provided to :ref:`callbacks <cmake-instrumentation Callbacks>` for
    custom processing.

  * Instrumentation data are included in submissions to CDash.

  * Optionally,
    :ref:`Google Trace Event Format <cmake-instrumentation Google Trace File>`
    files may be generated to visualize instrumentation data.

Presets
-------

* :manual:`cmake-presets(7)` files now support schema version ``11``.
  The ``jobs`` field under test presets now supports an empty string, to
  match the behavior of :option:`ctest --parallel` with the value omitted.
* The ``jobs`` field under both build and test presets no longer accept
  negative integer values, regardless of the schema version.

File-Based API
--------------

* The :manual:`cmake-file-api(7)` "codemodel" version 2 version field
  has been updated to 2.10.

* The :manual:`cmake-file-api(7)` "codemodel" version 2 "target" object
  gained a new ``interfaceSources`` array field, and the ``sourceGroups``
  array items gained a new ``interfaceSourceIndexes`` array field.

Platforms
---------

* ``HIP`` language code may now be compiled for SPIR-V targets,
  e.g., via chipStar.  See the :variable:`CMAKE_HIP_PLATFORM` variable.

Command-Line
------------

* :option:`cmake --version` now supports a ``=json-v1`` value to print
  detailed version information in a JSON format.

* :option:`cmake --build` now supports specifying a build directory and
  preset together.  The build preset will be used with the explicnual:`cmake(1)` ``-E remove_directory`` command-line tool,
  when given the path to a symlink to a directory, now removes just
  the symlink.  It no longer removes content of the linked directory.

* The :manual:`ctest(1)`  ``--build-makeprogram`` command-line option now
  specifies the make program used when configuring a project with the
  :generator:`Ninja` generator or the :ref:`Makefile Generators`.

* The :module:`ExternalProject` module :command:`ExternalProject_Add` command
  has been updated so that ``GIT_SUBMODULES ""`` initializes no submodules.
  See policy :policy:`CMP0097`.

* The :module:`FindGTest` module has been updated to recognize
  MSVC build trees generated by GTest 1.8.1.

* The :command:`project` command no longer strips leading zeros in version
  components.  See policy :policy:`CMP0096`.

* The Qt Compressed Help file is now named ``CMake.qch``, which no longer
  contains the release version in the file name.  When CMake is upgraded
  in-place, the name and location of this file will remain constant.
  Tools such as IDEs, help viewers, etc. should now be able to refer to this
  file at a fixed location that remains valid across CMake upgrades.

* ``RPATH`` entries are properly escaped in the generated CMake scripts
  used for installation.  See policy :policy:`CMP0095`.

* When using :variable:`CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS` on Windows the
  auto-generated exports are now updated only when the object files
  providing the symbols are updated.

Updates
=======

Changes made since CMake 3.16.0 include the following.

3.16.2
------

* CMake 3.16.0 and 3.16.1 processed ``.hh`` files with :prop_tgt:`AUTOMOC`.
  This was a behavior change from CMake 3.15 and below that can break
  existing projects, so it has been reverted as of 3.16.2.

3.16.5
------

* The :module:`FindPython`, :module:`FindPython2`, and :module:`FindPython3`
  modules no longer create cache entries for ``Python{,2,3}_LIBRARY_RELEASE``
  and ``Python{,2,3}_LIBRARY_DEBUG``.ides imported targets.

* The :module:`FindPkgConfig` module gained a ``PKG_CONFIG_ARGN``
  variable to specify arguments to ``pkg-config`` calls.

* The :module:`GoogleTest` module :command:`gtest_discover_tests`
  function gained a ``TEST_FILTER`` option to filter tests using
  ``--gtest_filter`` during test discovery.

* The :module:`UseSWIG` module, for :ref:`Visual Studio Generators`,
  can now use the ``swig`` tool to generate implicit dependencies.

CTest
-----

* :manual:`ctest(1)` learned to recognize labels attached to a test at run time.
  Previously it was only possible to attach labels to tests at configure time
  by using the :prop_test:`LABELS` test property.
  See :ref:`Additional Test Measurements` for more information.

* :manual:`ctest(1)` learned to be able to modify the environment for a test
  through the :prop_test:`ENVIRONMENT_MODIFICATION` property. This is allows
  for updates to environment variables based on the environment present at
  test time.

* The :command:`ctest_memcheck` command now also generates a
  :file:`DynamicAnalysis-Test.xml` file which may be used to submit test
  results to CDash.

CPack
-----

* The :cpack_gen:`CPack DEB Generator` gained the
  option to set :variable:`CPACK_DEBIAN_COMPRESSION_TYPE` to ``zstd``,
  which enables Zstandard compression for deb packages.

* The :cpack_gen:`CPack NSIS Generator` gained a new
  :variable:`CPACK_NSIS_IGNORE_LICENSE_PAGE` variable to suppress
  the license page in the installer.

* The :cpack_gen:`CPack RPM Generator` gained the
  :variable:`CPACK_RPM_REQUIRES_EXCLUDE_FROM` option to avoid scanning
  specific paths for dependencies.

Deprecated and Removed Features
===============================

* The :generator:`Visual Studio 10 2010` generator is now deprecated
  and will be removed in a future version of CMake.

Other Changes
=============

* The :manual:`Compile Features <cmake-compile-features(7)>` functionality now
  correctly disables or enables compiler extensions ded to configure export sets.
  Its ``TARGET`` option's ``XCFRAMEWORK_LOCATION`` setting specifies the
  location of a ``.xcframework`` that can be substituted for an installed
  target.

* The :command:`if` command gained new tests ``IS_READABLE``, ``IS_WRITABLE``
  and ``IS_EXECUTABLE`` to check file or directory permissions.

* The :command:`try_compile` and :command:`try_run` commands gained a
  ``LINKER_LANGUAGE`` option to specify the :prop_tgt:`LINKER_LANGUAGE`
  target property in the generated test project.

Variables
---------

* The :envvar:`CMAKE_INSTALL_PREFIX` environment variable was added to
  provide a default value for the :variable:`CMAKE_INSTALL_PREFIX` variable.

* The :variable:`CMAKE_LINKER_TYPE` variable and corresponding
  :prop_tgt:`LINKER_TYPE` target property were added to specify
  what linker to use with some toolchains.

* The :variable:`CMAKE_<LANG>_COMPILER_LINKER`,
  :variable:`CMAKE_<LANG>_COMPILER_LINKER_ID`,
  :variable:`CMAKE_<LANG>_COMPILER_LINKER_VERSION` and
  :variable:`CMAKE_<LANG>_COMPILER_LINKER_FRONTEND_VARIANT` variables
  were added to describe the linker used by the language's link step.

* The :variable:`CMAKE_PROJECT_INCLUDE`,
  :variable:`CMAKE_PROJECT_INCLUDE_BEFORE`,
  :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE`, and
  :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE` variables learned
  to support a :ref:`semicolon-separated list <CMake Language Lists>` of
  CMake language files to be included sequentially. These variables can also
  reference module names to be found in :variable:`CMAKE_MODULE_PATH` or
  builtin to CMake.

* The :variable:`CMAKE_SKIP_TEST_ALL_DEPENDENCY` variable was added
  to control whether the ``test`` (or ``RUN_TESTS``) buildsystem
  target depends on the ``all`` (or ``ALL_BUILD``) target.

* A :variable:`CMAKE_TEST_LAUNCHER` variable and corresponding
  :prop_tgt:`TEST_LAUNCHER` target property were added to specify
  a launcher to be used by executable targets when invoked bonents,
e.g.  such that version ``1.07.06`` becomes ``1.7.6``.  The ``NEW`` behavior
of this policy preserves the leading zeros in all components, such that
version ``1.07.06`` remains unchanged.

.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.16
.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn
.. include:: include/STANDARD_ADVICE.rst

.. include:: include/DEPRECATED.rst
CMP0022
-------

.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: include/REMOVED_PROLOGUE.rst

:prop_tgt:`INTERFACE_LINK_LIBRARIES` defines the link interface.

CMake 2.8.11 constructed the 'link interface' of a target from
properties matching ``(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?``.
The modern way to specify config-sensitive content is to use generator
expressions and the ``IMPORTED_`` prefix makes uniform processing of the
link interface with generator expressions impossible.  The
:prop_tgt:`INTERFACE_LINK_LIBRARIES` target property was introduced as a
replacement in CMake 2.8.12.  This new property is named consistently
with the ``INTERFACE_COMPILE_DEFINITIONS``, ``INTERFACE_INCLUDE_DIRECTORIES``
and ``INTERFACE_COMPILE_OPTIONS`` properties.  For in-build targets, CMake
will use the INTERFACE_LINK_LIBRARIES property as the source of the
link interface only if policy ``CMP0022`` is ``NEW``.  When exporting a target
which has this policy set to ``NEW``, only the :prop_tgt:`INTERFACE_LINK_LIBRARIES`
property will be processed and generated for the ``IMPORTED`` target by
default.  A new option to the :command:`install(EXPORT)` and export commands
allows export of the old-style properties for compatibility with
downstream users of CMake versions older than 2.8.12.  The
:command:`target_link_libraries` command will no longer populate the properties
matching ``LINK_INTERFACE_LIBRARIES(_<CONFIG>)?`` if this policy is ``NEW``.

Warning-free future-compatible code which works with CMake 2.8.7 onwards
can be written by using the ``LINK_PRIVATE`` and ``LINK_PUBLIC`` keywords
of :cot the value of
the :variable:`CMAKE_EXE_LINKER_FLAGS` variable in the test project
to the same as it is in the calling project.

If the project code does not set the policy explicitly, users may
set it on the command line by defining the
:variable:`CMAKE_POLICY_DEFAULT_CMP0056 <CMAKE_POLICY_DEFAULT_CMP<NNNN>>`
variable in the cache.

.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.2
.. |WARNED_OR_DID_NOT_WARN| replace:: did *not* warn by default
.. include:: include/REMOVED_EPILOGUE.rst

See documentation of the
:variable:`CMAKE_POLICY_WARNING_CMP0056 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
variable to control the warning in CMake versions before 4.0.
CMP0196
-------

.. versionadded:: 4.1

The :module:`CMakeDetermineVSServicePack` module is removed.

The ``CMakeDetermineVSServicePack`` module has long been superseded by
the :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable, and the module
has been documented as deprecated since CMake 3.0.  CMake 4.1 and above
prefer to not provide the module.  This policy provides compatibility
for projects that have not been ported away from it.

The ``OLD`` behavior of this policy is for
``include(CMakeDetermineVSServicePack)`` to load the deprecated module.
The ``NEW`` behavior halts with a fatal error if anything tries to include
the module.

.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 4.1
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: include/STANDARD_ADVICE.rst

.. include:: include/DEPRECATED.rst
CMP0198
-------

.. versionadded:: 4.2

:variable:`CMAKE_PARENT_LIST_FILE` is not defined in ``CMakeLists.txt``.

CMake 4.1 and below defined ``CMAKE_PARENT_LIST_FILE`` when processing
a ``CMakeLists.txt`` even though there is no parent file.  CMake 4.2
and above prefer to not define ``CMAKE_PARENT_LIST_FILE``.  This policy
provides compatibility for projects that accidentally relied on the
old behavior.

The ``OLD`` behavior for this policy is to set
:variable:`CMAKE_PARENT_LIST_FILE` to :variable:`CMAKE_CURRENT_LIST_FILE`
when uarantee that the dependencies' custom commands are
  finished before sources in ``<target>`` start compiling; this
  ensures generated sources are available.

.. versionchanged:: 4.1
  The command may be called with no dependencies.
  Previously, at least one dependency was required.

See Also
^^^^^^^^

* The ``DEPENDS`` option of :command:`add_custom_target` and
  :command:`add_custom_command` commands for adding file-level
  dependencies in custom rules.

* The :prop_sf:`OBJECT_DEPENDS` source file property to add
  file-level dependencies to object files.
export_library_dependencies
---------------------------

Disallowed since version 3.0.  See CMake Policy :policy:`CMP0033`.

Use :command:`install(EXPORT)` or :command:`export` command.

This command generates an old-style library dependencies file.
Projects requiring CMake 2.6 or later should not use the command.  Use
instead the :command:`install(EXPORT)` command to help export targets from an
installation tree and the :command:`export` command to export targets from a
build tree.

The old-style library dependencies file does not take into account
per-configuration names of libraries or the
:prop_tgt:`LINK_INTERFACE_LIBRARIES` target property.

.. code-block:: cmake

  export_library_dependencies(<file> [APPEND])

Create a file named ``<file>`` that can be included into a CMake listfile
with the INCLUDE command.  The file will contain a number of SET
commands that will set all the variables needed for library dependency
information.  This should be the last command in the top level
CMakeLists.txt file of the project.  If the ``APPEND`` option is
specified, the SET commands will be appended to the given file instead
of replacing it.
get_target_property
-------------------

Get a property from a target.

.. code-block:: cmake

  get_target_property(<variable> <target> <property>)

Get a property from a target.  The value of the property is stored in the
specified ``<variable>``.  If the target property is not# the package or dependency name as the first method-specific argument.
  macro(mycomp_provide_dependency method dep_name)
    if("${dep_name}" MATCHES "^(gtest|googletest)$")
      # Save our current command arguments in case we are called recursively
      list(APPEND mycomp_provider_args ${method} ${dep_name})

      # This will forward to the built-in FetchContent implementation,
      # which detects a recursive call for the same thing and avoids calling
      # the provider again if dep_name is the same as the current call.
      FetchContent_MakeAvailable(googletest)

      # Restore our command arguments
      list(POP_BACK mycomp_provider_args dep_name method)

      # Tell the caller we fulfilled the request
      if("${method}" STREQUAL "FIND_PACKAGE")
        # We need to set this if we got here from a find_package() call
        # since we used a different method to fulfill the request.
        # This example assumes projects only use the gtest targets,
        # not any of the variables the FindGTest module may define.
        set(${dep_name}_FOUND TRUE)
      elseif(NOT "${dep_name}" STREQUAL "googletest")
        # We used the same method, but were given a different name to the
        # one we populated with. Tell the caller about the name it used.
        FetchContent_SetPopulated(${dep_name}
          SOURCE_DIR "${googletest_SOURCE_DIR}"
          BINARY_DIR "${googletest_BINARY_DIR}"
        )
      endif()
    endif()
  endmacro()

  cmake_language(
    SET_DEPENDENCY_PROVIDER mycomp_provide_dependency
    SUPPORTED_METHODS
      FIND_PACKAGE
      FETCHCONTENT_MAKEAVAILABLE_SERIAL
  )

The final example demonstrates how to modify arguments to a
:command:`find_package` call.  It forces all such calls to have the
``QUIET`` keyword.  It uses the ``BYPASS_PROVIDER`` keyword to prevent
calling the provider command recursively for the same dependency.

.. code-block:: cmake
  :caption: mycomp_provider.cmake

  cmake_minimum_required(VERSION 3.24)
ectory and below.

.. note::

  These options are not used when linking.
  See the :command:`add_link_options` command for that.

Arguments
^^^^^^^^^

.. |command_name| replace:: ``add_compile_options``
.. include:: include/GENEX_NOTE.rst

.. include:: include/OPTIONS_SHELL.rst

Example
^^^^^^^

Since different compilers support different options, a typical use of
this command is in a compiler-specific conditional clause:

.. code-block:: cmake

  if (MSVC)
      # warning level 4
      add_compile_options(/W4)
  else()
      # additional warnings
      add_compile_options(-Wall -Wextra -Wpedantic)
  endif()

To set per-language options, use the :genex:`$<COMPILE_LANGUAGE>`
or :genex:`$<COMPILE_LANGUAGE:languages> <COMPILE_LANGUAGE:languages>`
generator expressions.

See Also
^^^^^^^^

* This command can be used to add any options. However, for
  adding preprocessor definitions and include directories it is recommended
  to use the more specific commands :command:`add_compile_definitions`
  and :command:`include_directories`.

* The command :command:`target_compile_options` adds target-specific options.

* This command adds compile options for all languages.
  Use the :genex:`COMPILE_LANGUAGE` generator expression to specify
  per-language compile options.

* The source file property :prop_sf:`COMPILE_OPTIONS` adds options to one
  source file.

* :command:`add_link_options` adds options for linking.

* :variable:`CMAKE_<LANG>_FLAGS` and :variable:`CMAKE_<LANG>_FLAGS_<CONFIG>`
  add language-wide flags passed to all invocations of the compiler.
  This includes invocations that drive compiling and those that drive linking.
add_library
-----------

.. only:: html

   .. contents::

Add a library to the project using the specified source files.

Normal Libraries
^^^^^^^^^^^^^^^^

.. signature::
  add_library(<name> [<type>] [EXCLUDE_FROM_ALL] <sources>...)
  :target: normal

  Add a library target called ``<name>`` to be built from the source files
  listed in the co========

    If this variable is not specified, it is determined automatically by system
    introspection.

  .. variable:: CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND

    Determines the path to the tool to use for dependency resolution. This is
    the actual path to ``objdump``, ``dumpbin``, or ``otool``.

    If this variable is not specified, it is determined by the value of
    :variable:`CMAKE_OBJDUMP` variable if set, else by system introspection.

    .. versionadded:: 3.18
      Uses :variable:`CMAKE_OBJDUMP` if set.
build_name
----------

Disallowed since version 3.0.  See CMake Policy :policy:`CMP0036`.

Use ``${CMAKE_SYSTEM}`` and ``${CMAKE_CXX_COMPILER}`` instead.

.. code-block:: cmake

  build_name(variable)

Sets the specified variable to a string representing the platform and
compiler settings.  These values are now available through the
:variable:`CMAKE_SYSTEM` and
:variable:`CMAKE_CXX_COMPILER <CMAKE_<LANG>_COMPILER>` variables.
endforeach
----------

Ends a list of commands in a foreach block.

.. code-block:: cmake

  endforeach([<loop_var>])

See the :command:`foreach` command.

The optional ``<loop_var>`` argument is supported for backward compatibility
only. If used it must be a verbatim repeat of the ``<loop_var>`` argument of
the opening ``foreach`` clause.
ctest_upload
------------

Upload files to a dashboard server as a :ref:`Dashboard Client`.

.. code-block:: cmake

  ctest_upload(FILES <file>... [QUIET] [CAPTURE_CMAKE_ERROR <result-var>])

The options are:

``FILES <file>...``
  Specify a list of files to be sent along with the build results to the
  dashboard server.

``CAPTURE_CMAKE_ERROR <result-var>``
  .. versionadded:: 3.7

  Store in the ``<result-var>`` variable ``-1`` if there are any errors running
  the command and prevent :manual:`ctest(1)` from returning non-zero if an
  error occurs.

``QUIET``
  .. versionadded:: 3.3

  Suppress any CTest-specific non-error output that would have been
  printed to the console otherwise.dded:: 4.3
  If :policy:`CMP0210` is set to ``NEW``, :variable:`CMAKE_<LANG>_LINK_FLAGS`
  and :variable:`CMAKE_<LANG>_LINK_FLAGS_<CONFIG>` are propagated into the
  test project's build configuration.

See Also
^^^^^^^^

* :command:`try_run`
set_tests_properties
--------------------

Set a property of the tests.

.. code-block:: cmake

  set_tests_properties(<tests>...
                       [DIRECTORY <dir>]
                       PROPERTIES <prop1> <value1>
                       [<prop2> <value2>]...)

Sets a property for the tests.  If the test is not found, CMake
will report an error.

Test property values may be specified using
:manual:`generator expressions <cmake-generator-expressions(7)>`
for tests created by the :command:`add_test(NAME)` signature.

.. versionadded:: 3.28
  Visibility can be set in other directory scopes using the following option:

  ``DIRECTORY <dir>``
    The test properties will be set in the ``<dir>`` directory's scope.
    CMake must already know about this directory, either by having added it
    through a call to :command:`add_subdirectory` or it being the top level
    source directory. Relative paths are treated as relative to the current
    source directory. ``<dir>`` may reference a binary directory.

See Also
^^^^^^^^

* :command:`add_test`
* :command:`define_property`
* the more general :command:`set_property` command
* :ref:`Test Properties` for the list of properties known to CMake
include_directories
-------------------

Add include directories to the build.

.. code-block:: cmake

  include_directories([AFTER|BEFORE] [SYSTEM] dir1 [dir2 ...])

Add the given directories to those the compiler uses to search for
include files.  Relative paths are interpreted as relative to the
current source directory.

The include directories are added to the :prop_dir:`INCLUDE_DIREC