# Development

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

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

**Page:** 19

---

## [Create separate make command for each of CMAKE\_CUDA\_ARCHITECTURES?](https://discourse.cmake.org/t/create-separate-make-command-for-each-of-cmake-cuda-architectures/3777)

<div class="topic-metadata">

**Author:** [@cgorac](https://discourse.cmake.org/u/cgorac)\
**Replies:** 1\
**Last updated:** [July 18, 2021, 12:23pm UTC](https://discourse.cmake.org/t/create-separate-make-command-for-each-of-cmake-cuda-architectures/3777 "2021-07-18T12:23:17Z")

</div>

Hi, The CMAKE\_CUDA\_ARCHITECTURES at the moment works so that single target is generated into the make file, where CUDA compiler invocation would list all the architectures desired. So for example, if I put following in…

---

## [Config modules and recursive import target dependencies](https://discourse.cmake.org/t/config-modules-and-recursive-import-target-dependencies/3735)

<div class="topic-metadata">

**Author:** [@HunterZ](https://discourse.cmake.org/u/HunterZ)\
**Replies:** 5\
**Last updated:** [July 17, 2021, 2:58pm UTC](https://discourse.cmake.org/t/config-modules-and-recursive-import-target-dependencies/3735 "2021-07-17T14:58:51Z")

</div>

This is a follow-up to something posted on the mailing list years ago that was ignored: CMake - Shortcomings with exporting and importing targets I’ve now been bit by this not only in my own projects, but also in the wi…

---

## [Variable exported into parent scope not assigning correctly within that scope](https://discourse.cmake.org/t/variable-exported-into-parent-scope-not-assigning-correctly-within-that-scope/3768)

<div class="topic-metadata">

**Author:** [@mikeb](https://discourse.cmake.org/u/mikeb)\
**Replies:** 2\
**Last updated:** [July 16, 2021, 9:25am UTC](https://discourse.cmake.org/t/variable-exported-into-parent-scope-not-assigning-correctly-within-that-scope/3768 "2021-07-16T09:25:33Z")

</div>

Hi, I have bug for you… The following code, an exported ‘return’ value set by a function and assigned to a second variable within the main scope results in the second variable not being set. function( GetProjectID ) …

---

## [configure\_file breaks multiline comments](https://discourse.cmake.org/t/configure-file-breaks-multiline-comments/3723)

<div class="topic-metadata">

**Author:** [@Albrecht-S](https://discourse.cmake.org/u/Albrecht-S)\
**Replies:** 3\
**Last updated:** [July 13, 2021, 2:00pm UTC](https://discourse.cmake.org/t/configure-file-breaks-multiline-comments/3723 "2021-07-13T14:00:34Z")

</div>

CMake version: 3.20.5 (and older) I’m not sure if my observation is intended behavior or a bug. I noticed that configure\_file() does not check for C (multiline) comments removes all text in a line before #cmakedefine… …

---

## [Inconsistent behavior between generator expressions and if(), else(), etc.](https://discourse.cmake.org/t/inconsistent-behavior-between-generator-expressions-and-if-else-etc/3718)

<div class="topic-metadata">

**Author:** [@KBentley57](https://discourse.cmake.org/u/KBentley57)\
**Replies:** 5\
**Last updated:** [July 13, 2021, 3:12am UTC](https://discourse.cmake.org/t/inconsistent-behavior-between-generator-expressions-and-if-else-etc/3718 "2021-07-13T03:12:49Z")

</div>

Hi All, I recently came across a bug in one of my projects build system, and I feel that its a result of an inconsistent design philosophy between the generator expressions, and the other logical functions. using the E…

---

## [Inconsistent RUNTIME\_DEPEND... args to install() subcommands](https://discourse.cmake.org/t/inconsistent-runtime-depend-args-to-install-subcommands/3691)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 2\
**Last updated:** [July 5, 2021, 11:12pm UTC](https://discourse.cmake.org/t/inconsistent-runtime-depend-args-to-install-subcommands/3691 "2021-07-05T23:12:16Z")

</div>

For CMake 3.21, we are adding support for RUNTIME\_DEPENDENCY\_SET and RUNTIME\_DEPENDENCIES keywords to install(TARGETS), but only RUNTIME\_DEPENDENCY\_SET for the new install(IMPORTED\_RUNTIME\_ARTIFACTS) subcommand. Should t…

---

## [CMake 3.21 rc-1 | Threads::Threads not found](https://discourse.cmake.org/t/cmake-3-21-rc-1-threads-threads-not-found/3630)

<div class="topic-metadata">

**Author:** [@buildSystemPerson](https://discourse.cmake.org/u/buildSystemPerson)\
**Replies:** 6\
**Last updated:** [June 30, 2021, 11:21am UTC](https://discourse.cmake.org/t/cmake-3-21-rc-1-threads-threads-not-found/3630 "2021-06-30T11:21:49Z")

</div>

Since switching to CMake 3.21 we are getting a host of errors relating to “Threads::Threads” This is happening on Windows/MSVC. I get multiple error message like this after configuration is done -- Configuring done CM…

---

## [Have proper value-returning functions ever been considered?](https://discourse.cmake.org/t/have-proper-value-returning-functions-ever-been-considered/3653)

<div class="topic-metadata">

**Author:** [@Zachary\_Turner](https://discourse.cmake.org/u/Zachary_Turner)\
**Replies:** 2\
**Last updated:** [June 29, 2021, 3:46pm UTC](https://discourse.cmake.org/t/have-proper-value-returning-functions-ever-been-considered/3653 "2021-06-29T15:46:09Z")

</div>

Consider this: function(foo OUTPUT\_VARIABLE) set(${OUTPUT\_VARIABLE} 1 PARENT\_SCOPE) endfunction() function(bar) foo(RESULT) if (${RESULT} EQUALS 1) endif() endfunction() Wouldn’t it be nice if we could…

---

## [Should target\_link\_options(staticLib PRIVATE -lfoo) pierce through static libs to the head target?](https://discourse.cmake.org/t/should-target-link-options-staticlib-private-lfoo-pierce-through-static-libs-to-the-head-target/3651)

<div class="topic-metadata">

**Author:** [@alcroito](https://discourse.cmake.org/u/alcroito)\
**Replies:** 3\
**Last updated:** [June 29, 2021, 2:04pm UTC](https://discourse.cmake.org/t/should-target-link-options-staticlib-private-lfoo-pierce-through-static-libs-to-the-head-target/3651 "2021-06-29T14:04:05Z")

</div>

Currently if one calls target\_link\_libraries(staticLib PRIVATE myLib) the implementation of target\_link\_libraries ensures to also add a $\<LINK\_ONLY:myLib\> on staticLib’s INTERFACE\_LINK\_LIBRARIES. Should the same be do…

---

## [How to override the CMAKE\_INCLUDE\_SYSTEM\_FLAG\_\<LANG\>](https://discourse.cmake.org/t/how-to-override-the-cmake-include-system-flag-lang/3615)

<div class="topic-metadata">

**Author:** [@objectx](https://discourse.cmake.org/u/objectx)\
**Replies:** 6\
**Last updated:** [June 24, 2021, 3:41pm UTC](https://discourse.cmake.org/t/how-to-override-the-cmake-include-system-flag-lang/3615 "2021-06-24T15:41:18Z")

</div>

The current development version of CMake introduces the system header distinction for MSVC. But due to our distributed build system limitation, unable to use the -external:I in the command line. Adding -D CMAKE\_INCLUDE…

---

## [How to distribute builds of cmake itself?](https://discourse.cmake.org/t/how-to-distribute-builds-of-cmake-itself/3600)

<div class="topic-metadata">

**Author:** [@dannyNK](https://discourse.cmake.org/u/dannyNK)\
**Replies:** 1\
**Last updated:** [June 21, 2021, 5:32pm UTC](https://discourse.cmake.org/t/how-to-distribute-builds-of-cmake-itself/3600 "2021-06-21T17:32:49Z")

</div>

We are making some modifications to cmake for our project and would like to distribute our branch of cmake itself to the team so they can build using these changes. Is there documentation on how to build a minimal distr…

---

## [Proposal: Dependency pre-scanner for generated includes](https://discourse.cmake.org/t/proposal-dependency-pre-scanner-for-generated-includes/3558)

<div class="topic-metadata">

**Author:** [@chapuni](https://discourse.cmake.org/u/chapuni)\
**Replies:** 8\
**Last updated:** [June 15, 2021, 10:00pm UTC](https://discourse.cmake.org/t/proposal-dependency-pre-scanner-for-generated-includes/3558 "2021-06-15T22:00:35Z")

</div>

Hello. This is my first post. Abstract Specify generated files and their action, instead of add\_dependencies() How we are doing now Assume just lib2.c depends on the generated header. # CMakeLists.txt cmake\_minimum\_re…

---

## [Any plans for CMake dictionaries?](https://discourse.cmake.org/t/any-plans-for-cmake-dictionaries/3517)

<div class="topic-metadata">

**Author:** [@iuliuh](https://discourse.cmake.org/u/iuliuh)\
**Replies:** 2\
**Last updated:** [June 7, 2021, 12:45pm UTC](https://discourse.cmake.org/t/any-plans-for-cmake-dictionaries/3517 "2021-06-07T12:45:40Z")

</div>

Hi, Are there any plans for introducing support for dictionaries in CMake, like there are for lists?

---

## [Verbose message about CMake preset variables](https://discourse.cmake.org/t/verbose-message-about-cmake-preset-variables/3476)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 1\
**Last updated:** [June 6, 2021, 2:14pm UTC](https://discourse.cmake.org/t/verbose-message-about-cmake-preset-variables/3476 "2021-06-06T14:14:35Z")

</div>

Can we move the messages about cmake preset variables to the VERBOSE log level? They are noisy and for scenarios where cmake is repeatedly invoked with the --preset option for the same directory, they are a distraction t…

---

## [Adding support for ASM to CMAKE\_\<LANG\>\_COMPILER\_LAUNCHER](https://discourse.cmake.org/t/adding-support-for-asm-to-cmake-lang-compiler-launcher/3477)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 1\
**Last updated:** [June 3, 2021, 12:46pm UTC](https://discourse.cmake.org/t/adding-support-for-asm-to-cmake-lang-compiler-launcher/3477 "2021-06-03T12:46:22Z")

</div>

Is there anything stopping us from adding ASM to the list of languages that CMAKE\_\<LANG\>\_COMPILER\_LAUNCHER supports? ccache apparently has first-class support for ASM (see support table), so being able to take advantage …

---

## [Noisy output from RC compiler](https://discourse.cmake.org/t/noisy-output-from-rc-compiler/3463)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 4\
**Last updated:** [June 2, 2021, 9:44pm UTC](https://discourse.cmake.org/t/noisy-output-from-rc-compiler/3463 "2021-06-02T21:44:10Z")

</div>

When the RC compiler is executed on Windows, has it always output the verbose banner message? This makes the Ninja output much less nice because it no longer re-uses the same line for each task’s one-liner comment/messag…

---

## [CMAKE\_VS\_SDK\_EXTERNAL\_INCLUDE\_DIRECTORIES](https://discourse.cmake.org/t/cmake-vs-sdk-external-include-directories/3461)

<div class="topic-metadata">

**Author:** [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)\
**Replies:** 2\
**Last updated:** [June 1, 2021, 4:34pm UTC](https://discourse.cmake.org/t/cmake-vs-sdk-external-include-directories/3461 "2021-06-01T16:34:10Z")

</div>

As I’m sure the CMake team knows 16.10 introduced the new external functionality changes. As a result we had to ammend some of our code as well. Like so: set(CMAKE\_VS\_SDK\_INCLUDE\_DIRECTORIES ${FOOBAR\_DK\_INCLUDE\_DIRECTO…

---

## [CTest –show-only interaction with CTEST\_CUSTOM\_POST\_TEST](https://discourse.cmake.org/t/ctest-show-only-interaction-with-ctest-custom-post-test/3418)

<div class="topic-metadata">

**Author:** [@rleigh](https://discourse.cmake.org/u/rleigh)\
**Replies:** 1\
**Last updated:** [May 26, 2021, 5:28pm UTC](https://discourse.cmake.org/t/ctest-show-only-interaction-with-ctest-custom-post-test/3418 "2021-05-26T17:28:49Z")

</div>

Hi folks, I originally posted this to the usage forum, but didn’t get any response (post). However, this looks very much like an unintended bug, so I’d like to run this past you. I’ve had failures running ctest within…

---

## [2 Big Problems With Cache Variables](https://discourse.cmake.org/t/2-big-problems-with-cache-variables/3417)

<div class="topic-metadata">

**Author:** [@anon45792294](https://discourse.cmake.org/u/anon45792294)\
**Replies:** 1\
**Last updated:** [May 26, 2021, 5:27pm UTC](https://discourse.cmake.org/t/2-big-problems-with-cache-variables/3417 "2021-05-26T17:27:02Z")

</div>

I wrote up a GitHub repository to show and highlight what I believe are the 2 biggest problems with cache variables in CMake. The problems are illustrated in markdown, and SSCC’s are provided as well. 1.) The Default P…

---

## [Omit only cmake system files in CMAKE\_SUPPRESS\_REGENERATION](https://discourse.cmake.org/t/omit-only-cmake-system-files-in-cmake-suppress-regeneration/3414)

<div class="topic-metadata">

**Author:** [@FROMAGMA](https://discourse.cmake.org/u/FROMAGMA)\
**Replies:** 4\
**Last updated:** [May 26, 2021, 11:52am UTC](https://discourse.cmake.org/t/omit-only-cmake-system-files-in-cmake-suppress-regeneration/3414 "2021-05-26T11:52:41Z")

</div>

Hi, We use cmake 3.20.0 with ninja 1.9. By set(CMAKE\_SUPPRESS\_REGENERATION ON) ninja omits checking if build system has changed. Is there a possibility to omit only the cmake system files from that, but keeping track …

---

## [One library target building both static and shared](https://discourse.cmake.org/t/one-library-target-building-both-static-and-shared/3155)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 9\
**Last updated:** [May 26, 2021, 7:19am UTC](https://discourse.cmake.org/t/one-library-target-building-both-static-and-shared/3155 "2021-05-26T07:19:30Z")

</div>

Pre-coffee irrational idea, but thought why not put it out there for discussion anyway. A single library target can be built as static or shared, but not both. This presents problems for some consumers who specifically …

---

## [FindVulkan improvement](https://discourse.cmake.org/t/findvulkan-improvement/3385)

<div class="topic-metadata">

**Author:** [@Jan\_Peciva](https://discourse.cmake.org/u/Jan_Peciva)\
**Replies:** 3\
**Last updated:** [May 22, 2021, 10:58pm UTC](https://discourse.cmake.org/t/findvulkan-improvement/3385 "2021-05-22T22:58:27Z")

</div>

I would like to contribute two improvements to FindVulkan.cmake . I am posting it this way as the improvements are trivial (but very useful for us working with Vulkan). In short, they just append two targets: Vulkan::…

---

## [cmake uniform behavior in copying files, folders, and symbolic links](https://discourse.cmake.org/t/cmake-uniform-behavior-in-copying-files-folders-and-symbolic-links/3379)

<div class="topic-metadata">

**Author:** [@FROMAGMA](https://discourse.cmake.org/u/FROMAGMA)\
**Replies:** 1\
**Last updated:** [May 20, 2021, 2:45pm UTC](https://discourse.cmake.org/t/cmake-uniform-behavior-in-copying-files-folders-and-symbolic-links/3379 "2021-05-20T14:45:57Z")

</div>

Hi, Using “file(copy …)” in cmake files is different behavior than “cmake -E copy” command. Especially for linux when copying folders which have symbolic links pointing outside the folder, the “file(copy …)” command ca…

---

## [CMake falsely executes commands inside of if](https://discourse.cmake.org/t/cmake-falsely-executes-commands-inside-of-if/3370)

<div class="topic-metadata">

**Author:** [@Clemens](https://discourse.cmake.org/u/Clemens)\
**Replies:** 3\
**Last updated:** [May 20, 2021, 12:47pm UTC](https://discourse.cmake.org/t/cmake-falsely-executes-commands-inside-of-if/3370 "2021-05-20T12:47:57Z")

</div>

Issue I wanted to build LLVM from source with LibXml2 on Windows. The easiest option for LibXml2 was to use vcpkg. I am using a pull request (see Reproduction), which integrates LibXml2 upstream CMake support. The pro…

---

## [Minimum CMake version for running CMake's own tests](https://discourse.cmake.org/t/minimum-cmake-version-for-running-cmakes-own-tests/3281)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 4\
**Last updated:** [May 15, 2021, 11:01am UTC](https://discourse.cmake.org/t/minimum-cmake-version-for-running-cmakes-own-tests/3281 "2021-05-15T11:01:16Z")

</div>

What is the minimum CMake version (well, really the ctest version) that we support for running CMake’s test suite? The main reason I’m asking is that it feels well past time that we allow using test fixtures in CMake’s o…

---

## [changed name of arhive patterns for last version of cmake](https://discourse.cmake.org/t/changed-name-of-arhive-patterns-for-last-version-of-cmake/3319)

<div class="topic-metadata">

**Author:** [@dskachan](https://discourse.cmake.org/u/dskachan)\
**Replies:** 2\
**Last updated:** [May 14, 2021, 10:55am UTC](https://discourse.cmake.org/t/changed-name-of-arhive-patterns-for-last-version-of-cmake/3319 "2021-05-14T10:55:15Z")

</div>

Hello there! in the latest archive of CMake sources (both cmake.org and github releases) - 3.20.2 the names of packages have changed their pattern. so we have in 3.20.2: cmake-3.20.2-linux-x86\_…

---

## [testing external projects only on change](https://discourse.cmake.org/t/testing-external-projects-only-on-change/3206)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 3\
**Last updated:** [April 26, 2021, 2:11pm UTC](https://discourse.cmake.org/t/testing-external-projects-only-on-change/3206 "2021-04-26T14:11:52Z")

</div>

a simple CMake project compiles sources only when out-of-date, target are linked only when dependers are out-of-date. IIRC unit tests and integration tests are always run, which makes sense to me because a test may not d…

---

## [cmake does not honor --log-level in add\_jar()](https://discourse.cmake.org/t/cmake-does-not-honor-log-level-in-add-jar/3202)

<div class="topic-metadata">

**Author:** [@rhbroberg](https://discourse.cmake.org/u/rhbroberg)\
**Replies:** 3\
**Last updated:** [April 26, 2021, 1:19pm UTC](https://discourse.cmake.org/t/cmake-does-not-honor-log-level-in-add-jar/3202 "2021-04-26T13:19:13Z")

</div>

When running cmake on a project which has add\_jar() in it, a message unconditionally appears during the jar building: -- Clean class files from previous build This message comes from this file (in my installation): /u…

---

## [Tutorial for setting up toolchain environment](https://discourse.cmake.org/t/tutorial-for-setting-up-toolchain-environment/3178)

<div class="topic-metadata">

**Author:** [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)\
**Replies:** 1\
**Last updated:** [April 24, 2021, 6:22pm UTC](https://discourse.cmake.org/t/tutorial-for-setting-up-toolchain-environment/3178 "2021-04-24T18:22:21Z")

</div>

One of the biggest sources of confusion for new CMake/C++ developers is setting up the environment for their toolchain. Unlike other languages, in C++ the build system + toolchain aren’t intrinsically linked. Examples o…

---

## [Relax CMakePresets.json fixed location](https://discourse.cmake.org/t/relax-cmakepresets-json-fixed-location/3199)

<div class="topic-metadata">

**Author:** [@mbee](https://discourse.cmake.org/u/mbee)\
**Replies:** 2\
**Last updated:** [April 22, 2021, 10:24pm UTC](https://discourse.cmake.org/t/relax-cmakepresets-json-fixed-location/3199 "2021-04-22T22:24:10Z")

</div>

The relatively recent introduction of CMakePresets.json and CMakeUserPresets.json are very appreciated here, but will require in our opinion an additional level of flexibility: We would like create the files on the fly.…

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

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