# Development

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

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

**Page:** 8

---

## [CMAKE\_OSX\_SYSROOT does not guide compiler selection](https://discourse.cmake.org/t/cmake-osx-sysroot-does-not-guide-compiler-selection/4872)

<div class="topic-metadata">

**Author:** [@JoeM](https://discourse.cmake.org/u/JoeM)\
**Replies:** 6\
**Last updated:** [October 29, 2024, 5:08am UTC](https://discourse.cmake.org/t/cmake-osx-sysroot-does-not-guide-compiler-selection/4872 "2024-10-29T05:08:20Z")

</div>

The documentation for this variable explains: Specify the location or name of the macOS platform SDK to be used. CMake uses this value to compute the value of the -isysroot flag or equivalent and to help the find\_\* com…

---

## [OH THE IRONY: A BEGINNER'S TALE](https://discourse.cmake.org/t/oh-the-irony-a-beginners-tale/11567)

<div class="topic-metadata">

**Author:** [@Brian\_Cullinan](https://discourse.cmake.org/u/Brian_Cullinan)\
**Replies:** 4\
**Last updated:** [October 26, 2024, 6:40pm UTC](https://discourse.cmake.org/t/oh-the-irony-a-beginners-tale/11567 "2024-10-26T18:40:34Z")

</div>

Today I began cleaning up the cmake code I spend 8 hours yesterday research flags to remove annoying settings created by cmake internally. This is barely fun for me, so let’s get into it. Platform/WASI to use this syste…

---

## [Workflow Presets: We need support for macro expansion in inherits field](https://discourse.cmake.org/t/workflow-presets-we-need-support-for-macro-expansion-in-inherits-field/8798)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 10\
**Last updated:** [October 24, 2024, 2:16pm UTC](https://discourse.cmake.org/t/workflow-presets-we-need-support-for-macro-expansion-in-inherits-field/8798 "2024-10-24T14:16:59Z")

</div>

As duplicate preset names with unique conditon are not supported, do we needs at least macro expansion in inherits fields: { "name": "dev", "displayName": "Ninja developer build with coverage", "i…

---

## [Refactoring CTest](https://discourse.cmake.org/t/refactoring-ctest/12661)

<div class="topic-metadata">

**Author:** [@purpleKarrot](https://discourse.cmake.org/u/purpleKarrot)\
**Replies:** 3\
**Last updated:** [October 18, 2024, 10:12am UTC](https://discourse.cmake.org/t/refactoring-ctest/12661 "2024-10-18T10:12:49Z")

</div>

Recently, I wrote down some ideas how I think CTest should be refactored. This summarizes the refactoring steps: https://purplekarrot.net/blog/refactoring-ctest.html I also wrote some introduction about that topic in …

---

## [Error building cmake 3.30.5 on debian 12 bookworm](https://discourse.cmake.org/t/error-building-cmake-3-30-5-on-debian-12-bookworm/12770)

<div class="topic-metadata">

**Author:** [@MostyPvp](https://discourse.cmake.org/u/MostyPvp)\
**Replies:** 1\
**Last updated:** [October 14, 2024, 2:20pm UTC](https://discourse.cmake.org/t/error-building-cmake-3-30-5-on-debian-12-bookworm/12770 "2024-10-14T14:20:30Z")

</div>

I had to get a newer version of cmake for building another app and when i ran gmake this showed up. help please desktop@desktop:~/Desktop/cmake-3.30.5$ gmake \[ 2%\] Built target cmsys \[ 2%\] Built target cmsys\_c \[ 2%\] …

---

## [CMake presets issue](https://discourse.cmake.org/t/cmake-presets-issue/12700)

<div class="topic-metadata">

**Author:** [@martingalvan-volue](https://discourse.cmake.org/u/martingalvan-volue)\
**Replies:** 9\
**Last updated:** [October 11, 2024, 8:37pm UTC](https://discourse.cmake.org/t/cmake-presets-issue/12700 "2024-10-11T20:37:55Z")

</div>

Hi, I have the following CMakePresets.json: { "version": 5, "configurePresets": \[ { "name": "default", "generator": "Ninja", "binaryDir": "${sourceDir}/build", …

---

## [matlab\_add\_mex configures conflicting warning options for MSVC](https://discourse.cmake.org/t/matlab-add-mex-configures-conflicting-warning-options-for-msvc/12727)

<div class="topic-metadata">

**Author:** [@mpitka](https://discourse.cmake.org/u/mpitka)\
**Replies:** 0\
**Last updated:** [October 9, 2024, 6:03am UTC](https://discourse.cmake.org/t/matlab-add-mex-configures-conflicting-warning-options-for-msvc/12727 "2024-10-09T06:03:14Z")

</div>

Hi, CMake silences compiler warnings for MEX\_VERSION\_FILE (c\_mexapi\_version.c or cpp\_mexapi\_version.cpp) for a list of compilers with a -w switch. When building with the MSVC compiler, this creates a compiler warning abo…

---

## [Potential Bug with Requires: 'libs' in pkgconfig file analysis](https://discourse.cmake.org/t/potential-bug-with-requires-libs-in-pkgconfig-file-analysis/12686)

<div class="topic-metadata">

**Author:** [@ColinH](https://discourse.cmake.org/u/ColinH)\
**Replies:** 0\
**Last updated:** [October 5, 2024, 10:40am UTC](https://discourse.cmake.org/t/potential-bug-with-requires-libs-in-pkgconfig-file-analysis/12686 "2024-10-05T10:40:49Z")

</div>

When porting a Qt5 project recently to Qt6 I had a lot of problems with missing libraries even though the libraries were found, loaded and properly set to link. On investigation I found that several Qt libraries were bei…

---

## [Building 3.29.8 on Debian Buster](https://discourse.cmake.org/t/building-3-29-8-on-debian-buster/11761)

<div class="topic-metadata">

**Author:** [@Soren](https://discourse.cmake.org/u/Soren)\
**Replies:** 2\
**Last updated:** [September 30, 2024, 1:12am UTC](https://discourse.cmake.org/t/building-3-29-8-on-debian-buster/11761 "2024-09-30T01:12:17Z")

</div>

Hi, I recently posted about trying to build latest CMake release. Now I am struggling with building 3.29.8 on Debian Gnu/Linux 10 (Buster) with gcc 8.3.0. I have successfully built the code but the build fails to build t…

---

## [Empty COMPONENT package created with EXCLUDE\_FROM\_ALL](https://discourse.cmake.org/t/empty-component-package-created-with-exclude-from-all/11732)

<div class="topic-metadata">

**Author:** [@neundorf](https://discourse.cmake.org/u/neundorf)\
**Replies:** 5\
**Last updated:** [September 26, 2024, 10:28pm UTC](https://discourse.cmake.org/t/empty-component-package-created-with-exclude-from-all/11732 "2024-09-26T22:28:55Z")

</div>

If I use add\_subdirectory(foo EXCLUDE\_FROM\_ALL), and do install(FILES foo.h COMPONENT Devel), and then do a component-package with the tgz (ARCHIVE)-generator, it creates an empty Foo-Devel.tar.gz. It is empty because …

---

## [target\_source defaults with FILE\_SET too intrusive](https://discourse.cmake.org/t/target-source-defaults-with-file-set-too-intrusive/11776)

<div class="topic-metadata">

**Author:** [@ixsci](https://discourse.cmake.org/u/ixsci)\
**Replies:** 4\
**Last updated:** [September 26, 2024, 1:17pm UTC](https://discourse.cmake.org/t/target-source-defaults-with-file-set-too-intrusive/11776 "2024-09-26T13:17:15Z")

</div>

I have a simple tree with sources like this: Sources --Instruments ----Instrument.h ----CMakeList.txt --Source.cpp I require the code using any headers from subfolders to include them explicitly in the path, so #includ…

---

## [CMake build from source staggers to a halt with cmComputeLinkInformation.cxx.o](https://discourse.cmake.org/t/cmake-build-from-source-staggers-to-a-halt-with-cmcomputelinkinformation-cxx-o/11746)

<div class="topic-metadata">

**Author:** [@Soren](https://discourse.cmake.org/u/Soren)\
**Replies:** 2\
**Last updated:** [September 25, 2024, 2:01am UTC](https://discourse.cmake.org/t/cmake-build-from-source-staggers-to-a-halt-with-cmcomputelinkinformation-cxx-o/11746 "2024-09-25T02:01:32Z")

</div>

Hello, I hope someone can help me with this. I am new to CMake and I am trying to build CMake from the cmake-3.30.3 tarball (cmake-3.30.3.tar.gz) on Debian Gnu/Linux. Its an older 32-bit machine, so building from source…

---

## [What is the status on Header units support in CMake?](https://discourse.cmake.org/t/what-is-the-status-on-header-units-support-in-cmake/11729)

<div class="topic-metadata">

**Author:** [@Tomcat-42](https://discourse.cmake.org/u/Tomcat-42)\
**Replies:** 0\
**Last updated:** [September 19, 2024, 7:28pm UTC](https://discourse.cmake.org/t/what-is-the-status-on-header-units-support-in-cmake/11729 "2024-09-19T19:28:55Z")

</div>

I’ve found the issue cxxmodules: Header unit support plan, but it seems to be no update since then. There is any progress to this feature or is something blocking it?

---

## [Error building CMake on Raspbian bullseye](https://discourse.cmake.org/t/error-building-cmake-on-raspbian-bullseye/11674)

<div class="topic-metadata">

**Author:** [@daveseidel](https://discourse.cmake.org/u/daveseidel)\
**Replies:** 6\
**Last updated:** [September 18, 2024, 1:03pm UTC](https://discourse.cmake.org/t/error-building-cmake-on-raspbian-bullseye/11674 "2024-09-18T13:03:22Z")

</div>

Hi, I’m trying to build 3.30.0 from source on a Raspbian bullseye system (I need a newer version of CMake than is supplied with bullseye, which is 3.18), and it fails with “undefined reference to \`\_\_atomic\_store\_8’”. I …

---

## [IntelLLVM: CMake 3.25+ breaks link.exe options without LINKER prefix](https://discourse.cmake.org/t/intelllvm-cmake-3-25-breaks-link-exe-options-without-linker-prefix/11671)

<div class="topic-metadata">

**Author:** [@Maetveis](https://discourse.cmake.org/u/Maetveis)\
**Replies:** 5\
**Last updated:** [September 13, 2024, 3:17pm UTC](https://discourse.cmake.org/t/intelllvm-cmake-3-25-breaks-link-exe-options-without-linker-prefix/11671 "2024-09-13T15:17:11Z")

</div>

IntelLLVM: CMake 3.25+ breaks link.exe options without LINKER prefix In CMake 3.25 (specifically https://gitlab.kitware.com/cmake/cmake/-/merge\_requests/7533) IntelLLVM changed to pass user provided linker flags (target\_…

---

## [Suggestions on Exception Handling](https://discourse.cmake.org/t/suggestions-on-exception-handling/11616)

<div class="topic-metadata">

**Author:** [@zxyssy28](https://discourse.cmake.org/u/zxyssy28)\
**Replies:** 1\
**Last updated:** [September 10, 2024, 9:32am UTC](https://discourse.cmake.org/t/suggestions-on-exception-handling/11616 "2024-09-10T09:32:04Z")

</div>

Dear sir: We are currently working on software code exception handling and detection.We checked the cmake code using our tool and found some issues. For example, in cmake-3.30.3/Utilities/cmcurl/lib/mime.c:750 ,functio…

---

## [Feature Request: Generated Unity Files and Relative Paths](https://discourse.cmake.org/t/feature-request-generated-unity-files-and-relative-paths/11603)

<div class="topic-metadata">

**Author:** [@jamoor-moj](https://discourse.cmake.org/u/jamoor-moj)\
**Replies:** 0\
**Last updated:** [September 6, 2024, 9:20pm UTC](https://discourse.cmake.org/t/feature-request-generated-unity-files-and-relative-paths/11603 "2024-09-06T21:20:41Z")

</div>

Currently when CMake generates the unity files when using UNITY\_BUILD, the generated file contains absolute paths to the source files that are included: unity\_0\_cxx.cxx /\* generated by CMake \*/ /\* SRC\_math/add.cpp \*/ #…

---

## [CMake string replace command removes all the semicolons in the output content](https://discourse.cmake.org/t/cmake-string-replace-command-removes-all-the-semicolons-in-the-output-content/11521)

<div class="topic-metadata">

**Author:** [@alfred-yu](https://discourse.cmake.org/u/alfred-yu)\
**Replies:** 2\
**Last updated:** [August 25, 2024, 4:33am UTC](https://discourse.cmake.org/t/cmake-string-replace-command-removes-all-the-semicolons-in-the-output-content/11521 "2024-08-25T04:33:16Z")

</div>

Hi, I want to relace the keyword “extern” with “\_\_declspec( dllexport )” in a .c file, below is the content of CMakeLists.txt file: =========== CMakeLists.tx ================ cmake\_minimum\_required(VERSION 3.12) pro…

---

## [Bug with setting rpath in incremental builds](https://discourse.cmake.org/t/bug-with-setting-rpath-in-incremental-builds/11489)

<div class="topic-metadata">

**Author:** [@fnicholson](https://discourse.cmake.org/u/fnicholson)\
**Replies:** 4\
**Last updated:** [August 22, 2024, 10:45am UTC](https://discourse.cmake.org/t/bug-with-setting-rpath-in-incremental-builds/11489 "2024-08-22T10:45:08Z")

</div>

Hi all, It looks like I found a bug in CMake. It sets the rpath (e.g. set(BUILD\_RPATH “lib/dir/here”) when I delete the build folder and build everything fresh. However, if I do an incremental build, the RPATH is not …

---

## [C++ standard to build CMake](https://discourse.cmake.org/t/c-standard-to-build-cmake/11455)

<div class="topic-metadata">

**Author:** [@zaufi](https://discourse.cmake.org/u/zaufi)\
**Replies:** 7\
**Last updated:** [August 20, 2024, 4:43am UTC](https://discourse.cmake.org/t/c-standard-to-build-cmake/11455 "2024-08-20T04:43:14Z")

</div>

According to my chat w/ GPT in 2024 I guess it’s quite possible to use at least C++14 to build CMake. It’s 10 years already since it was approved and seems most (all?) modern distributions have compilers with full suppor…

---

## [CheckLanguage does not take the C++ standard into account](https://discourse.cmake.org/t/checklanguage-does-not-take-the-c-standard-into-account/11433)

<div class="topic-metadata">

**Author:** [@krasznaa](https://discourse.cmake.org/u/krasznaa)\
**Replies:** 9\
**Last updated:** [August 15, 2024, 2:05pm UTC](https://discourse.cmake.org/t/checklanguage-does-not-take-the-c-standard-into-account/11433 "2024-08-15T14:05:27Z")

</div>

Hi, I’ve run into an issue recently that I think CMake could be helping with in a better way. :thinking: In one of our projects we tend to make use of the very latest version of certain compilers at the same time. Which…

---

## [Impact of libexpat dropping Automake?](https://discourse.cmake.org/t/impact-of-libexpat-dropping-automake/11411)

<div class="topic-metadata">

**Author:** [@gruenich](https://discourse.cmake.org/u/gruenich)\
**Replies:** 4\
**Last updated:** [August 12, 2024, 3:15pm UTC](https://discourse.cmake.org/t/impact-of-libexpat-dropping-automake/11411 "2024-08-12T15:15:40Z")

</div>

Dear CMake community, libexpat is a third-party library to parse XML and a dependency of CMake (Utilities/cmexpat). It currently has two build systems, Autotools and CMake. The maintainer wanted to finally migrate to …

---

## [Why CMake doesn't provide variables to select the type of linking to GNU system libraries?](https://discourse.cmake.org/t/why-cmake-doesnt-provide-variables-to-select-the-type-of-linking-to-gnu-system-libraries/11418)

<div class="topic-metadata">

**Author:** [@Daniel](https://discourse.cmake.org/u/Daniel)\
**Replies:** 1\
**Last updated:** [August 12, 2024, 2:58pm UTC](https://discourse.cmake.org/t/why-cmake-doesnt-provide-variables-to-select-the-type-of-linking-to-gnu-system-libraries/11418 "2024-08-12T14:58:18Z")

</div>

Starting from version 3.15, we can explicitly set the type of linking to the MSVC runtime library by setting the value CMAKE\_MSVC\_RUNTIME\_LIBRARY. Next, in 3.24, the CMAKE\_WATCOM\_RUNTIME\_LIBRARY variable was introduced …

---

## [CMake NOT operator broken?](https://discourse.cmake.org/t/cmake-not-operator-broken/11419)

<div class="topic-metadata">

**Author:** [@Louis\_Strous](https://discourse.cmake.org/u/Louis_Strous)\
**Replies:** 1\
**Last updated:** [August 11, 2024, 10:10pm UTC](https://discourse.cmake.org/t/cmake-not-operator-broken/11419 "2024-08-11T22:10:12Z")

</div>

I found a case where the CMake NOT operator doesn’t behave as I expected. I expect that if I negate the condition by prefixing NOT to it then the other branch of the if-statement is taken, but that doesn’t always happen.…

---

## [Error in CPackDeb.cmake](https://discourse.cmake.org/t/error-in-cpackdeb-cmake/11407)

<div class="topic-metadata">

**Author:** [@LavrenovRoman](https://discourse.cmake.org/u/LavrenovRoman)\
**Replies:** 3\
**Last updated:** [August 10, 2024, 4:53am UTC](https://discourse.cmake.org/t/error-in-cpackdeb-cmake/11407 "2024-08-10T04:53:35Z")

</div>

I have a lot of different type files in my project (on Ubuntu 22.04, cmake-3.22). I trying to create a DEB file I’ve got an error in CPack. CPackDeb.cmake file look through all install file and show fatal error with em…

---

## [Feature Request: cmake run $target](https://discourse.cmake.org/t/feature-request-cmake-run-target/9170)

<div class="topic-metadata">

**Author:** [@kisielk](https://discourse.cmake.org/u/kisielk)\
**Replies:** 8\
**Last updated:** [August 8, 2024, 9:50pm UTC](https://discourse.cmake.org/t/feature-request-cmake-run-target/9170 "2024-08-08T21:50:25Z")

</div>

It would be great if the cmake executable gained a run option that could build and run a particular target. Currently a typical scenario I find myself encountering is that a repository has a tool that needs to be built a…

---

## [Feature Request: add debuger config to CmakePresets](https://discourse.cmake.org/t/feature-request-add-debuger-config-to-cmakepresets/11404)

<div class="topic-metadata">

**Author:** [@KSergeyP](https://discourse.cmake.org/u/KSergeyP)\
**Replies:** 0\
**Last updated:** [August 8, 2024, 3:46am UTC](https://discourse.cmake.org/t/feature-request-add-debuger-config-to-cmakepresets/11404 "2024-08-08T03:46:46Z")

</div>

It will be possible to create a workflow: build - debug. Now it is necessary to create separate configurations for cmake and for debugging (VS Code). This means specifying the toolchain file twice - there is no way to l…

---

## [If/how --fresh can be applied recursively to subdirectories](https://discourse.cmake.org/t/if-how-fresh-can-be-applied-recursively-to-subdirectories/11348)

<div class="topic-metadata">

**Author:** [@JosephTremoulet](https://discourse.cmake.org/u/JosephTremoulet)\
**Replies:** 1\
**Last updated:** [July 30, 2024, 1:47pm UTC](https://discourse.cmake.org/t/if-how-fresh-can-be-applied-recursively-to-subdirectories/11348 "2024-07-30T13:47:35Z")

</div>

Hi, I was surprised to see that configuring with --fresh deletes object files in my root directory, but not in directories added with add\_subdirectory. My questions are: Is this intentional? If so, is there a separat…

---

## [Typo in add\_test() documentation](https://discourse.cmake.org/t/typo-in-add-test-documentation/11329)

<div class="topic-metadata">

**Author:** [@Li\_Haohuang](https://discourse.cmake.org/u/Li_Haohuang)\
**Replies:** 1\
**Last updated:** [July 26, 2024, 2:39pm UTC](https://discourse.cmake.org/t/typo-in-add-test-documentation/11329 "2024-07-26T14:39:20Z")

</div>

add\_test — CMake 3.30.1 Documentation As you can see！ :stuck\_out\_tongue\_winking\_eye:

---

## [Setting Default Generators](https://discourse.cmake.org/t/setting-default-generators/1315)

<div class="topic-metadata">

**Author:** [@UebelAndre](https://discourse.cmake.org/u/UebelAndre)\
**Replies:** 5\
**Last updated:** [July 25, 2024, 3:45pm UTC](https://discourse.cmake.org/t/setting-default-generators/1315 "2024-07-25T15:45:10Z")

</div>

Is there a way to set default generators for your project? I haven’t seen any such functionality but it would be hugely beneficial to be able to do this. Example: cmake (path to project dir) Vs cmake -G ‘Visual Studi…

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

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