# Development

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

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

**Page:** 6

---

## [Custom Command Mutual exclusion](https://discourse.cmake.org/t/custom-command-mutual-exclusion/14180)

<div class="topic-metadata">

**Author:** [@Malte](https://discourse.cmake.org/u/Malte)\
**Replies:** 0\
**Last updated:** [May 30, 2025, 9:23am UTC](https://discourse.cmake.org/t/custom-command-mutual-exclusion/14180 "2025-05-30T09:23:33Z")

</div>

I use custom commands heavily to generate files. According to the help this is racy, unless a custom\_target is wrapped around the generation step. Would it make sense to protect custom commands with the same logic which…

---

## [Meta: where do feature requests go?](https://discourse.cmake.org/t/meta-where-do-feature-requests-go/14110)

<div class="topic-metadata">

**Author:** [@bmcdonnell-fb](https://discourse.cmake.org/u/bmcdonnell-fb)\
**Replies:** 3\
**Last updated:** [May 29, 2025, 10:25pm UTC](https://discourse.cmake.org/t/meta-where-do-feature-requests-go/14110 "2025-05-29T22:25:11Z")

</div>

@brad.king said that feature requests can be posted here for discussion, and/or as an issue on the tracker. OTOH, @ben.boeckel said: Can someone clarify? Will my feature request get due consideration here? And/or sho…

---

## [Why we can't change the name of CMakeLists.txt files ?](https://discourse.cmake.org/t/why-we-cant-change-the-name-of-cmakelists-txt-files/10271)

<div class="topic-metadata">

**Author:** [@WaltOnline](https://discourse.cmake.org/u/WaltOnline)\
**Replies:** 4\
**Last updated:** [March 4, 2024, 8:40am UTC](https://discourse.cmake.org/t/why-we-cant-change-the-name-of-cmakelists-txt-files/10271 "2024-03-04T08:40:00Z")

</div>

When CMakeLists.txt files get’s stacked in Visual Studio tab for example they are mess, I can only remember which is which by remembering a priority from left to right of “CMakeLists.txt” files on a tab… I heard workaro…

---

## [Warning: Did not find file Compiler/-ASM How to solve this warning??Even though Warning build is happen is it correct build or not??](https://discourse.cmake.org/t/warning-did-not-find-file-compiler-asm-how-to-solve-this-warning-even-though-warning-build-is-happen-is-it-correct-build-or-not/4765)

<div class="topic-metadata">

**Author:** [@vasantharaj](https://discourse.cmake.org/u/vasantharaj)\
**Replies:** 11\
**Last updated:** [May 26, 2025, 8:55am UTC](https://discourse.cmake.org/t/warning-did-not-find-file-compiler-asm-how-to-solve-this-warning-even-though-warning-build-is-happen-is-it-correct-build-or-not/4765 "2025-05-26T08:55:23Z")

</div>

Warning: Did not find file Compiler/-ASM

---

## [Build CMake without curl](https://discourse.cmake.org/t/build-cmake-without-curl/14010)

<div class="topic-metadata">

**Author:** [@Dave\_Allured](https://discourse.cmake.org/u/Dave_Allured)\
**Replies:** 2\
**Last updated:** [May 12, 2025, 11:20pm UTC](https://discourse.cmake.org/t/build-cmake-without-curl/14010 "2025-05-12T23:20:23Z")

</div>

I would like to create a reduced CMake build without curl/libcurl, and with no other internet access. This is to build CMake itself, not some other project. From bootstrap/help, I see only system and non-system curl op…

---

## [\`if(${VAR})\` and \`if("${VAR}")\` Show same in --trace output but actually different when CMP0054 being set.](https://discourse.cmake.org/t/if-var-and-if-var-show-same-in-trace-output-but-actually-different-when-cmp0054-being-set/14079)

<div class="topic-metadata">

**Author:** [@PEMessage](https://discourse.cmake.org/u/PEMessage)\
**Replies:** 1\
**Last updated:** [May 11, 2025, 4:21pm UTC](https://discourse.cmake.org/t/if-var-and-if-var-show-same-in-trace-output-but-actually-different-when-cmp0054-being-set/14079 "2025-05-11T16:21:59Z")

</div>

set(DO\_NOTHING "-----------Set Policy CMP0054-------------") if(POLICY CMP0054) cmake\_policy(SET CMP0054 NEW) endif() set(MY\_VAR "Hello") set(Hello "Hello") set(DO\_NOTHING "-----------After Policy CMP0054-----------") …

---

## [Feature Request: Keep test results for intermediate runs](https://discourse.cmake.org/t/feature-request-keep-test-results-for-intermediate-runs/14074)

<div class="topic-metadata">

**Author:** [@Kwasi\_Mensah](https://discourse.cmake.org/u/Kwasi_Mensah)\
**Replies:** 0\
**Last updated:** [May 9, 2025, 8:29pm UTC](https://discourse.cmake.org/t/feature-request-keep-test-results-for-intermediate-runs/14074 "2025-05-09T20:29:04Z")

</div>

I want to set up retries to help a CI system be more resilient to flaky tests but I also want to still gather information about the flakes to investigate them async. Unfortunately the code at CMake/Source/CTest/cmCTestRu…

---

## [Add /NATVIS abstraction for linker property](https://discourse.cmake.org/t/add-natvis-abstraction-for-linker-property/14043)

<div class="topic-metadata">

**Author:** [@leha-bot](https://discourse.cmake.org/u/leha-bot)\
**Replies:** 1\
**Last updated:** [May 5, 2025, 1:14pm UTC](https://discourse.cmake.org/t/add-natvis-abstraction-for-linker-property/14043 "2025-05-05T13:14:31Z")

</div>

It could be like MSVC\_LINKER\_NATVIS\_FILE and accept an list of files (also from generator expressions as some library authors could add .natvis files into target\_sources() usage requirement (e.g. nlohmann json: json/CMak…

---

## [document error in Cmake tutorial](https://discourse.cmake.org/t/document-error-in-cmake-tutorial/13976)

<div class="topic-metadata">

**Author:** [@Hayden\_Zhou](https://discourse.cmake.org/u/Hayden_Zhou)\
**Replies:** 4\
**Last updated:** [April 27, 2025, 12:31am UTC](https://discourse.cmake.org/t/document-error-in-cmake-tutorial/13976 "2025-04-27T00:31:01Z")

</div>

in this page of document: https://cmake.org/cmake/help/latest/guide/tutorial/A%20Basic%20Starting%20Point.html I think the sentence: Also note that each step in the tutorial builds on the next should be Also note that e…

---

## [Suitable versions of Sphinx for building different versions of CMake Docs?](https://discourse.cmake.org/t/suitable-versions-of-sphinx-for-building-different-versions-of-cmake-docs/7982)

<div class="topic-metadata">

**Author:** [@hwhsu1231](https://discourse.cmake.org/u/hwhsu1231)\
**Replies:** 15\
**Last updated:** [April 28, 2025, 2:19pm UTC](https://discourse.cmake.org/t/suitable-versions-of-sphinx-for-building-different-versions-of-cmake-docs/7982 "2025-04-28T14:19:01Z")

</div>

Recently, I tried to configure and build the CMakeHelp project directly to generate CMake Docs locally. The following commands are my simple test of using Sphinx-6.2.1 to build the CMakeHelp of v3.18.6 tag: sphinx-build…

---

## [Random bug when building makefile project by using ExternalProject\_Add()](https://discourse.cmake.org/t/random-bug-when-building-makefile-project-by-using-externalproject-add/13998)

<div class="topic-metadata">

**Author:** [@acraft](https://discourse.cmake.org/u/acraft)\
**Replies:** 1\
**Last updated:** [April 28, 2025, 1:43pm UTC](https://discourse.cmake.org/t/random-bug-when-building-makefile-project-by-using-externalproject-add/13998 "2025-04-28T13:43:11Z")

</div>

Hello, I use ExternalProject\_Add() to build Open MPI project which uses make file project. When I build the project from command line there is no issue. When I use ExternalProject\_Add(), it fails randomly. Sometime it b…

---

## [CMake source archive sha256sum changed](https://discourse.cmake.org/t/cmake-source-archive-sha256sum-changed/13987)

<div class="topic-metadata">

**Author:** [@Samuel\_Littley](https://discourse.cmake.org/u/Samuel_Littley)\
**Replies:** 3\
**Last updated:** [April 25, 2025, 3:34pm UTC](https://discourse.cmake.org/t/cmake-source-archive-sha256sum-changed/13987 "2025-04-25T15:34:32Z")

</div>

We download cmake from https://gitlab.kitware.com/cmake/cmake/-/archive/v3.25.2/cmake-v3.25.2.zip, and recently the sha256sum of the downloaded zip archive has changed (from d7d58a81effb962c42fe12d8c757092f6753484c33fb7e…

---

## [Empty variable CMAKE\_CXX\_COMPILER\_IMPORT\_STD](https://discourse.cmake.org/t/empty-variable-cmake-cxx-compiler-import-std/13918)

<div class="topic-metadata">

**Author:** [@Timothy\_Madden](https://discourse.cmake.org/u/Timothy_Madden)\
**Replies:** 1\
**Last updated:** [April 21, 2025, 9:54am UTC](https://discourse.cmake.org/t/empty-variable-cmake-cxx-compiler-import-std/13918 "2025-04-21T09:54:53Z")

</div>

Hello I am trying to use “import std;” with C++ modules. I have enabled the experimental feature, and I have followed all the instructions. The feature is working if I open my project directory in Visual Studio, and I l…

---

## [Xcode Framework](https://discourse.cmake.org/t/xcode-framework/13912)

<div class="topic-metadata">

**Author:** [@OctoBHVR](https://discourse.cmake.org/u/OctoBHVR)\
**Replies:** 0\
**Last updated:** [April 10, 2025, 6:39pm UTC](https://discourse.cmake.org/t/xcode-framework/13912 "2025-04-10T18:39:38Z")

</div>

Would it be possible to add support for adding references to frameworks in the generated Xcode project? In the “General” → “Framework, Libraries, and Embedded content”. Especially I would like to be able to create a weak…

---

## [CMake 4.0 regression](https://discourse.cmake.org/t/cmake-4-0-regression/13890)

<div class="topic-metadata">

**Author:** [@Gonzalo\_Garramuno](https://discourse.cmake.org/u/Gonzalo_Garramuno)\
**Replies:** 2\
**Last updated:** [April 8, 2025, 12:28am UTC](https://discourse.cmake.org/t/cmake-4-0-regression/13890 "2025-04-08T00:28:56Z")

</div>

CMake 4.0 seems to have introduced a regression on how it treats directories once they have been built with ExternalProject\_Add. Attached is an MSys2 bash script that runs MSVC and compiles three projects. When run onc…

---

## [CMake front-end tool](https://discourse.cmake.org/t/cmake-front-end-tool/12812)

<div class="topic-metadata">

**Author:** [@dabrahams](https://discourse.cmake.org/u/dabrahams)\
**Replies:** 54\
**Last updated:** [March 17, 2025, 9:09pm UTC](https://discourse.cmake.org/t/cmake-front-end-tool/12812 "2025-03-17T21:09:29Z")

</div>

For some time I’ve wanted a different front-end for the CMake ecosystem, one that would make development much more convenient for me. I am opening a discussion here about the possible design. I use cm as the tool name …

---

## [Feature request: Add support for subcommands like git and many CLI utils do (cargo, npm)](https://discourse.cmake.org/t/feature-request-add-support-for-subcommands-like-git-and-many-cli-utils-do-cargo-npm/11514)

<div class="topic-metadata">

**Author:** [@leha-bot](https://discourse.cmake.org/u/leha-bot)\
**Replies:** 4\
**Last updated:** [March 14, 2025, 9:30am UTC](https://discourse.cmake.org/t/feature-request-add-support-for-subcommands-like-git-and-many-cli-utils-do-cargo-npm/11514 "2025-03-14T09:30:06Z")

</div>

The main CMake binary could use the subcommands like cmake test, cmake install, cmake pack which may, like Git, call the wrappers like cmake-test, cmake-install, cmake-pack. Users also may add their user extensions (lik…

---

## [Compile options not being applied to modules](https://discourse.cmake.org/t/compile-options-not-being-applied-to-modules/13727)

<div class="topic-metadata">

**Author:** [@mmoult](https://discourse.cmake.org/u/mmoult)\
**Replies:** 0\
**Last updated:** [March 12, 2025, 1:55am UTC](https://discourse.cmake.org/t/compile-options-not-being-applied-to-modules/13727 "2025-03-12T01:55:09Z")

</div>

I believe that I have encountered a bug in CMake. I am using C++ modules, and target\_compile\_options or compile\_options are only being applied to the regular C++ files, not the module files (as observed through the compi…

---

## [\[4.0.0 rc2\] - "There was an error running ctest to determine available test executables"](https://discourse.cmake.org/t/4-0-0-rc2-there-was-an-error-running-ctest-to-determine-available-test-executables/13687)

<div class="topic-metadata">

**Author:** [@buildSystemPerson](https://discourse.cmake.org/u/buildSystemPerson)\
**Replies:** 4\
**Last updated:** [March 6, 2025, 6:40pm UTC](https://discourse.cmake.org/t/4-0-0-rc2-there-was-an-error-running-ctest-to-determine-available-test-executables/13687 "2025-03-06T18:40:52Z")

</div>

Brief Issue Summary Currently getting this error when running tests via the microsoft/vscode-cmake-tools extension tool: \[proc\] The command: /../ctest --show-only=json-v1 -j14 -C Debug -T test --output-on-failure exited…

---

## [cmake-gui: "Error: could not load cache"](https://discourse.cmake.org/t/cmake-gui-error-could-not-load-cache/13685)

<div class="topic-metadata">

**Author:** [@buildSystemPerson](https://discourse.cmake.org/u/buildSystemPerson)\
**Replies:** 3\
**Last updated:** [March 5, 2025, 11:28pm UTC](https://discourse.cmake.org/t/cmake-gui-error-could-not-load-cache/13685 "2025-03-05T23:28:46Z")

</div>

I’m getting an error using CMake 4.0.0-rc2 (Not sure if it’s specific to this version). ~/projects/glslang$ cmake-gui -S . -B build Error: could not load cache However, it loads perfectly fine in cmake-gui. Minor issue…

---

## [\#embed support?](https://discourse.cmake.org/t/embed-support/13670)

<div class="topic-metadata">

**Author:** [@benthevining](https://discourse.cmake.org/u/benthevining)\
**Replies:** 1\
**Last updated:** [March 4, 2025, 7:26pm UTC](https://discourse.cmake.org/t/embed-support/13670 "2025-03-04T19:26:16Z")

</div>

Are there plans to support C23’s #embed directive with new commands/properties to specify directories where the compiler should find embedded files?

---

## [how to only be windows or unix path in the \`Makefile\`?](https://discourse.cmake.org/t/how-to-only-be-windows-or-unix-path-in-the-makefile/10883)

<div class="topic-metadata">

**Author:** [@anlexN](https://discourse.cmake.org/u/anlexN)\
**Replies:** 1\
**Last updated:** [March 4, 2025, 9:26am UTC](https://discourse.cmake.org/t/how-to-only-be-windows-or-unix-path-in-the-makefile/10883 "2025-03-04T09:26:06Z")

</div>

\`MSYS2\_ARG\_CONV\_EXCL=$MY\_INSTALL\_DIR2 cmake -G"MinGW Makefiles"\\ -DgRPC\_INSTALL=ON \\ -DgRPC\_BUILD\_TESTS=OFF \\ -DCMAKE\_INSTALL\_PREFIX=$MY\_INSTALL\_DIR2 \\ ../..\` cmake generate “MinGW Makefiles” tha…

---

## [FetchContent's GoogleTest example causes confusion](https://discourse.cmake.org/t/fetchcontents-googletest-example-causes-confusion/13651)

<div class="topic-metadata">

**Author:** [@camio](https://discourse.cmake.org/u/camio)\
**Replies:** 3\
**Last updated:** [March 3, 2025, 7:58am UTC](https://discourse.cmake.org/t/fetchcontents-googletest-example-causes-confusion/13651 "2025-03-03T07:58:04Z")

</div>

FetchContent’s documentation uses this snippet (and variations of it) frequently: FetchContent\_Declare( googletest GIT\_REPOSITORY https://github.com/google/googletest.git GIT\_TAG 703bd9caab50b139428…

---

## [Could you add a section in the documentation of each CMake command that lists all variables that it may set?](https://discourse.cmake.org/t/could-you-add-a-section-in-the-documentation-of-each-cmake-command-that-lists-all-variables-that-it-may-set/13657)

<div class="topic-metadata">

**Author:** [@Andrew\_Puleo](https://discourse.cmake.org/u/Andrew_Puleo)\
**Replies:** 0\
**Last updated:** [March 1, 2025, 7:17pm UTC](https://discourse.cmake.org/t/could-you-add-a-section-in-the-documentation-of-each-cmake-command-that-lists-all-variables-that-it-may-set/13657 "2025-03-01T19:17:34Z")

</div>

Hello all, I am reading through a book on CMake at the moment, and it occurred to me while perusing the documentation that it is rather difficult to quickly find which variables may be set by any given command. Since I …

---

## [Graceful subprocess termination on Windows with "cmake --build"](https://discourse.cmake.org/t/graceful-subprocess-termination-on-windows-with-cmake-build/13649)

<div class="topic-metadata">

**Author:** [@Gwani](https://discourse.cmake.org/u/Gwani)\
**Replies:** 1\
**Last updated:** [February 28, 2025, 2:13pm UTC](https://discourse.cmake.org/t/graceful-subprocess-termination-on-windows-with-cmake-build/13649 "2025-02-28T14:13:20Z")

</div>

Hi, I want to document an observation i made when building a test project on Windows 11 with CMake 3.31.6 via a Powershell command line in Windows Terminal using the Ninja and MinGW Makefiles generators. When the Termin…

---

## [RFC: add --build\_type=\<build\_type\> to cmake -S . -B build and more convenience aliases](https://discourse.cmake.org/t/rfc-add-build-type-build-type-to-cmake-s-b-build-and-more-convenience-aliases/13503)

<div class="topic-metadata">

**Author:** [@leha-bot](https://discourse.cmake.org/u/leha-bot)\
**Replies:** 14\
**Last updated:** [February 22, 2025, 5:33pm UTC](https://discourse.cmake.org/t/rfc-add-build-type-build-type-to-cmake-s-b-build-and-more-convenience-aliases/13503 "2025-02-22T17:33:30Z")

</div>

More shortcuts: cmake -S . -B build --release cmake -S . -B build --debug cmake --build build --release (for multi-config generators) cmake --build build --debug (for multi-config generators)

---

## [Add preset/workflow for launching CMake scripts](https://discourse.cmake.org/t/add-preset-workflow-for-launching-cmake-scripts/13602)

<div class="topic-metadata">

**Author:** [@leha-bot](https://discourse.cmake.org/u/leha-bot)\
**Replies:** 0\
**Last updated:** [February 18, 2025, 8:19pm UTC](https://discourse.cmake.org/t/add-preset-workflow-for-launching-cmake-scripts/13602 "2025-02-18T20:19:24Z")

</div>

The main motivation is to put all arguments into an declarative config and try to use, e.g. cmake -P --preset \<script-preset\> in some way. The potential preset could be an item from top-level “scriptPresets” array, and…

---

## [CMake 4.0.0-rc1 test failure](https://discourse.cmake.org/t/cmake-4-0-0-rc1-test-failure/13608)

<div class="topic-metadata">

**Author:** [@dextercd](https://discourse.cmake.org/u/dextercd)\
**Replies:** 3\
**Last updated:** [February 20, 2025, 11:53pm UTC](https://discourse.cmake.org/t/cmake-4-0-0-rc1-test-failure/13608 "2025-02-20T23:53:29Z")

</div>

Hey there, I compiled the latest release candidate from source and ran ctest. All tests succeeded except for one: ▶ CTest output The errors says that two strings didn’t match. Here’s what the diff looks like after putti…

---

## [add\_dependencies called with incorrect number of arguments](https://discourse.cmake.org/t/add-dependencies-called-with-incorrect-number-of-arguments/13611)

<div class="topic-metadata">

**Author:** [@nmnobre](https://discourse.cmake.org/u/nmnobre)\
**Replies:** 3\
**Last updated:** [February 20, 2025, 1:53pm UTC](https://discourse.cmake.org/t/add-dependencies-called-with-incorrect-number-of-arguments/13611 "2025-02-20T13:53:09Z")

</div>

The documentation for add\_dependencies seems to suggest add\_dependencies(my\_amazing\_target) is valid syntax, yet CMake complains it’s missing arguments?

---

## [add\_custom\_command parallel race condition with just one cp -p custom command. Is this an internal parallel race bug for at least all versions from 3.18.4 to 3.31.5?](https://discourse.cmake.org/t/add-custom-command-parallel-race-condition-with-just-one-cp-p-custom-command-is-this-an-internal-parallel-race-bug-for-at-least-all-versions-from-3-18-4-to-3-31-5/13596)

<div class="topic-metadata">

**Author:** [@airwin](https://discourse.cmake.org/u/airwin)\
**Replies:** 3\
**Last updated:** [February 19, 2025, 4:31am UTC](https://discourse.cmake.org/t/add-custom-command-parallel-race-condition-with-just-one-cp-p-custom-command-is-this-an-internal-parallel-race-bug-for-at-least-all-versions-from-3-18-4-to-3-31-5/13596 "2025-02-19T04:31:38Z")

</div>

To illustrate this parallel build bug for add\_custom\_command with just one cp -p command, here is my test CMakeLists.txt file. CMAKE\_MINIMUM\_REQUIRED(VERSION 3.18.4 FATAL\_ERROR) project(test\_cp NONE) set(name\_list …

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

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