Blame cmake/compat_2.8.3/FindPackageHandleStandardArgs.cmake

Packit 1fb8d4
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
Packit 1fb8d4
#
Packit 1fb8d4
# This function is intended to be used in FindXXX.cmake modules files.
Packit 1fb8d4
# It handles the REQUIRED, QUIET and version-related arguments to FIND_PACKAGE().
Packit 1fb8d4
# It also sets the <UPPERCASED_NAME>_FOUND variable.
Packit 1fb8d4
# The package is considered found if all variables <var1>... listed contain
Packit 1fb8d4
# valid results, e.g. valid filepaths.
Packit 1fb8d4
#
Packit 1fb8d4
# There are two modes of this function. The first argument in both modes is
Packit 1fb8d4
# the name of the Find-module where it is called (in original casing).
Packit 1fb8d4
#
Packit 1fb8d4
# The first simple mode looks like this:
Packit 1fb8d4
#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
Packit 1fb8d4
# If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND
Packit 1fb8d4
# will be set to TRUE.
Packit 1fb8d4
# If DEFAULT_MSG is given as second argument, then the function will generate
Packit 1fb8d4
# itself useful success and error messages. You can also supply a custom error message
Packit 1fb8d4
# for the failure case. This is not recommended.
Packit 1fb8d4
#
Packit 1fb8d4
# The second mode is more powerful and also supports version checking:
Packit 1fb8d4
#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
Packit 1fb8d4
#                                           [VERSION_VAR   <versionvar>]
Packit 1fb8d4
#                                           [HANDLE_COMPONENTS]
Packit 1fb8d4
#                                           [CONFIG_MODE]
Packit 1fb8d4
#                                           [FAIL_MESSAGE "Custom failure message"] )
Packit 1fb8d4
#
Packit 1fb8d4
# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND
Packit 1fb8d4
# will be set to TRUE.
Packit 1fb8d4
# After REQUIRED_VARS the variables which are required for this package are listed.
Packit 1fb8d4
# Following VERSION_VAR the name of the variable can be specified which holds
Packit 1fb8d4
# the version of the package which has been found. If this is done, this version
Packit 1fb8d4
# will be checked against the (potentially) specified required version used
Packit 1fb8d4
# in the find_package() call. The EXACT keyword is also handled. The default
Packit 1fb8d4
# messages include information about the required version and the version
Packit 1fb8d4
# which has been actually found, both if the version is ok or not.
Packit 1fb8d4
# If the package supports components, use the HANDLE_COMPONENTS option to enable
Packit 1fb8d4
# handling them. In this case, find_package_handle_standard_args() will report
Packit 1fb8d4
# which components have been found and which are missing, and the <NAME>_FOUND
Packit 1fb8d4
# variable will be set to FALSE if any of the required components (i.e. not the
Packit 1fb8d4
# ones listed after OPTIONAL_COMPONENTS) are missing.
Packit 1fb8d4
# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for
Packit 1fb8d4
# a find_package(... NO_MODULE) call.  In this case VERSION_VAR will be set
Packit 1fb8d4
# to <NAME>_VERSION and the macro will automatically check whether the
Packit 1fb8d4
# Config module was found.
Packit 1fb8d4
# Via FAIL_MESSAGE a custom failure message can be specified, if this is not
Packit 1fb8d4
# used, the default message will be displayed.
Packit 1fb8d4
#
Packit 1fb8d4
# Example for mode 1:
Packit 1fb8d4
#
Packit 1fb8d4
#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2  DEFAULT_MSG  LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
Packit 1fb8d4
#
Packit 1fb8d4
# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
Packit 1fb8d4
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
Packit 1fb8d4
# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
Packit 1fb8d4
# independent whether QUIET was used or not.
Packit 1fb8d4
# If it is found, success will be reported, including the content of <var1>.
Packit 1fb8d4
# On repeated Cmake runs, the same message won't be printed again.
Packit 1fb8d4
#
Packit 1fb8d4
# Example for mode 2:
Packit 1fb8d4
#
Packit 1fb8d4
#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON  REQUIRED_VARS BISON_EXECUTABLE
Packit 1fb8d4
#                                             VERSION_VAR BISON_VERSION)
Packit 1fb8d4
# In this case, BISON is considered to be found if the variable(s) listed
Packit 1fb8d4
# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case.
Packit 1fb8d4
# Also the version of BISON will be checked by using the version contained
Packit 1fb8d4
# in BISON_VERSION.
Packit 1fb8d4
# Since no FAIL_MESSAGE is given, the default messages will be printed.
Packit 1fb8d4
#
Packit 1fb8d4
# Another example for mode 2:
Packit 1fb8d4
#
Packit 1fb8d4
#    FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
Packit 1fb8d4
#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4  CONFIG_MODE)
Packit 1fb8d4
# In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE)
Packit 1fb8d4
# and adds an additional search directory for automoc4.
Packit 1fb8d4
# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
Packit 1fb8d4
# success/error message.
Packit 1fb8d4
Packit 1fb8d4
#=============================================================================
Packit 1fb8d4
# Copyright 2007-2009 Kitware, Inc.
Packit 1fb8d4
#
Packit 1fb8d4
# Distributed under the OSI-approved BSD License (the "License");
Packit 1fb8d4
# see accompanying file Copyright.txt for details.
Packit 1fb8d4
#
Packit 1fb8d4
# This software is distributed WITHOUT ANY WARRANTY; without even the
Packit 1fb8d4
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Packit 1fb8d4
# See the License for more information.
Packit 1fb8d4
#=============================================================================
Packit 1fb8d4
# (To distribute this file outside of CMake, substitute the full
Packit 1fb8d4
#  License text for the above reference.)
Packit 1fb8d4
Packit 1fb8d4
INCLUDE(FindPackageMessage)
Packit 1fb8d4
INCLUDE(CMakeParseArguments)
Packit 1fb8d4
Packit 1fb8d4
# internal helper macro
Packit 1fb8d4
MACRO(_FPHSA_FAILURE_MESSAGE _msg)
Packit 1fb8d4
  IF (${_NAME}_FIND_REQUIRED)
Packit 1fb8d4
    MESSAGE(FATAL_ERROR "${_msg}")
Packit 1fb8d4
  ELSE (${_NAME}_FIND_REQUIRED)
Packit 1fb8d4
    IF (NOT ${_NAME}_FIND_QUIETLY)
Packit 1fb8d4
      MESSAGE(STATUS "${_msg}")
Packit 1fb8d4
    ENDIF (NOT ${_NAME}_FIND_QUIETLY)
Packit 1fb8d4
  ENDIF (${_NAME}_FIND_REQUIRED)
Packit 1fb8d4
ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg)
Packit 1fb8d4
Packit 1fb8d4
Packit 1fb8d4
# internal helper macro to generate the failure message when used in CONFIG_MODE:
Packit 1fb8d4
MACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
Packit 1fb8d4
  # <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
Packit 1fb8d4
  IF(${_NAME}_CONFIG)
Packit 1fb8d4
    _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
Packit 1fb8d4
  ELSE(${_NAME}_CONFIG)
Packit 1fb8d4
    # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
Packit 1fb8d4
    # List them all in the error message:
Packit 1fb8d4
    IF(${_NAME}_CONSIDERED_CONFIGS)
Packit 1fb8d4
      SET(configsText "")
Packit 1fb8d4
      LIST(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
Packit 1fb8d4
      MATH(EXPR configsCount "${configsCount} - 1")
Packit 1fb8d4
      FOREACH(currentConfigIndex RANGE ${configsCount})
Packit 1fb8d4
        LIST(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
Packit 1fb8d4
        LIST(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
Packit 1fb8d4
        SET(configsText "${configsText}    ${filename} (version ${version})\n")
Packit 1fb8d4
      ENDFOREACH(currentConfigIndex)
Packit 1fb8d4
      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
Packit 1fb8d4
Packit 1fb8d4
    ELSE(${_NAME}_CONSIDERED_CONFIGS)
Packit 1fb8d4
      # Simple case: No Config-file was found at all:
Packit 1fb8d4
      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
Packit 1fb8d4
    ENDIF(${_NAME}_CONSIDERED_CONFIGS)
Packit 1fb8d4
  ENDIF(${_NAME}_CONFIG)
Packit 1fb8d4
ENDMACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
Packit 1fb8d4
Packit 1fb8d4
Packit 1fb8d4
FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
Packit 1fb8d4
Packit 1fb8d4
# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
Packit 1fb8d4
# new extended or in the "old" mode:
Packit 1fb8d4
  SET(options CONFIG_MODE HANDLE_COMPONENTS)
Packit 1fb8d4
  SET(oneValueArgs FAIL_MESSAGE VERSION_VAR)
Packit 1fb8d4
  SET(multiValueArgs REQUIRED_VARS)
Packit 1fb8d4
  SET(_KEYWORDS_FOR_EXTENDED_MODE  ${options} ${oneValueArgs} ${multiValueArgs} )
Packit 1fb8d4
  LIST(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
Packit 1fb8d4
Packit 1fb8d4
  IF(${INDEX} EQUAL -1)
Packit 1fb8d4
    SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
Packit 1fb8d4
    SET(FPHSA_REQUIRED_VARS ${ARGN})
Packit 1fb8d4
    SET(FPHSA_VERSION_VAR)
Packit 1fb8d4
  ELSE(${INDEX} EQUAL -1)
Packit 1fb8d4
Packit 1fb8d4
    CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}"  ${_FIRST_ARG} ${ARGN})
Packit 1fb8d4
Packit 1fb8d4
    IF(FPHSA_UNPARSED_ARGUMENTS)
Packit 1fb8d4
      MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
Packit 1fb8d4
    ENDIF(FPHSA_UNPARSED_ARGUMENTS)
Packit 1fb8d4
Packit 1fb8d4
    IF(NOT FPHSA_FAIL_MESSAGE)
Packit 1fb8d4
      SET(FPHSA_FAIL_MESSAGE  "DEFAULT_MSG")
Packit 1fb8d4
    ENDIF(NOT FPHSA_FAIL_MESSAGE)
Packit 1fb8d4
  ENDIF(${INDEX} EQUAL -1)
Packit 1fb8d4
Packit 1fb8d4
# now that we collected all arguments, process them
Packit 1fb8d4
Packit 1fb8d4
  IF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
Packit 1fb8d4
    SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
Packit 1fb8d4
  ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
Packit 1fb8d4
Packit 1fb8d4
  # In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
Packit 1fb8d4
  # when it successfully found the config-file, including version checking:
Packit 1fb8d4
  IF(FPHSA_CONFIG_MODE)
Packit 1fb8d4
    LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
Packit 1fb8d4
    LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
Packit 1fb8d4
    SET(FPHSA_VERSION_VAR ${_NAME}_VERSION)
Packit 1fb8d4
  ENDIF(FPHSA_CONFIG_MODE)
Packit 1fb8d4
Packit 1fb8d4
  IF(NOT FPHSA_REQUIRED_VARS)
Packit 1fb8d4
    MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
Packit 1fb8d4
  ENDIF(NOT FPHSA_REQUIRED_VARS)
Packit 1fb8d4
Packit 1fb8d4
  LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
Packit 1fb8d4
Packit 1fb8d4
  STRING(TOUPPER ${_NAME} _NAME_UPPER)
Packit 1fb8d4
  STRING(TOLOWER ${_NAME} _NAME_LOWER)
Packit 1fb8d4
Packit 1fb8d4
  # collect all variables which were not found, so they can be printed, so the
Packit 1fb8d4
  # user knows better what went wrong (#6375)
Packit 1fb8d4
  SET(MISSING_VARS "")
Packit 1fb8d4
  SET(DETAILS "")
Packit 1fb8d4
  SET(${_NAME_UPPER}_FOUND TRUE)
Packit 1fb8d4
  # check if all passed variables are valid
Packit 1fb8d4
  FOREACH(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
Packit 1fb8d4
    IF(NOT ${_CURRENT_VAR})
Packit 1fb8d4
      SET(${_NAME_UPPER}_FOUND FALSE)
Packit 1fb8d4
      SET(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
Packit 1fb8d4
    ELSE(NOT ${_CURRENT_VAR})
Packit 1fb8d4
      SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
Packit 1fb8d4
    ENDIF(NOT ${_CURRENT_VAR})
Packit 1fb8d4
  ENDFOREACH(_CURRENT_VAR)
Packit 1fb8d4
Packit 1fb8d4
  # component handling
Packit 1fb8d4
  UNSET(FOUND_COMPONENTS_MSG)
Packit 1fb8d4
  UNSET(MISSING_COMPONENTS_MSG)
Packit 1fb8d4
Packit 1fb8d4
  IF(FPHSA_HANDLE_COMPONENTS)
Packit 1fb8d4
    FOREACH(comp ${${_NAME}_FIND_COMPONENTS})
Packit 1fb8d4
      IF(${_NAME}_${comp}_FOUND)
Packit 1fb8d4
Packit 1fb8d4
        IF(NOT DEFINED FOUND_COMPONENTS_MSG)
Packit 1fb8d4
          SET(FOUND_COMPONENTS_MSG "found components: ")
Packit 1fb8d4
        ENDIF()
Packit 1fb8d4
        SET(FOUND_COMPONENTS_MSG "${FOUND_COMPONENTS_MSG} ${comp}")
Packit 1fb8d4
Packit 1fb8d4
      ELSE()
Packit 1fb8d4
Packit 1fb8d4
        IF(NOT DEFINED MISSING_COMPONENTS_MSG)
Packit 1fb8d4
          SET(MISSING_COMPONENTS_MSG "missing components: ")
Packit 1fb8d4
        ENDIF()
Packit 1fb8d4
        SET(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}")
Packit 1fb8d4
Packit 1fb8d4
        IF(${_NAME}_FIND_REQUIRED_${comp})
Packit 1fb8d4
          SET(${_NAME_UPPER}_FOUND FALSE)
Packit 1fb8d4
          SET(MISSING_VARS "${MISSING_VARS} ${comp}")
Packit 1fb8d4
        ENDIF()
Packit 1fb8d4
Packit 1fb8d4
      ENDIF()
Packit 1fb8d4
    ENDFOREACH(comp)
Packit 1fb8d4
    SET(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}")
Packit 1fb8d4
    SET(DETAILS "${DETAILS}[c${COMPONENT_MSG}]")
Packit 1fb8d4
  ENDIF(FPHSA_HANDLE_COMPONENTS)
Packit 1fb8d4
Packit 1fb8d4
  # version handling:
Packit 1fb8d4
  SET(VERSION_MSG "")
Packit 1fb8d4
  SET(VERSION_OK TRUE)
Packit 1fb8d4
  SET(VERSION ${${FPHSA_VERSION_VAR}} )
Packit 1fb8d4
  IF (${_NAME}_FIND_VERSION)
Packit 1fb8d4
Packit 1fb8d4
    IF(VERSION)
Packit 1fb8d4
Packit 1fb8d4
      IF(${_NAME}_FIND_VERSION_EXACT)       # exact version required
Packit 1fb8d4
        IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
Packit 1fb8d4
          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
Packit 1fb8d4
          SET(VERSION_OK FALSE)
Packit 1fb8d4
        ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
Packit 1fb8d4
          SET(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
Packit 1fb8d4
        ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
Packit 1fb8d4
Packit 1fb8d4
      ELSE(${_NAME}_FIND_VERSION_EXACT)     # minimum version specified:
Packit 1fb8d4
        IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
Packit 1fb8d4
          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
Packit 1fb8d4
          SET(VERSION_OK FALSE)
Packit 1fb8d4
        ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
Packit 1fb8d4
          SET(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")")
Packit 1fb8d4
        ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
Packit 1fb8d4
      ENDIF(${_NAME}_FIND_VERSION_EXACT)
Packit 1fb8d4
Packit 1fb8d4
    ELSE(VERSION)
Packit 1fb8d4
Packit 1fb8d4
      # if the package was not found, but a version was given, add that to the output:
Packit 1fb8d4
      IF(${_NAME}_FIND_VERSION_EXACT)
Packit 1fb8d4
         SET(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
Packit 1fb8d4
      ELSE(${_NAME}_FIND_VERSION_EXACT)
Packit 1fb8d4
         SET(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
Packit 1fb8d4
      ENDIF(${_NAME}_FIND_VERSION_EXACT)
Packit 1fb8d4
Packit 1fb8d4
    ENDIF(VERSION)
Packit 1fb8d4
  ELSE (${_NAME}_FIND_VERSION)
Packit 1fb8d4
    IF(VERSION)
Packit 1fb8d4
      SET(VERSION_MSG "(found version \"${VERSION}\")")
Packit 1fb8d4
    ENDIF(VERSION)
Packit 1fb8d4
  ENDIF (${_NAME}_FIND_VERSION)
Packit 1fb8d4
Packit 1fb8d4
  IF(VERSION_OK)
Packit 1fb8d4
    SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
Packit 1fb8d4
  ELSE(VERSION_OK)
Packit 1fb8d4
    SET(${_NAME_UPPER}_FOUND FALSE)
Packit 1fb8d4
  ENDIF(VERSION_OK)
Packit 1fb8d4
Packit 1fb8d4
Packit 1fb8d4
  # print the result:
Packit 1fb8d4
  IF (${_NAME_UPPER}_FOUND)
Packit 1fb8d4
    FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}")
Packit 1fb8d4
  ELSE (${_NAME_UPPER}_FOUND)
Packit 1fb8d4
Packit 1fb8d4
    IF(FPHSA_CONFIG_MODE)
Packit 1fb8d4
      _FPHSA_HANDLE_FAILURE_CONFIG_MODE()
Packit 1fb8d4
    ELSE(FPHSA_CONFIG_MODE)
Packit 1fb8d4
      IF(NOT VERSION_OK)
Packit 1fb8d4
        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
Packit 1fb8d4
      ELSE(NOT VERSION_OK)
Packit 1fb8d4
        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
Packit 1fb8d4
      ENDIF(NOT VERSION_OK)
Packit 1fb8d4
    ENDIF(FPHSA_CONFIG_MODE)
Packit 1fb8d4
Packit 1fb8d4
  ENDIF (${_NAME_UPPER}_FOUND)
Packit 1fb8d4
Packit 1fb8d4
  SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
Packit 1fb8d4
Packit 1fb8d4
ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG)