# Development

**URL:** https://discourse.cmake.org/c/development/9.md?page=2

[Latest](https://discourse.cmake.org/latest.md) · [Categories](https://discourse.cmake.org/categories.md) · [Tags](https://discourse.cmake.org/tags.md)

**Page:** 3

---

## ['codegen' target when generating only headers](https://discourse.cmake.org/t/codegen-target-when-generating-only-headers/15537)

<div class="topic-metadata">

**Author:** [@Lieven](https://discourse.cmake.org/u/Lieven)\
**Replies:** 10\
**Last updated:** [March 10, 2026, 8:58pm UTC](https://discourse.cmake.org/t/codegen-target-when-generating-only-headers/15537 "2026-03-10T20:58:08Z")

</div>

I wonder if the following behavior is a bug or was intended. When a custom target/command pattern is used to generate code (say some cpp files (with or without some header files)), the new codegen feature works correctly…

---

## [Experimental \`import std\` support not enabled when detecting toolchain clang-22.1?](https://discourse.cmake.org/t/experimental-import-std-support-not-enabled-when-detecting-toolchain-clang-22-1/15534)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 1\
**Last updated:** [March 1, 2026, 1:00pm UTC](https://discourse.cmake.org/t/experimental-import-std-support-not-enabled-when-detecting-toolchain-clang-22-1/15534 "2026-03-01T13:00:41Z")

</div>

bash-5.3$ ~/.local/bin/cmake --workflow llvm-release --fresh Executing workflow step 1 of 3: configure preset "llvm-release" -- CXXFLAGS=-stdlib=libc++ 'brew' '--prefix' 'llvm' -- LLVM\_DIR=/usr/local/Cellar/llvm/22.1.0 …

---

## [New \`discover\_tests\` command](https://discourse.cmake.org/t/new-discover-tests-command/15533)

<div class="topic-metadata">

**Author:** [@purpleKarrot](https://discourse.cmake.org/u/purpleKarrot)\
**Replies:** 2\
**Last updated:** [February 28, 2026, 6:50am UTC](https://discourse.cmake.org/t/new-discover-tests-command/15533 "2026-02-28T06:50:04Z")

</div>

I would like to get more eyes on my prototype for a new discover\_tests() command. The full signature is as follows: discover\_tests(COMMAND \<command\> \[\<arg\>...\] \[CONFIGURATIONS \<config\>...\] DISCOVERY\_ARGS \<arg\>... …

---

## [CMAKE\_CXX\_MODULE\_STD: cmake cmake v4.3.0-rc1 generate 30 times more targets?](https://discourse.cmake.org/t/cmake-cxx-module-std-cmake-cmake-v4-3-0-rc1-generate-30-times-more-targets/15512)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 4\
**Last updated:** [February 27, 2026, 3:43pm UTC](https://discourse.cmake.org/t/cmake-cxx-module-std-cmake-cmake-v4-3-0-rc1-generate-30-times-more-targets/15512 "2026-02-27T15:43:36Z")

</div>

@ben.boeckel the dependency scan seems to be the overkill at the moment? bash-5.3$ make release cmake --preset release --log-level=VERBOSE --fresh Preset CMake variables: BEMAN\_USE\_MODULES:BOOL="TRUE" BEMAN\_USE\_STD…

---

## [Did CMake developers know about imake from the X WIndow System?](https://discourse.cmake.org/t/did-cmake-developers-know-about-imake-from-the-x-window-system/15522)

<div class="topic-metadata">

**Author:** [@LegalizeAdulthood](https://discourse.cmake.org/u/LegalizeAdulthood)\
**Replies:** 4\
**Last updated:** [February 25, 2026, 9:12pm UTC](https://discourse.cmake.org/t/did-cmake-developers-know-about-imake-from-the-x-window-system/15522 "2026-02-25T21:12:34Z")

</div>

imake and CMake solve some of the same problems, but from a completely different approach. I was just curious if the CMake developers were aware of imake and what they thought of it at the time they decided to create CM…

---

## [Extending find\_library to take NAME\_SUFFIXES](https://discourse.cmake.org/t/extending-find-library-to-take-name-suffixes/15520)

<div class="topic-metadata">

**Author:** [@KBentley57](https://discourse.cmake.org/u/KBentley57)\
**Replies:** 2\
**Last updated:** [February 20, 2026, 9:59pm UTC](https://discourse.cmake.org/t/extending-find-library-to-take-name-suffixes/15520 "2026-02-20T21:59:06Z")

</div>

Hi guys, I was in the process of writing a module for finding libusb-1.0, and I hit a snag that has been a common pattern I’ve had for a while. Sometimes I have an SDK that requires a library, like libusb-1.0. I have …

---

## [How to add a cppm static library with the same configuration as lib\_\_cmake\_cxx23a](https://discourse.cmake.org/t/how-to-add-a-cppm-static-library-with-the-same-configuration-as-lib-cmake-cxx23a/15302)

<div class="topic-metadata">

**Author:** [@mochunshuang](https://discourse.cmake.org/u/mochunshuang)\
**Replies:** 13\
**Last updated:** [February 20, 2026, 2:20pm UTC](https://discourse.cmake.org/t/how-to-add-a-cppm-static-library-with-the-same-configuration-as-lib-cmake-cxx23a/15302 "2026-02-20T14:20:07Z")

</div>

I found that the generated printing of the library is inconsistent, so I am here to ask. \[main\] 正在配置项目: vulkan \[proc\] 正在执行命令: E:\\mysoftware\\cmake-4.2.0-rc2-windows-x86\_64\\bin\\cmake.EXE -DCMAKE\_INSTALL\_PREFIX=E:/0\_githu…

---

## [Consistent linking option using shared libraries within FindMPI.](https://discourse.cmake.org/t/consistent-linking-option-using-shared-libraries-within-findmpi/14249)

<div class="topic-metadata">

**Author:** [@green-br](https://discourse.cmake.org/u/green-br)\
**Replies:** 3\
**Last updated:** [February 20, 2026, 4:51am UTC](https://discourse.cmake.org/t/consistent-linking-option-using-shared-libraries-within-findmpi/14249 "2026-02-20T04:51:42Z")

</div>

When building with Cray MPICH it seems to default is to us a static MPI library. I have in the project set BUILD\_SHARED\_LIBS so my resulting library is shared but since the Cray MPICH compiler is building statically it …

---

## [Exporting (some selected) properties via the file API ?](https://discourse.cmake.org/t/exporting-some-selected-properties-via-the-file-api/15511)

<div class="topic-metadata">

**Author:** [@neundorf](https://discourse.cmake.org/u/neundorf)\
**Replies:** 1\
**Last updated:** [February 16, 2026, 1:53pm UTC](https://discourse.cmake.org/t/exporting-some-selected-properties-via-the-file-api/15511 "2026-02-16T13:53:48Z")

</div>

Hi, as far as I can see target properties are not exported via the file API. I was a bit surprised to see that. That would be an easy (I think) way to get information to IDEs. This could be command line arguments for a…

---

## [How to install multiple FILE\_SET for a library in a generic way?](https://discourse.cmake.org/t/how-to-install-multiple-file-set-for-a-library-in-a-generic-way/15489)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 24\
**Last updated:** [February 11, 2026, 3:47pm UTC](https://discourse.cmake.org/t/how-to-install-multiple-file-set-for-a-library-in-a-generic-way/15489 "2026-02-11T15:47:46Z")

</div>

With this CMake code snippet from boost/tools/cmake I can install i.e Boost::any lib with HEADERS and CXX\_MODULES. But it fails, if there is more than one FILE\_SET used in a library target! if(NOT CMAKE\_VERSION VERSIO…

---

## [Platform RDOS](https://discourse.cmake.org/t/platform-rdos/15506)

<div class="topic-metadata">

**Author:** [@rdos](https://discourse.cmake.org/u/rdos)\
**Replies:** 1\
**Last updated:** [February 10, 2026, 3:57pm UTC](https://discourse.cmake.org/t/platform-rdos/15506 "2026-02-10T15:57:06Z")

</div>

I need a new target OS for the OpenWatcom compiler. The compiler id configuration file contains this code: #elif defined(\_\_WATCOMC\_\_) # if defined(\_\_LINUX\_\_) # define PLATFORM\_ID "Linux" # elif defined(\_\_DOS\_\_) # de…

---

## [Dynamic package generation](https://discourse.cmake.org/t/dynamic-package-generation/15348)

<div class="topic-metadata">

**Author:** [@tom](https://discourse.cmake.org/u/tom)\
**Replies:** 2\
**Last updated:** [February 9, 2026, 8:43pm UTC](https://discourse.cmake.org/t/dynamic-package-generation/15348 "2026-02-09T20:43:54Z")

</div>

I have a very large C++ repo that I would like to ship as both a single monolith and lots of individual components. I would like to use CPack to package, but I don’t want developers to have to manually maintain package …

---

## [@\*.cppm.o.modmap files not found by clang-tidy?](https://discourse.cmake.org/t/cppm-o-modmap-files-not-found-by-clang-tidy/15354)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 2\
**Last updated:** [February 9, 2026, 3:54am UTC](https://discourse.cmake.org/t/cppm-o-modmap-files-not-found-by-clang-tidy/15354 "2026-02-09T03:54:16Z")

</div>

is it a clang-tidy problem oder a wrong CMake generated compile\_commands.jsonfile? Running clang-tidy for 4 files out of 4 in compilation database ... \[1/4\]\[6.3s\] /usr/local/Cellar/llvm/21.1.6/bin/clang-tidy -checks=-\*,…

---

## [import std appears to be broken in release 4.0.2](https://discourse.cmake.org/t/import-std-appears-to-be-broken-in-release-4-0-2/14062)

<div class="topic-metadata">

**Author:** [@abbator](https://discourse.cmake.org/u/abbator)\
**Replies:** 5\
**Last updated:** [February 9, 2026, 3:47am UTC](https://discourse.cmake.org/t/import-std-appears-to-be-broken-in-release-4-0-2/14062 "2026-02-09T03:47:06Z")

</div>

I attempted to upgrade to 4.0.2 but found that my modules projects using import std are now unbuildable. I’m using Visual Studio Community 17.15.0 Preview 4.0 + Ninja. After fiddling across a large-scale project with a …

---

## [Should cache values in CMakePresets.json "only" be "presets" , how are IDEs supposed to handle them ?](https://discourse.cmake.org/t/should-cache-values-in-cmakepresets-json-only-be-presets-how-are-ides-supposed-to-handle-them/15430)

<div class="topic-metadata">

**Author:** [@neundorf](https://discourse.cmake.org/u/neundorf)\
**Replies:** 15\
**Last updated:** [February 9, 2026, 2:38am UTC](https://discourse.cmake.org/t/should-cache-values-in-cmakepresets-json-only-be-presets-how-are-ides-supposed-to-handle-them/15430 "2026-02-09T02:38:07Z")

</div>

Hi, in CMakePresets.json I can define the values of cmake cache variables. I was assuming that the values I set there are “only” presets, i.e. the values used when initially running cmake. For that I provided some conf…

---

## [mark\_as\_advanced strange behaviour](https://discourse.cmake.org/t/mark-as-advanced-strange-behaviour/15461)

<div class="topic-metadata">

**Author:** [@Tharrik](https://discourse.cmake.org/u/Tharrik)\
**Replies:** 1\
**Last updated:** [February 9, 2026, 2:20am UTC](https://discourse.cmake.org/t/mark-as-advanced-strange-behaviour/15461 "2026-02-09T02:20:54Z")

</div>

I’m currently learning in-deep CMake and I found something I don’t understand. I have this script: cmake\_minimum\_required(VERSION 4.2) project(CmakeLearn VERSION 1.0 LANGUAGES CXX) # check that CMAKE\_BUILD\_TYPE is de…

---

## [FASTBuild Generator](https://discourse.cmake.org/t/fastbuild-generator/15384)

<div class="topic-metadata">

**Author:** [@TimeLooper](https://discourse.cmake.org/u/TimeLooper)\
**Replies:** 9\
**Last updated:** [February 8, 2026, 7:50pm UTC](https://discourse.cmake.org/t/fastbuild-generator/15384 "2026-02-08T19:50:05Z")

</div>

First of all, thank you very much for supporting the FASTBuild generator. I would like to use cmake and FASTBuild to build our own project, but I have found that the i18nNum code in the FASTBuild generator is currently w…

---

## [Improved Ada language support, gauging interest in a GPRbuild generator](https://discourse.cmake.org/t/improved-ada-language-support-gauging-interest-in-a-gprbuild-generator/15485)

<div class="topic-metadata">

**Author:** [@nsmith](https://discourse.cmake.org/u/nsmith)\
**Replies:** 3\
**Last updated:** [January 30, 2026, 3:28pm UTC](https://discourse.cmake.org/t/improved-ada-language-support-gauging-interest-in-a-gprbuild-generator/15485 "2026-01-30T15:28:26Z")

</div>

First time posting here, I wanted to throw out the idea of developing a new native generator for GPRbuild. It seems like it would be a great way to add support for the Ada language ecosystem, and seems (famous last words…

---

## [Vote to keep CMP0135](https://discourse.cmake.org/t/vote-to-keep-cmp0135/15479)

<div class="topic-metadata">

**Author:** [@Fabian188](https://discourse.cmake.org/u/Fabian188)\
**Replies:** 2\
**Last updated:** [January 26, 2026, 6:31pm UTC](https://discourse.cmake.org/t/vote-to-keep-cmp0135/15479 "2026-01-26T18:31:57Z")

</div>

I hope, I’m in the right category. CMP0135 allows in the old setting to keep the original timestamp when loading data e.g. as external project. https://cmake.org/cmake/help/latest/policy/CMP0135.html Our projects has 1…

---

## [CMake does not warn when a PUBLIC link dependency will not be installed](https://discourse.cmake.org/t/cmake-does-not-warn-when-a-public-link-dependency-will-not-be-installed/15475)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 1\
**Last updated:** [January 24, 2026, 9:02pm UTC](https://discourse.cmake.org/t/cmake-does-not-warn-when-a-public-link-dependency-will-not-be-installed/15475 "2026-01-24T21:02:42Z")

</div>

We have a CMake module to fetch configured build dependencies as a dependency-provider: message(DEBUG "${BemanExemplar\_debug}") FetchContent\_Declare( "${BemanExemplar\_…

---

## [cmake\_language(DEFER) - add option to run after generation ?](https://discourse.cmake.org/t/cmake-language-defer-add-option-to-run-after-generation/15473)

<div class="topic-metadata">

**Author:** [@neundorf](https://discourse.cmake.org/u/neundorf)\
**Replies:** 1\
**Last updated:** [January 22, 2026, 8:10pm UTC](https://discourse.cmake.org/t/cmake-language-defer-add-option-to-run-after-generation/15473 "2026-01-22T20:10:22Z")

</div>

Hi, with DEFER I can defer calls to the end of the configure step of a directory. How about adding an option to defer code to the end of the generate step ? This could be used to do postprocessing on files generated w…

---

## [Compiler Option De-duplication with IAR](https://discourse.cmake.org/t/compiler-option-de-duplication-with-iar/15445)

<div class="topic-metadata">

**Author:** [@willson556](https://discourse.cmake.org/u/willson556)\
**Replies:** 7\
**Last updated:** [January 14, 2026, 3:34pm UTC](https://discourse.cmake.org/t/compiler-option-de-duplication-with-iar/15445 "2026-01-14T15:34:22Z")

</div>

I’m using the IAR compiler and trying to override the optimization level on a specific source file. The default optimization level is specified in our toolchain file, using CMAKE\_CXX\_FLAGS\_RELWITHDEBINFO. I’m trying to …

---

## [Linker error with CXX\_MODULES](https://discourse.cmake.org/t/linker-error-with-cxx-modules/15449)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 4\
**Last updated:** [January 12, 2026, 12:33am UTC](https://discourse.cmake.org/t/linker-error-with-cxx-modules/15449 "2026-01-12T00:33:14Z")

</div>

I have a project that build Boost with CXX\_MODULES. It works on Linux and OSX, but not on windows? The type\_index lib is a header only module the any lib too. The any module itself imports the type\_index. \[367/557\] Lin…

---

## [CMAKE\_UNITY\_BUILD and CXX\_MODULES](https://discourse.cmake.org/t/cmake-unity-build-and-cxx-modules/15450)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 1\
**Last updated:** [January 10, 2026, 3:10am UTC](https://discourse.cmake.org/t/cmake-unity-build-and-cxx-modules/15450 "2026-01-10T03:10:25Z")

</div>

I am wondering why CMAKE\_CXX\_SCAN\_FOR\_MODULES disables UNITY\_BUILD on all plattforms?

---

## [Should find\_package() skip empty PATH entries?](https://discourse.cmake.org/t/should-find-package-skip-empty-path-entries/15385)

<div class="topic-metadata">

**Author:** [@solarispika](https://discourse.cmake.org/u/solarispika)\
**Replies:** 4\
**Last updated:** [January 3, 2026, 1:10pm UTC](https://discourse.cmake.org/t/should-find-package-skip-empty-path-entries/15385 "2026-01-03T13:10:35Z")

</div>

Summary When the system PATH environment variable contains empty entries (e.g., ;; on Windows or :: on Unix), find\_package() unexpectedly searches the current working directory. This happens because empty PATH entries ar…

---

## [Second installation of lots of files is very slow](https://discourse.cmake.org/t/second-installation-of-lots-of-files-is-very-slow/15407)

<div class="topic-metadata">

**Author:** [@Andrej730](https://discourse.cmake.org/u/Andrej730)\
**Replies:** 2\
**Last updated:** [December 17, 2025, 7:19am UTC](https://discourse.cmake.org/t/second-installation-of-lots-of-files-is-very-slow/15407 "2025-12-17T07:19:17Z")

</div>

When working with a project that has 8 000 header files - I’ve stumbled upon a time it takes to install them them, when they’re were already installed (corresponding issue) Performing installation for the first time tak…

---

## [Why are the build and installed BMI files not used?](https://discourse.cmake.org/t/why-are-the-build-and-installed-bmi-files-not-used/15367)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 11\
**Last updated:** [December 6, 2025, 10:12pm UTC](https://discourse.cmake.org/t/why-are-the-build-and-installed-bmi-files-not-used/15367 "2025-12-06T22:12:05Z")

</div>

bash-5.3$ ninja -t deps | egrep -vw '(Cellar|Library)' | sort -u /Users/clausklein/Workspace/cpp/cxx20/fmt-module/stagedir/include/fmt/args.h /Users/clausklein/Workspace/cpp/cxx20/fmt-module/stagedir/include/fmt…

---

## [\`FindPython\` option to skip debug binaries on Windows](https://discourse.cmake.org/t/findpython-option-to-skip-debug-binaries-on-windows/15366)

<div class="topic-metadata">

**Author:** [@Andrej730](https://discourse.cmake.org/u/Andrej730)\
**Replies:** 2\
**Last updated:** [December 6, 2025, 11:10am UTC](https://discourse.cmake.org/t/findpython-option-to-skip-debug-binaries-on-windows/15366 "2025-12-06T11:10:39Z")

</div>

Hi! There’s an issue when trying to build debug version of some Python extension on Windows - it require… debug Python libraries (e.g. python\_d.exe , python311\_d.dll, python311\_d.lib) They’re becoming less accessible - …

---

## [Custom build graph walking plugins](https://discourse.cmake.org/t/custom-build-graph-walking-plugins/15321)

<div class="topic-metadata">

**Author:** [@tom](https://discourse.cmake.org/u/tom)\
**Replies:** 11\
**Last updated:** [November 27, 2025, 9:14am UTC](https://discourse.cmake.org/t/custom-build-graph-walking-plugins/15321 "2025-11-27T09:14:18Z")

</div>

CMake has code to walk the build graph and generate dot files. We have a large and complex codebase, and it would be extremely useful for us to be able to walk the build graph and execute arbitrary code that has access …

---

## [Custom generator expressions](https://discourse.cmake.org/t/custom-generator-expressions/15345)

<div class="topic-metadata">

**Author:** [@Wallby](https://discourse.cmake.org/u/Wallby)\
**Replies:** 1\
**Last updated:** [November 26, 2025, 9:14pm UTC](https://discourse.cmake.org/t/custom-generator-expressions/15345 "2025-11-26T21:14:51Z")

</div>

I was wondering whether there is any plan to introduce custom generator expressions. This would allow an inline equivalent to functions/macros. I don’t know if an equivalent of this feature already exists. I know that in…

[Previous page](https://discourse.cmake.org/c/development/9.md?page=1)

[Next page](https://discourse.cmake.org/c/development/9.md?page=3)
