CMP0078 — CMake 4.2.6 Documentation

# CMP0078

Added in version 3.13.

`UseSWIG` generates standard target names.

Starting with CMake 3.13, `UseSWIG` generates now standard target names. This policy provides compatibility with projects that expect the legacy behavior.

The `OLD` behavior for this policy relies on `UseSWIG_TARGET_NAME_PREFERENCE` variable that can be used to specify an explicit preference. The value may be one of:

- `LEGACY`: legacy strategy is applied. Variable `SWIG_MODULE_<name>_REAL_NAME` must be used to get real target name. This is the default if not specified.

- `STANDARD`: target name matches specified name.

This policy was introduced in CMake version 3.13. It may be set by `cmake_policy()` or `cmake_minimum_required()`. If it is not set, CMake warns, and uses `OLD` behavior.

Note

The `OLD` behavior of a policy is `deprecated by definition` and may be removed in a future version of CMake.