7.4.7 swift sdk configuration reset

原文链接: https://docs.swift.org/latest/documentation/packagemanagerdocs/sdkconfigurationreset/

7.4.7 swift sdk configuration reset

重置当前应用到某个 Swift SDK 和目标三元组的配置属性。如果没有指定具体属性,则重置该 Swift SDK 的所有属性。

sdk configuration reset [--package-path=<package-path>]
  [--cache-path=<cache-path>] [--config-path=<config-path>]
  [--security-path=<security-path>]
  [--scratch-path=<scratch-path>]
  [--swift-sdks-path=<swift-sdks-path>]
  [--toolset=<toolset>...]
  [--pkg-config-path=<pkg-config-path>...] [--sdk-root-path]
  [--swift-resources-path] [--swift-static-resources-path]
  [--include-search-path] [--library-search-path]
  [--toolset-path] <sdk-id> <target-triple> [--version]
  [--help]
  • –package-path=<package-path>:

指定要操作的包路径(默认为当前目录)。这会先切换工作目录,然后再执行其他任何操作。

  • –cache-path=<cache-path>:

指定共享缓存目录的路径。

  • –config-path=<config-path>:

指定共享配置目录的路径。

  • –security-path=<security-path>:

指定共享安全目录的路径。

  • –scratch-path=<scratch-path>:

指定自定义的临时构建目录路径。(默认 .build)

  • –swift-sdks-path=<swift-sdks-path>:

包含已安装 Swift SDK 的目录路径。

  • –toolset=<toolset>:

指定为目标平台构建时使用的工具集 JSON 文件。可以多次使用该选项来指定多个工具集。各个工具集会按指定顺序合并为当前构建的单个最终工具集。

  • –pkg-config-path=<pkg-config-path>:

指定搜索 pkg-config .pc 文件的替代路径。可以多次使用该选项来指定多个路径。

  • –sdk-root-path:

重置包含 SDK 根目录的目录路径的自定义配置。

  • –swift-resources-path:

重置包含用于动态链接的 Swift 资源的目录路径的自定义配置。

  • –swift-static-resources-path:

重置包含用于静态链接的 Swift 资源的目录路径的自定义配置。

  • –include-search-path:

重置包含头文件的目录路径的自定义配置。

  • –library-search-path:

重置包含库的目录路径的自定义配置。

  • –toolset-path:

重置工具集文件路径的自定义配置。

  • sdk-id:

已安装 Swift SDK 的标识符。使用 list 子命令查看所有可用的标识符。

  • target-triple:

由 sdk-id 标识字符串指定的 Swift SDK 的目标三元组。

  • –version:

显示版本。

  • –help:

显示帮助信息。