<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/lightning-talk-2-new-nice-cmake-features-i-learned-in-2025---lieven-de-cock-gls9rtslb" -->

---
title: Lightning Talk: 2 New Nice CMake Features I Learned in...
description: A lightning talk covers two newer CMake features: VERIFY_INTERFACE_HEADER_SETS, which catches headers that compile only thanks to transitive includes by...
canonical: https://daily.dev/posts/lightning-talk-2-new-nice-cmake-features-i-learned-in-2025---lieven-de-cock-gls9rtslb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Lightning Talk: 2 New Nice CMake Features I Learned in 2025 - Lieven de Cock | daily.dev
og:description: A lightning talk covers two newer CMake features: VERIFY_INTERFACE_HEADER_SETS, which catches headers that compile only thanks to transitive includes by...
og:url: https://daily.dev/posts/lightning-talk-2-new-nice-cmake-features-i-learned-in-2025---lieven-de-cock-gls9rtslb
og:image: https://api.daily.dev/og/posts/GLS9RTsLb.png
og:image:alt: Lightning Talk: 2 New Nice CMake Features I Learned in 2025 - Lieven de Cock
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Lightning Talk: 2 New Nice CMake Features I Learned in 2025 - Lieven de Cock

**[C\+\+Online](https://daily.dev/sources/cpponline)** · 11 min read · 0 upvotes · 0 comments

## Summary

A lightning talk covers two newer CMake features: VERIFY_INTERFACE_HEADER_SETS, which catches headers that compile only thanks to transitive includes by generating verify targets that fail the build when a header doesn't compile standalone, and CODEGEN, a keyword for add_custom_command that lets developers generate build-time sources (e.g., from protobuf-like generators) without a full build, so static analyzers can run on generated files directly. Both are demonstrated with small artificial examples showing target setup, tab-completion of new make targets, and resulting build directory contents.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=YnWJyHxHpBc>

## Questions this post answers

### What does CMake's VERIFY_INTERFACE_HEADER_SETS target property do?

It adds a verify target for each library target (plus an overall verify-all target) that compiles each header in a header file set in isolation, catching headers that only compile because of transitive includes pulled in by the consuming source file. Enabling it on a target, or via a CMake-wide variable for all targets, lets a CI build fail when a header is missing an include it actually needs.

_Teams tightening CMake build hygiene can track feature notes like this via daily.dev._

### How can I run static analysis on CMake targets that rely on generated source files without doing a full build first?

Use CMake's CODEGEN keyword inside add_custom_command, which tells CMake that a custom command produces generated sources. Running the build against the special codegen target then generates only those sources (for example, headers and cpp files produced by a custom generator script) without building the rest of the source tree, so static analyzers can find the generated files immediately.

_Developers wiring static analysis into CMake pipelines can follow build-tooling changes like this on daily.dev._

## Similar posts on daily.dev

- [Visual Studio Code CMake Tools 1.24](https://daily.dev/posts/visual-studio-code-cmake-tools-1-24-zlz14wato) · DevBlogs · 1 upvotes · 0 comments

---

Tags: [#c](https://daily.dev/tags/c), [#c++](https://daily.dev/tags/c++), [#build-systems](https://daily.dev/tags/build-systems)

[View this post on daily.dev](https://daily.dev/posts/lightning-talk-2-new-nice-cmake-features-i-learned-in-2025---lieven-de-cock-gls9rtslb)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Lightning Talk: 2 New Nice CMake Features I Learned in 2025 - Lieven de Cock","url":"https://daily.dev/posts/lightning-talk-2-new-nice-cmake-features-i-learned-in-2025---lieven-de-cock-gls9rtslb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/lightning-talk-2-new-nice-cmake-features-i-learned-in-2025---lieven-de-cock-gls9rtslb"},"datePublished":"2026-08-14T12:56:40.239Z","dateModified":"2026-08-14T12:57:01.451Z","description":"A lightning talk covers two newer CMake features: VERIFY_INTERFACE_HEADER_SETS, which catches headers that compile only thanks to transitive includes by...","image":"https://i.ytimg.com/vi/YnWJyHxHpBc/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/YnWJyHxHpBc/sddefault.jpg","isAccessibleForFree":true,"articleSection":"C++Online","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"C++Online","logo":"https://media.daily.dev/image/upload/s--8WzMvjLJ--/f_auto,q_auto/v1783236334/logos/cpponline","url":"https://daily.dev/sources/cpponline"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/lightning-talk-2-new-nice-cmake-features-i-learned-in-2025---lieven-de-cock-gls9rtslb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c,c++,build-systems","timeRequired":"PT11M","video":{"@type":"VideoObject","name":"Lightning Talk: 2 New Nice CMake Features I Learned in 2025 - Lieven de Cock","description":"A lightning talk covers two newer CMake features: VERIFY_INTERFACE_HEADER_SETS, which catches headers that compile only thanks to transitive includes by...","thumbnailUrl":"https://i.ytimg.com/vi/YnWJyHxHpBc/sddefault.jpg","uploadDate":"2026-08-14T12:56:40.239Z","duration":"PT11M","url":"https://api.daily.dev/r/GLS9RTsLb","embedUrl":"https://www.youtube.com/embed/YnWJyHxHpBc"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"C++Online","item":"https://daily.dev/sources/cpponline"},{"@type":"ListItem","position":3,"name":"Lightning Talk: 2 New Nice CMake Features I Learned in 2025 - Lieven de Cock"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/lightning-talk-2-new-nice-cmake-features-i-learned-in-2025---lieven-de-cock-gls9rtslb#faq","mainEntity":[{"@type":"Question","name":"What does CMake's VERIFY_INTERFACE_HEADER_SETS target property do?","acceptedAnswer":{"@type":"Answer","text":"It adds a verify target for each library target (plus an overall verify-all target) that compiles each header in a header file set in isolation, catching headers that only compile because of transitive includes pulled in by the consuming source file. Enabling it on a target, or via a CMake-wide variable for all targets, lets a CI build fail when a header is missing an include it actually needs. Teams tightening CMake build hygiene can track feature notes like this via daily.dev."}},{"@type":"Question","name":"How can I run static analysis on CMake targets that rely on generated source files without doing a full build first?","acceptedAnswer":{"@type":"Answer","text":"Use CMake's CODEGEN keyword inside add_custom_command, which tells CMake that a custom command produces generated sources. Running the build against the special codegen target then generates only those sources (for example, headers and cpp files produced by a custom generator script) without building the rest of the source tree, so static analyzers can find the generated files immediately. Developers wiring static analysis into CMake pipelines can follow build-tooling changes like this on daily.dev."}}]}
```

