# CMake Target Compile-Definition Transitivity Analyzer

> CMake Target Compile-Definition Transitivity Analyzer is a paid API for AI agents from detect.halowerk.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-04).

Computes which preprocessor definitions are visible to each CMake target under PRIVATE, INTERFACE, and transitive dependency scopes, including diamond deduplication.

## Facts

- Endpoint: POST https://detect.halowerk.com/v1/F-A-NIGHT-OS-CMAKE-USAGE/cmake-target-compile-definition-transitivity?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-04
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cmake-target-compile-definition-transitivity-analyzer-c108dbdc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UXiDMDaP2MVyuhrflAnKn

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability cmake-target-compile-definition-transitivity-analyzer-c108dbdc -d '<json body>'
```

Example prompt: I have a CMake target graph with targets 1, 2, and 3 — target 1 defines MACRO_A privately and MACRO_B as an interface, target 2 links to target 1 as INTERFACE and adds MACRO_C privately, target 3 links to both — can you resolve which preprocessor definitions each target actually sees, handling the diamond deduplication correctly, for query targets 2 and 3?

## When to prefer this

Use this endpoint when you need to statically resolve CMake compile-definition transitivity — especially for authoring compile-database fixtures offline, verifying PRIVATE/INTERFACE scope boundaries, or debugging diamond dependency deduplication — rather than running CMake itself or parsing raw CMakeLists files.

## Known failure modes

- Cyclic dependency graphs may cause undefined behavior or timeout
- Target IDs referenced in links but not declared in targets array will produce errors or incomplete results
- Exceeding 512 targets, 512 links, or 512 definitions per target will be rejected
- Numeric ID collisions or out-of-range values may cause mapping errors
- Empty query_targets array returns no results

## How this service works

An offline CMake compile-database fixture author needs exactly which anonymous preprocessor definitions affect each target build versus downstream interface, especially PRIVATE dependency boundaries, INTERFACE-only links and diamond origin deduplication.

## Output

The endpoint returns, for each queried target, the resolved set of preprocessor definitions visible during compilation — broken down by scope (PRIVATE definitions local to the target, INTERFACE definitions propagated to consumers, and the full transitive set after graph traversal and diamond deduplication).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "artifact": {
   "type": "object",
   "required": [
    "cmake_usage"
   ],
   "properties": {
    "cmake_usage": {
     "type": "object",
     "required": [
      "claim",
      "query_targets",
      "targets"
     ],
     "properties": {
      "claim": {
       "type": "number",
       "maximum": 1000000000000,
       "minimum": -1000000000000
      },
      "targets": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "definitions",
         "id",
         "links"
        ],
        "properties": {
         "id": {
          "type": "number",
          "maximum": 1000000000000,
          "minimum": -1000000000000
         },
         "links": {
          "type": "array",
          "items": {
           "type": "object",
           "required": [
            "scope",
            "target"
           ],
           "properties": {
            "scope": {
             "type": "number",
             "maximum": 1000000000000,
             "minimum": -1000000000000
            },
            "target": {
             "type": "number",
             "maximum": 1000000000000,
             "minimum": -1000000000000
            }
           },
           "additionalProperties": false
          },
          "maxItems": 512
         },
         "definitions": {
          "type": "array",
          "items": {
           "type": "object",
           "required": [
            "definition",
            "scope"
           ],
           "properties": {
            "scope": {
             "type": "number",
             "maximum": 1000000000000,
             "minimum": -1000000000000
            },
            "definition": {
             "type": "number",
             "maximum": 1000000000000,
             "minimum": -1000000000000
            }
           },
           "additionalProperties": false
          },
          "maxItems": 512
         }
        },
        "additionalProperties": false
       },
       "maxItems": 512
      },
      "query_targets": {
       "type": "array",
       "items": {
        "type": "number",
        "maximum": 1000000000000,
        "minimum": -1000000000000
       },
       "maxItems": 512
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cmake-target-compile-definition-transitivity-analyzer-c108dbdc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from detect.halowerk.com](https://www.zero.xyz/host/detect.halowerk.com/llms.txt)
