ModuleMapGenerator

    A module map generator for Clang targets. Module map generation consists of two steps:

    ModuleMapGenerator.swift:69
    struct ModuleMapGenerator
    1. Examining a module’s public-headers directory to determine the appropriate module map type

    2. Generating a module map for any module that doesn’t have a custom module map file

    When a custom module map exists in the header directory, it is used as-is. When a custom module map does not exist, a module map is generated based on the following rules:

    • If “include/foo/foo.h” exists and foo is the only directory under the “include” directory, and the “include” directory contains no header files: Generates: umbrella header "/path/to/include/foo/foo.h"

    • If “include/foo.h” exists and “include” contains no other subdirectory: Generates: umbrella header "/path/to/include/foo.h"

    • Otherwise, if the “include” directory only contains header files and no other subdirectory: Generates: umbrella "path/to/include"

    These rules are documented at https://github.com/apple/swift-package-manager/blob/master/Documentation/Usage.md#creating-c-language-targets. To avoid breaking existing packages, do not change the semantics here without making any change conditional on the tools version of the package that defines the module.

    Note that a module map generator doesn’t require a module to already have been instantiated; it can operate on information that will later be used to instantiate a module.

    Citizens in PackageLoading

    Type members

    Instance members