cmaize.project/impl_/check_target

cmaize.project/impl_/check_target._check_target(self __ct_found **kwargs)

Checks if a target with the same name is already added to this project. This defaults to build targets.

This internal implementation exists so a required keyword argument is not part of the public interface, as well as to handle both desc and target types. Both types are effectively strings representing target names in this algorithm and can be treated equivalently, but cannot be typecast to each other by CMakePPLang. The CMakePPLang type checking is bypassed through the aforementioned required keyword argument for the target name, essentially combining the two types.

Parameters:
  • __ct_found (bool*) – Return variable for whether the target was found.

  • NAME (desc or target) – Required keyword argument. See description below.

  • **kwargs

    Additional keyword arguments may be necessary.

Keyword Arguments:
  • INSTALLED (bool) – Flag to indicate that the installed targets should be checked.

  • ALL (bool) – Flag to indicate that both the build and installed targets should be checked.

  • NAME (desc or target) – Identifying name for a target contained in the current Cmaize project. This keyword argument is required.

Returns:

CMaizeTarget found (TRUE) or not (FALSE).

Return type:

bool