{
  "id": "cmake/policy-cmp0077-not-set",
  "signature": "CMake Warning (dev): Policy CMP0077 is not set: option() honors normal variables. Run \"cmake --help-policy CMP0077\" for policy details. Use the cmake_policy command to set the policy and suppress this warning.",
  "signature_zh": "CMake警告（开发）：未设置策略CMP0077：option()尊重普通变量。运行\"cmake --help-policy CMP0077\"查看策略详情。使用cmake_policy命令设置策略并抑制此警告。",
  "regex": "Policy CMP0077 is not set: option\\(\\) honors normal variables\\.",
  "domain": "cmake",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "CMake policy CMP0077 is not explicitly set, causing option() to behave inconsistently when a normal variable with the same name exists.",
  "root_cause_type": "generic",
  "root_cause_zh": "未显式设置CMake策略CMP0077，导致当存在同名普通变量时，option()行为不一致。",
  "versions": [
    {
      "version": "CMake 3.13",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "CMake 3.14",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "CMake 3.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The warning may lead to subtle bugs where option() does not behave as expected, especially in cache variable scenarios.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "OLD behavior may break modern CMake patterns and cause unexpected cache variable behavior.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set the policy to NEW at the beginning of CMakeLists.txt: cmake_policy(SET CMP0077 NEW)",
      "success_rate": 0.95,
      "how": "Set the policy to NEW at the beginning of CMakeLists.txt: cmake_policy(SET CMP0077 NEW)",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the old behavior is needed, set to OLD: cmake_policy(SET CMP0077 OLD), but this is not recommended for new projects.",
      "success_rate": 0.8,
      "how": "If the old behavior is needed, set to OLD: cmake_policy(SET CMP0077 OLD), but this is not recommended for new projects.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在CMakeLists.txt开头设置策略为NEW：cmake_policy(SET CMP0077 NEW)",
    "如果需要旧行为，设置为OLD：cmake_policy(SET CMP0077 OLD)，但不推荐用于新项目。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://cmake.org/cmake/help/latest/policy/CMP0077.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-07-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}