{
  "id": "cmake/policy-cmp0068-not-set",
  "signature": "CMake Error: Policy CMP0068 is not set: RPATH settings on macOS do not affect install_name.",
  "signature_zh": "CMake 错误：未设置策略 CMP0068：macOS 上的 RPATH 设置不影响 install_name。",
  "regex": "^CMake Error: Policy CMP0068 is not set: RPATH settings on macOS do not affect install_name\\.",
  "domain": "cmake",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "CMake policy CMP0068 is not set. On macOS, the build system may generate incorrect install_name for shared libraries, leading to runtime linking issues.",
  "root_cause_type": "generic",
  "root_cause_zh": "未设置 CMake 策略 CMP0068。在 macOS 上，构建系统可能为共享库生成错误的 install_name，导致运行时链接问题。",
  "versions": [
    {
      "version": "CMake 3.9+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "macOS 10.12+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Xcode 9+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This may break relocation or cause install_name to be hardcoded, not solving the policy mismatch.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error may cause runtime library loading failures on macOS; ignoring it does not fix the root cause.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add `cmake_policy(SET CMP0068 NEW)` before any target creation in CMakeLists.txt to adopt new behavior.",
      "success_rate": 0.85,
      "how": "Add `cmake_policy(SET CMP0068 NEW)` before any target creation in CMakeLists.txt to adopt new behavior.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Alternatively, set policy to OLD: `cmake_policy(SET CMP0068 OLD)` to use legacy behavior if needed.",
      "success_rate": 0.8,
      "how": "Alternatively, set policy to OLD: `cmake_policy(SET CMP0068 OLD)` to use legacy behavior if needed.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在任何目标创建之前，在 CMakeLists.txt 中添加 `cmake_policy(SET CMP0068 NEW)` 以采用新行为。",
    "或者，如果旧行为更合适，设置策略为 OLD：`cmake_policy(SET CMP0068 OLD)`。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://cmake.org/cmake/help/latest/policy/CMP0068.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}