# CMake Error: Policy CMP0068 is not set: RPATH settings on macOS do not affect install_name.

- **ID:** `cmake/policy-cmp0068-not-set`
- **Domain:** cmake
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## 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.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| CMake 3.9+ | active | — | — |
| macOS 10.12+ | active | — | — |
| Xcode 9+ | active | — | — |

## Workarounds

1. **Add `cmake_policy(SET CMP0068 NEW)` before any target creation in CMakeLists.txt to adopt new behavior.** (85% success)
   ```
   Add `cmake_policy(SET CMP0068 NEW)` before any target creation in CMakeLists.txt to adopt new behavior.
   ```
2. **Alternatively, set policy to OLD: `cmake_policy(SET CMP0068 OLD)` to use legacy behavior if needed.** (80% success)
   ```
   Alternatively, set policy to OLD: `cmake_policy(SET CMP0068 OLD)` to use legacy behavior if needed.
   ```

## Dead Ends

- **** — This may break relocation or cause install_name to be hardcoded, not solving the policy mismatch. (70% fail)
- **** — The error may cause runtime library loading failures on macOS; ignoring it does not fix the root cause. (90% fail)
