# Development

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

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

**Page:** 14

---

## [DEPENDS\_EXPLICIT\_ONLY for all add\_custom\_command](https://discourse.cmake.org/t/depends-explicit-only-for-all-add-custom-command/7479)

<div class="topic-metadata">

**Author:** [@abdelmaged](https://discourse.cmake.org/u/abdelmaged)\
**Replies:** 1\
**Last updated:** [February 16, 2023, 4:37pm UTC](https://discourse.cmake.org/t/depends-explicit-only-for-all-add-custom-command/7479 "2023-02-16T16:37:03Z")

</div>

This MR https://gitlab.kitware.com/cmake/cmake/-/merge\_requests/8198 added "DEPENDS\_EXPLICIT\_ONLY " option to “add\_custom\_command”, would it be helpful if there is a way to add it by default for all add\_custom\_command us…

---

## [Android Soong Build System (Blueprint) Generator.](https://discourse.cmake.org/t/android-soong-build-system-blueprint-generator/7139)

<div class="topic-metadata">

**Author:** [@Christopher\_Nugent](https://discourse.cmake.org/u/Christopher_Nugent)\
**Replies:** 9\
**Last updated:** [February 1, 2023, 10:50pm UTC](https://discourse.cmake.org/t/android-soong-build-system-blueprint-generator/7139 "2023-02-01T22:50:25Z")

</div>

Is there anybody working on a generator for the Android Open Source Project (AOSP) build system, called Soong? It uses so-called Blueprint files (.bp file extension), which have a JSON-like syntax, but are unique to this…

---

## [Feature request / RFC: Improve the docs related to CMAKE\[\_CURRENT\]\_\[SOURCE|BINARY|LIST\]\_DIR](https://discourse.cmake.org/t/feature-request-rfc-improve-the-docs-related-to-cmake-current-source-binary-list-dir/7377)

<div class="topic-metadata">

**Author:** [@leha-bot](https://discourse.cmake.org/u/leha-bot)\
**Replies:** 1\
**Last updated:** [February 1, 2023, 4:50pm UTC](https://discourse.cmake.org/t/feature-request-rfc-improve-the-docs-related-to-cmake-current-source-binary-list-dir/7377 "2023-02-01T16:50:31Z")

</div>

I think that we may drastically improve the docs by clarifying difference between these variables. As an example, we may start from this StackOverflow answer: cmake - Difference between CMAKE\_CURRENT\_SOURCE\_DIR and CMAK…

---

## [cmake fileapi not catching add\_subdirectory calls in backtraceGraph](https://discourse.cmake.org/t/cmake-fileapi-not-catching-add-subdirectory-calls-in-backtracegraph/7322)

<div class="topic-metadata">

**Author:** [@vkhristenko](https://discourse.cmake.org/u/vkhristenko)\
**Replies:** 2\
**Last updated:** [January 30, 2023, 10:34am UTC](https://discourse.cmake.org/t/cmake-fileapi-not-catching-add-subdirectory-calls-in-backtracegraph/7322 "2023-01-30T10:34:12Z")

</div>

Hello, I’m using fileapi codemodel and i"m wondering if there is a reason why add\_subdirectory calls are not reflected in backtraceGraph, when all other calls seem to be there? (e.g. add\_library, custom functions, targe…

---

## [Modern CMake: The big leap](https://discourse.cmake.org/t/modern-cmake-the-big-leap/7328)

<div class="topic-metadata">

**Author:** [@kfsone](https://discourse.cmake.org/u/kfsone)\
**Replies:** 0\
**Last updated:** [January 26, 2023, 7:05pm UTC](https://discourse.cmake.org/t/modern-cmake-the-big-leap/7328 "2023-01-26T19:05:30Z")

</div>

Modern cmake has come a long way: 20+ years ago, CMake was “a way to use global variables to bludgeon your way to a compilation happening”. Today, we use interface libraries to marshal things and build more coherent des…

---

## [Go to parent directory - just search for / ?](https://discourse.cmake.org/t/go-to-parent-directory-just-search-for/7312)

<div class="topic-metadata">

**Author:** [@neundorf](https://discourse.cmake.org/u/neundorf)\
**Replies:** 1\
**Last updated:** [January 23, 2023, 10:43pm UTC](https://discourse.cmake.org/t/go-to-parent-directory-just-search-for/7312 "2023-01-23T22:43:06Z")

</div>

Hi, if I have some path in a std::string inside CMake, what’s the recommended way to get the parent directory of that path ? Just search for the slashes, or something else ? Thanks Alex

---

## [cross platform dotnet generator](https://discourse.cmake.org/t/cross-platform-dotnet-generator/7295)

<div class="topic-metadata">

**Author:** [@elksson](https://discourse.cmake.org/u/elksson)\
**Replies:** 1\
**Last updated:** [January 20, 2023, 3:54pm UTC](https://discourse.cmake.org/t/cross-platform-dotnet-generator/7295 "2023-01-20T15:54:13Z")

</div>

Has anyone started working on a cross platform dotnet generator, (windows, mac, linux). We recently moved our applications from dotnet framework 4.5 to dotnet6 and would like to be able to compile on linux and mac. It se…

---

## [Undocumented Behavior of \`CHECK\_INCLUDE\_FILE\_CXX\` Depending on Policy or Version](https://discourse.cmake.org/t/undocumented-behavior-of-check-include-file-cxx-depending-on-policy-or-version/7239)

<div class="topic-metadata">

**Author:** [@Xaldew](https://discourse.cmake.org/u/Xaldew)\
**Replies:** 1\
**Last updated:** [January 13, 2023, 4:04pm UTC](https://discourse.cmake.org/t/undocumented-behavior-of-check-include-file-cxx-depending-on-policy-or-version/7239 "2023-01-13T16:04:58Z")

</div>

This turned out to be a bit of head-scratcher. The CHECK\_INCLUDE\_FILE\_CXX macro changes behavior depending on if the minimum CMake version is below version 3.8 or if policy CMP0067 is set to NEW. In short, it seems like…

---

## [Possible Bug or Documentation Error in FindOpenMp: OpenMP\_VERSION Not Set.](https://discourse.cmake.org/t/possible-bug-or-documentation-error-in-findopenmp-openmp-version-not-set/7225)

<div class="topic-metadata">

**Author:** [@Xaldew](https://discourse.cmake.org/u/Xaldew)\
**Replies:** 1\
**Last updated:** [January 11, 2023, 2:40am UTC](https://discourse.cmake.org/t/possible-bug-or-documentation-error-in-findopenmp-openmp-version-not-set/7225 "2023-01-11T02:40:49Z")

</div>

Hello, I’ve noticed that the FindOpenMP module doesn’t seem to set the OpenMP\_Version variable. Minimal CMake project file to reproduce: cmake\_minimum\_required(VERSION 3.1) project(TEST LANGUAGES C CXX) find\_package(O…

---

## [Mutex error at the compilation of cmake](https://discourse.cmake.org/t/mutex-error-at-the-compilation-of-cmake/7193)

<div class="topic-metadata">

**Author:** [@Rushikesh](https://discourse.cmake.org/u/Rushikesh)\
**Replies:** 5\
**Last updated:** [January 5, 2023, 1:08pm UTC](https://discourse.cmake.org/t/mutex-error-at-the-compilation-of-cmake/7193 "2023-01-05T13:08:24Z")

</div>

Recently I have compiled and installed GCC-12.2.0 in RISCV Linux. Then I was going for compilation of CMAKE application for RISCV but unfortunately it was given the following error. ERROR : In file included from /home/…

---

## [Bug Report: Error in ProcessorCount() under linux](https://discourse.cmake.org/t/bug-report-error-in-processorcount-under-linux/7123)

<div class="topic-metadata">

**Author:** [@krefson](https://discourse.cmake.org/u/krefson)\
**Replies:** 1\
**Last updated:** [December 27, 2022, 10:24pm UTC](https://discourse.cmake.org/t/bug-report-error-in-processorcount-under-linux/7123 "2022-12-27T22:24:30Z")

</div>

There is a small mistake in the implementation of ProcessorCount() under linux. By default the linux implementation calls the command-line program “nproc” to determine the number of cores available. However “nproc’s” b…

---

## [Detection of CMAKE\_SYSTEM\_VERSION for SerenityOS](https://discourse.cmake.org/t/detection-of-cmake-system-version-for-serenityos/7044)

<div class="topic-metadata">

**Author:** [@ADKaster](https://discourse.cmake.org/u/ADKaster)\
**Replies:** 4\
**Last updated:** [December 14, 2022, 2:27am UTC](https://discourse.cmake.org/t/detection-of-cmake-system-version-for-serenityos/7044 "2022-12-14T02:27:46Z")

</div>

I’m working on updating the port of CMake on SerenityOS to 3.25.1 ( https://github.com/SerenityOS/serenity/tree/master/Ports/cmake) For context, I upstreamed our Platform files in PR 6837 for 3.25. The issue for suppo…

---

## [Add normalize\_path into the cmake -E](https://discourse.cmake.org/t/add-normalize-path-into-the-cmake-e/7046)

<div class="topic-metadata">

**Author:** [@leha-bot](https://discourse.cmake.org/u/leha-bot)\
**Replies:** 6\
**Last updated:** [December 13, 2022, 9:05am UTC](https://discourse.cmake.org/t/add-normalize-path-into-the-cmake-e/7046 "2022-12-13T09:05:32Z")

</div>

It would be very convenient, e.g., for some environments in which the mixed slashes could approach I got this at GitHub Actions with their github.workflow - it has backslashes on Windows, but it was mixed with forward s…

---

## [CMake 3.24.0 crashes under Rosetta on Ventura but runs fine with 3.25.0](https://discourse.cmake.org/t/cmake-3-24-0-crashes-under-rosetta-on-ventura-but-runs-fine-with-3-25-0/7037)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 1\
**Last updated:** [December 9, 2022, 2:24pm UTC](https://discourse.cmake.org/t/cmake-3-24-0-crashes-under-rosetta-on-ventura-but-runs-fine-with-3-25-0/7037 "2022-12-09T14:24:00Z")

</div>

I’m trying to track down a change that fixed a problem that I’m not sure we knew about. I have a report from a user running macOS Ventura. They are using a Python 3.9 virtual environment running under Rosetta (needed bec…

---

## [How is CMAKE\_\<LANG\>\_COMPILER\_AR determined automatically?](https://discourse.cmake.org/t/how-is-cmake-lang-compiler-ar-determined-automatically/7011)

<div class="topic-metadata">

**Author:** [@tni](https://discourse.cmake.org/u/tni)\
**Replies:** 1\
**Last updated:** [December 5, 2022, 9:52pm UTC](https://discourse.cmake.org/t/how-is-cmake-lang-compiler-ar-determined-automatically/7011 "2022-12-05T21:52:12Z")

</div>

For context, I am a newcomer to CMake with a build that I observe failing on x86\_64-darwin complaining that CMAKE\_CXX\_COMPILER\_AR is not found, but the same build does not fail on x86\_64-linux. Now, there are a lot of la…

---

## [2.2 seconds out of my 7.5 seconds configure time is spent looking for two binaries in CTest.cmake](https://discourse.cmake.org/t/2-2-seconds-out-of-my-7-5-seconds-configure-time-is-spent-looking-for-two-binaries-in-ctest-cmake/6943)

<div class="topic-metadata">

**Author:** [@quijote](https://discourse.cmake.org/u/quijote)\
**Replies:** 3\
**Last updated:** [November 24, 2022, 7:53am UTC](https://discourse.cmake.org/t/2-2-seconds-out-of-my-7-5-seconds-configure-time-is-spent-looking-for-two-binaries-in-ctest-cmake/6943 "2022-11-24T07:53:21Z")

</div>

I am working on a large project using cmake. Profiling with --profiling-format google-trace showed the following: 2.2 seconds out of my 7.5 seconds configure time is spent looking for MEMORYCHECK\_COMMAND and COVERAGE\_CO…

---

## [CMake test suite failing on Alpine Linux](https://discourse.cmake.org/t/cmake-test-suite-failing-on-alpine-linux/5064)

<div class="topic-metadata">

**Author:** [@mayeut](https://discourse.cmake.org/u/mayeut)\
**Replies:** 3\
**Last updated:** [November 23, 2022, 10:46am UTC](https://discourse.cmake.org/t/cmake-test-suite-failing-on-alpine-linux/5064 "2022-11-23T10:46:06Z")

</div>

There are 3 tests failing in the CMake test suite when building from sources on Alpine Linux. I tried to crawl the CMake bug tracker & Google search to check if something was reported but did not find anything thus aski…

---

## [What makes a condition "context-sensitive" when evaluating a property?](https://discourse.cmake.org/t/what-makes-a-condition-context-sensitive-when-evaluating-a-property/6895)

<div class="topic-metadata">

**Author:** [@Pierre\_Testart](https://discourse.cmake.org/u/Pierre_Testart)\
**Replies:** 12\
**Last updated:** [November 21, 2022, 3:53pm UTC](https://discourse.cmake.org/t/what-makes-a-condition-context-sensitive-when-evaluating-a-property/6895 "2022-11-21T15:53:52Z")

</div>

My question is about the HadContextSensitiveCondition flag in cmGeneratorExpressionContext. Some subclasses of cmGeneratorExpressionNode assign context-\>HadContextSensitiveCondition = true in their Evaluate method. I d…

---

## [Early experiences with MSVC\_DEBUG\_INFORMATION\_FORMAT and CMP0141](https://discourse.cmake.org/t/early-experiences-with-msvc-debug-information-format-and-cmp0141/6859)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 2\
**Last updated:** [November 14, 2022, 3:10pm UTC](https://discourse.cmake.org/t/early-experiences-with-msvc-debug-information-format-and-cmp0141/6859 "2022-11-14T15:10:17Z")

</div>

I’ve been updating some projects and other material to account for the new MSVC\_DEBUG\_INFORMATION\_FORMAT target property and the associated CMAKE\_MSVC\_DEBUG\_INFORMATION\_FORMAT variable. I wanted to share some experiences…

---

## [CMake cannot generate Ninja build rules for asm for IntelLLVM compiler since 3.20.x](https://discourse.cmake.org/t/cmake-cannot-generate-ninja-build-rules-for-asm-for-intelllvm-compiler-since-3-20-x/6778)

<div class="topic-metadata">

**Author:** [@yanyanli15](https://discourse.cmake.org/u/yanyanli15)\
**Replies:** 6\
**Last updated:** [November 7, 2022, 10:48pm UTC](https://discourse.cmake.org/t/cmake-cannot-generate-ninja-build-rules-for-asm-for-intelllvm-compiler-since-3-20-x/6778 "2022-11-07T22:48:06Z")

</div>

CMake cannot generate Ninja build rules for asm for IntelLLVM compiler since 3.20. When I using ninja to generate build rules, it cannot generate the build rules for asm files (.s file) based on IntelLLVM compiler since…

---

## [Unclear VALIDATOR behavior for a cached find\_XXX() result](https://discourse.cmake.org/t/unclear-validator-behavior-for-a-cached-find-xxx-result/6800)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 2\
**Last updated:** [November 6, 2022, 10:46am UTC](https://discourse.cmake.org/t/unclear-validator-behavior-for-a-cached-find-xxx-result/6800 "2022-11-06T10:46:26Z")

</div>

When a find\_XXX() command is successful, it stores its result in a cache variable. On subsequent runs, what should happen if a VALIDATOR is specified? Should the validator be ignored, or should the command re-validate t…

---

## [Thought: another way of injecting behavior](https://discourse.cmake.org/t/thought-another-way-of-injecting-behavior/6774)

<div class="topic-metadata">

**Author:** [@benthevining](https://discourse.cmake.org/u/benthevining)\
**Replies:** 3\
**Last updated:** [November 4, 2022, 4:31pm UTC](https://discourse.cmake.org/t/thought-another-way-of-injecting-behavior/6774 "2022-11-04T16:31:33Z")

</div>

I’m aware that the modern cmake guidelines discourage projects from hard coding things like warning flags, and that these can be set from outside the project using various cmake variables. However, it’s also best practi…

---

## [Adding "--run" functionality?](https://discourse.cmake.org/t/adding-run-functionality/3893)

<div class="topic-metadata">

**Author:** [@buildSystemPerson](https://discourse.cmake.org/u/buildSystemPerson)\
**Replies:** 21\
**Last updated:** [November 3, 2022, 2:25pm UTC](https://discourse.cmake.org/t/adding-run-functionality/3893 "2022-11-03T14:25:37Z")

</div>

For reference cargo has a way to just run your app from the command line. $ cargo run Finished dev \[unoptimized + debuginfo\] target(s) in 0.0 secs Running \`target/debug/hello\_cargo\` Hello, world Perhaps it wou…

---

## [CMake Project initialization](https://discourse.cmake.org/t/cmake-project-initialization/6756)

<div class="topic-metadata">

**Author:** [@mroussin](https://discourse.cmake.org/u/mroussin)\
**Replies:** 0\
**Last updated:** [October 29, 2022, 11:37pm UTC](https://discourse.cmake.org/t/cmake-project-initialization/6756 "2022-10-29T23:37:51Z")

</div>

I want CMake to have a project initializer to start quickly, similar to xmake or cargo init - The Cargo Book. The advantage for new users is they don’t have to deal with CMake files. One of the goals is to provide a very…

---

## [Verifying header sets not supported for header-only interface libraries](https://discourse.cmake.org/t/verifying-header-sets-not-supported-for-header-only-interface-libraries/6139)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 12\
**Last updated:** [October 28, 2022, 8:12am UTC](https://discourse.cmake.org/t/verifying-header-sets-not-supported-for-header-only-interface-libraries/6139 "2022-10-28T08:12:53Z")

</div>

Reading the docs for the VERIFY\_INTERFACE\_HEADER\_SETS property (which seems to be the main place the feature is discussed), it appears that it can’t be used on interface libraries. That seems unexpected, since header-onl…

---

## [Deterministic Ids in the Xcode generator to avoid unnecessary rebuilds](https://discourse.cmake.org/t/deterministic-ids-in-the-xcode-generator-to-avoid-unnecessary-rebuilds/1870)

<div class="topic-metadata">

**Author:** [@duncanvv](https://discourse.cmake.org/u/duncanvv)\
**Replies:** 8\
**Last updated:** [October 26, 2022, 12:45pm UTC](https://discourse.cmake.org/t/deterministic-ids-in-the-xcode-generator-to-avoid-unnecessary-rebuilds/1870 "2022-10-26T12:45:01Z")

</div>

With stock CMake, adding a single file and rebuilding an Xcode project causes the build to start from scratch in Xcode as if it has just been cleaned. As this was causing a problem for us with build times, we looked into…

---

## [Should --fresh be supported when using a workflow preset](https://discourse.cmake.org/t/should-fresh-be-supported-when-using-a-workflow-preset/6704)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 1\
**Last updated:** [October 21, 2022, 3:10pm UTC](https://discourse.cmake.org/t/should-fresh-be-supported-when-using-a-workflow-preset/6704 "2022-10-21T15:10:21Z")

</div>

One could mount an argument that --fresh makes sense as a supported argument when using the new cmake --workflow functionality added in CMake 3.25. At the moment though, if you append --fresh, there’s a message to say th…

---

## [Translation of platform using configuration for C# targets](https://discourse.cmake.org/t/translation-of-platform-using-configuration-for-c-targets/6630)

<div class="topic-metadata">

**Author:** [@MathiasMagnus](https://discourse.cmake.org/u/MathiasMagnus)\
**Replies:** 1\
**Last updated:** [October 16, 2022, 2:32pm UTC](https://discourse.cmake.org/t/translation-of-platform-using-configuration-for-c-targets/6630 "2022-10-16T14:32:12Z")

</div>

Can someone tell me why is there a reason to translate platform names for C# targets in CMake using the configuration? Why is this snippet needed in the VisualStudio generators? std::string platform = GetPlatformName();…

---

## [CMake fails to build on Solaris 11.4 (x86)](https://discourse.cmake.org/t/cmake-fails-to-build-on-solaris-11-4-x86/553)

<div class="topic-metadata">

**Author:** [@dcleland](https://discourse.cmake.org/u/dcleland)\
**Replies:** 5\
**Last updated:** [October 9, 2022, 11:20am UTC](https://discourse.cmake.org/t/cmake-fails-to-build-on-solaris-11-4-x86/553 "2022-10-09T11:20:44Z")

</div>

Hi, Just started using cmake in the last couple of weeks on Windows and Linux, and now moving to Solaris 11.4 (x86). I have built and installed cmake a couple of times under Linux, but it fails to compile under Solaris.…

---

## [Can a YUM repo be provided?](https://discourse.cmake.org/t/can-a-yum-repo-be-provided/6624)

<div class="topic-metadata">

**Author:** [@sweemer](https://discourse.cmake.org/u/sweemer)\
**Replies:** 1\
**Last updated:** [October 7, 2022, 5:50pm UTC](https://discourse.cmake.org/t/can-a-yum-repo-be-provided/6624 "2022-10-07T17:50:16Z")

</div>

I’m aware of the APT repository for CMake described at https://apt.kitware.com/. Can a YUM repository be provided as well? The version of CMake in AppStream is usually a few minor versions behind the latest, and I would…

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

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