{"uid":"cap_UXiDMDaP2MVyuhrflAnKn","slug":"cmake-target-compile-definition-transitivity-analyzer-c108dbdc","name":"CMake Target Compile-Definition Transitivity Analyzer","description":"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.","url":"https://detect.halowerk.com/v1/F-A-NIGHT-OS-CMAKE-USAGE/cmake-target-compile-definition-transitivity?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hTeaPPQtRFUXH5ATpiifV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes which preprocessor definitions are visible to each CMake target under PRIVATE, INTERFACE, and transitive dependency scopes, including diamond deduplication.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Compile-database fixture authoring","prompt":"I'm writing an offline CMake compile-database fixture and I need to know exactly which preprocessor definitions targets 5 and 7 inherit given this target graph — target 5 links target 3 as PRIVATE and target 4 as INTERFACE, target 7 links both 3 and 5 as INTERFACE. Can you compute the visible definitions for query targets 5 and 7 and show me the PRIVATE vs transitive split?"},{"title":"Diagnosing PRIVATE boundary leakage","prompt":"I think a PRIVATE compile definition on my CMake library target is leaking into downstream consumers — can you take this target graph with targets 10, 11, and 12 and tell me which definitions each query target actually sees so I can confirm the PRIVATE boundary is respected?"},{"title":"Diamond dependency deduplication check","prompt":"I have a classic diamond CMake dependency — targets A and B both link target C, and target D links both A and B — all as INTERFACE. I need you to compute which compile definitions target D ends up with after deduplication, given these definition and link entries."}],"resultDescription":"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).","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-04T06:40:17.161Z","isFirstParty":false,"canonicalSlug":"cmake-target-compile-definition-transitivity-analyzer-c108dbdc"}