# Development

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

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

**Page:** 22

---

## [Feature Request: target\_include\_files()](https://discourse.cmake.org/t/feature-request-target-include-files/1992)

<div class="topic-metadata">

**Author:** [@random](https://discourse.cmake.org/u/random)\
**Replies:** 4\
**Last updated:** [October 13, 2020, 1:52pm UTC](https://discourse.cmake.org/t/feature-request-target-include-files/1992 "2020-10-13T13:52:40Z")

</div>

First post so please let me know if I’ve broken some rule. Is there any way to add files in the same manner as target include directories but for individual files? If not, would it be possible to add one? My use case i…

---

## [Bug report - CMake 3.18 findMPI can't find MS-MPI](https://discourse.cmake.org/t/bug-report-cmake-3-18-findmpi-cant-find-ms-mpi/1948)

<div class="topic-metadata">

**Author:** [@tmishima](https://discourse.cmake.org/u/tmishima)\
**Replies:** 2\
**Last updated:** [October 1, 2020, 12:21pm UTC](https://discourse.cmake.org/t/bug-report-cmake-3-18-findmpi-cant-find-ms-mpi/1948 "2020-10-01T12:21:52Z")

</div>

Hi folks, I’m not sure if this is the right place to submit a bug report (if not, please tell me where it is). The CMake 3.18 findMPI on Windows 10 can’t find MS-MPI for Fortran. After some investigations, I found that…

---

## [Potential Bug in 'cmake/Modules/Compiler/clang.cmake' (CMAKE\_C(XX)\_COMPILE\_OPTIONS\_PIC)](https://discourse.cmake.org/t/potential-bug-in-cmake-modules-compiler-clang-cmake-cmake-c-xx-compile-options-pic/1933)

<div class="topic-metadata">

**Author:** [@marchani](https://discourse.cmake.org/u/marchani)\
**Replies:** 6\
**Last updated:** [September 30, 2020, 1:32pm UTC](https://discourse.cmake.org/t/potential-bug-in-cmake-modules-compiler-clang-cmake-cmake-c-xx-compile-options-pic/1933 "2020-09-30T13:32:31Z")

</div>

I was attempting to cross-compile gRPC (https://github.com/grpc/grpc) from Windows to Linux as a third-party dependency using CMake and the Clang compiler; however, I encountered what I believe may be incorrect behavior …

---

## [Consider some heap optimizations](https://discourse.cmake.org/t/consider-some-heap-optimizations/1761)

<div class="topic-metadata">

**Author:** [@OleksandrKvl](https://discourse.cmake.org/u/OleksandrKvl)\
**Replies:** 3\
**Last updated:** [September 2, 2020, 11:18am UTC](https://discourse.cmake.org/t/consider-some-heap-optimizations/1761 "2020-09-02T11:18:55Z")

</div>

Hi, I’ve made some heap optimizations, details are here: Reducing CMake heap usage with Heaptrack. TL;DR: I changed cmListFunction to be a std::shared\_ptr and did a couple of another little changes, you can find them al…

---

## [CMake 3.18 - Feature suggestion: New option for install(CODE ...)](https://discourse.cmake.org/t/cmake-3-18-feature-suggestion-new-option-for-install-code/1756)

<div class="topic-metadata">

**Author:** [@Aymeric\_Pelle](https://discourse.cmake.org/u/Aymeric_Pelle)\
**Replies:** 2\
**Last updated:** [August 28, 2020, 5:53pm UTC](https://discourse.cmake.org/t/cmake-3-18-feature-suggestion-new-option-for-install-code/1756 "2020-08-28T17:53:12Z")

</div>

Hello, I would like to install code at the beginning of the cmake\_install.cmake script. But, to do that an option BEFORE or PREPEND which indicated that the code should be put at the beginning of the install script is …

---

## [Linux 32bit cmake available?](https://discourse.cmake.org/t/linux-32bit-cmake-available/1755)

<div class="topic-metadata">

**Author:** [@bbrodd](https://discourse.cmake.org/u/bbrodd)\
**Replies:** 4\
**Last updated:** [August 27, 2020, 9:19pm UTC](https://discourse.cmake.org/t/linux-32bit-cmake-available/1755 "2020-08-27T21:19:01Z")

</div>

I am trying to install a 32bit version of cmake on my Xubuntu 18.04 32bit system using a script like this: #!/bin/bash version=3.18 build=1 mkdir ~/temp cd ~/temp wget https://cmake.org/files/v$version/cmake-$versi…

---

## [Feature Request: CURL\_EXECUTABLE](https://discourse.cmake.org/t/feature-request-curl-executable/1619)

<div class="topic-metadata">

**Author:** [@mathomp4](https://discourse.cmake.org/u/mathomp4)\
**Replies:** 5\
**Last updated:** [August 4, 2020, 7:00pm UTC](https://discourse.cmake.org/t/feature-request-curl-executable/1619 "2020-08-04T19:00:02Z")

</div>

I was wondering if it would be possible to add to FindCURL.cmake the ability to return CURL\_EXECUTABLE much like FindWget.cmake returns WGET\_EXECUTABLE. I found myself recently having to figure out how to detect if I am…

---

## [CROSSCOMPILING\_EMULATOR property with emulator arguments for GoogleTest](https://discourse.cmake.org/t/crosscompiling-emulator-property-with-emulator-arguments-for-googletest/1659)

<div class="topic-metadata">

**Author:** [@jacand](https://discourse.cmake.org/u/jacand)\
**Replies:** 2\
**Last updated:** [August 3, 2020, 1:39pm UTC](https://discourse.cmake.org/t/crosscompiling-emulator-property-with-emulator-arguments-for-googletest/1659 "2020-08-03T13:39:22Z")

</div>

The CROSSCOMPILING\_EMULATOR property is a list where the first value is the executable and remaining values are arguments. Until (at least) 3.17.3 this property worked correctly with GoogleTest’s gtest\_discover\_tests. Si…

---

## [cmake 3.17.0-3.17.2 won't bootstrap with icpc (Parallel Studio 2020 SP1 on CentOS8.1)](https://discourse.cmake.org/t/cmake-3-17-0-3-17-2-wont-bootstrap-with-icpc-parallel-studio-2020-sp1-on-centos8-1/1131)

<div class="topic-metadata">

**Author:** [@arwild01](https://discourse.cmake.org/u/arwild01)\
**Replies:** 3\
**Last updated:** [July 24, 2020, 10:45am UTC](https://discourse.cmake.org/t/cmake-3-17-0-3-17-2-wont-bootstrap-with-icpc-parallel-studio-2020-sp1-on-centos8-1/1131 "2020-07-24T10:45:39Z")

</div>

icpc version number is actually 19.1.1.217 I haven’t tested other parallel studio’s but I had no problems building 3.16.2 with it. The issue appears to be this line that appeared in bootstrap in 3.17.0 #if (\_\_cplusplu…

---

## [How to skip test](https://discourse.cmake.org/t/how-to-skip-test/1582)

<div class="topic-metadata">

**Author:** [@matzeri](https://discourse.cmake.org/u/matzeri)\
**Replies:** 1\
**Last updated:** [July 20, 2020, 12:47pm UTC](https://discourse.cmake.org/t/how-to-skip-test/1582 "2020-07-20T12:47:18Z")

</div>

I am packaging 3.17.3 for Cygwin. as during the tests one of them stacks and never completes Start 149: ExternalProject how I can skip it to continue with the next ones ? Thanks Marco

---

## [Making Improvements to a Find Module which isn't under Test](https://discourse.cmake.org/t/making-improvements-to-a-find-module-which-isnt-under-test/1586)

<div class="topic-metadata">

**Author:** [@David\_McCabe](https://discourse.cmake.org/u/David_McCabe)\
**Replies:** 1\
**Last updated:** [July 18, 2020, 11:27pm UTC](https://discourse.cmake.org/t/making-improvements-to-a-find-module-which-isnt-under-test/1586 "2020-07-18T23:27:55Z")

</div>

Newbie questions here… Situation/Background Our office insist on using an outdated library for new developments (FLTK 1.3.3 for Windows) and it took a bit of time to get things up and running. I don’t want to delve too…

---

## [Use of -isystem](https://discourse.cmake.org/t/use-of-isystem/1574)

<div class="topic-metadata">

**Author:** [@yann](https://discourse.cmake.org/u/yann)\
**Replies:** 3\
**Last updated:** [July 16, 2020, 4:54pm UTC](https://discourse.cmake.org/t/use-of-isystem/1574 "2020-07-16T16:54:12Z")

</div>

We had a problem when cross-compiling software against sentry, which is linked to sentry-targets.cmake causing usage of $sysroot/usr/include, which causes -isystem to appear early in the commandline. “gcc -v” shows t…

---

## [Generating input files for a test case](https://discourse.cmake.org/t/generating-input-files-for-a-test-case/1496)

<div class="topic-metadata">

**Author:** [@Holger](https://discourse.cmake.org/u/Holger)\
**Replies:** 3\
**Last updated:** [July 8, 2020, 6:42pm UTC](https://discourse.cmake.org/t/generating-input-files-for-a-test-case/1496 "2020-07-08T18:42:55Z")

</div>

Hi, I am writing a test case for which I need several input files. All of these files are fairly trivial, they just need to be there so that CMake actually generates something; so I think checking them in would not be a…

---

## [GitLab: Tracking changes in master.](https://discourse.cmake.org/t/gitlab-tracking-changes-in-master/1494)

<div class="topic-metadata">

**Author:** [@Holger](https://discourse.cmake.org/u/Holger)\
**Replies:** 3\
**Last updated:** [July 6, 2020, 9:17pm UTC](https://discourse.cmake.org/t/gitlab-tracking-changes-in-master/1494 "2020-07-06T21:17:42Z")

</div>

Hi, I have forked the upstream CMake repository into a personal account and created a branch into which I committed stuff (following CONTRIBUTING.rst) In the meantime, the upstream master has changed, but my forked pro…

---

## [Documentation on CTEST\_RESOURCE\_SPEC\_FILE is incomplete](https://discourse.cmake.org/t/documentation-on-ctest-resource-spec-file-is-incomplete/1450)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 1\
**Last updated:** [July 5, 2020, 11:36am UTC](https://discourse.cmake.org/t/documentation-on-ctest-resource-spec-file-is-incomplete/1450 "2020-07-05T11:36:48Z")

</div>

A new CTEST\_RESOURCE\_SPEC\_FILE variable is being added in CMake 3.18. The current docs don’t adequately specify how this variable relates to the other two ways of controlling the resource spec file: Providing a ctest -…

---

## [Broken build.ninja on FreeBSD](https://discourse.cmake.org/t/broken-build-ninja-on-freebsd/1474)

<div class="topic-metadata">

**Author:** [@Holger](https://discourse.cmake.org/u/Holger)\
**Replies:** 4\
**Last updated:** [July 1, 2020, 8:46pm UTC](https://discourse.cmake.org/t/broken-build-ninja-on-freebsd/1474 "2020-07-01T20:46:22Z")

</div>

Hi guys, I compiled CMake (cloned from GitLab) on FreeBSD-12.1-RELEASE and got a broken ninja file. Here is the CMakeLists.txt: cmake\_minimum\_required(VERSION 3.16) project(NinjaOmitLocalOutputTest) add\_library(foo foo…

---

## [Nightly build invoking CMake from outside build directory](https://discourse.cmake.org/t/nightly-build-invoking-cmake-from-outside-build-directory/1453)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 4\
**Last updated:** [June 30, 2020, 11:23am UTC](https://discourse.cmake.org/t/nightly-build-invoking-cmake-from-outside-build-directory/1453 "2020-06-30T11:23:38Z")

</div>

Do we have any nightly builds which run cmake and ctest from a directory other than the build directory? If not, we should try to get at least one build site to do that. This might help catch things like situations that …

---

## [Why in my project bison file (parser.yy)can't include normal header?](https://discourse.cmake.org/t/why-in-my-project-bison-file-parser-yy-cant-include-normal-header/1455)

<div class="topic-metadata">

**Author:** [@cookieli](https://discourse.cmake.org/u/cookieli)\
**Replies:** 1\
**Last updated:** [June 28, 2020, 9:37pm UTC](https://discourse.cmake.org/t/why-in-my-project-bison-file-parser-yy-cant-include-normal-header/1455 "2020-06-28T21:37:13Z")

</div>

Here is the error: /home/lzx/mitscript/parser.yy:29:10: fatal error: AST.h: No such file or directory #include "AST.h" ^~~~~~~ compilation terminated. And here is my cmake: cmake\_minimum\_required(VERSION 3.…

---

## [macOS Big Sur 11 CMake issue fixed in 3.18rc1](https://discourse.cmake.org/t/macos-big-sur-11-cmake-issue-fixed-in-3-18rc1/1440)

<div class="topic-metadata">

**Author:** [@alcroito](https://discourse.cmake.org/u/alcroito)\
**Replies:** 3\
**Last updated:** [June 24, 2020, 4:36pm UTC](https://discourse.cmake.org/t/macos-big-sur-11-cmake-issue-fixed-in-3-18rc1/1440 "2020-06-24T16:36:44Z")

</div>

The macOS beta release notes under the 3rd party apps known issues section, mention that CMake might not work correctly, and the solution is to update 3.18rc1. Does anyone know what the issue is, and which commit in 3.1…

---

## [Default value for new DISCOVERY\_MODE option for gtest\_discover\_tests()](https://discourse.cmake.org/t/default-value-for-new-discovery-mode-option-for-gtest-discover-tests/1422)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 8\
**Last updated:** [June 24, 2020, 1:26pm UTC](https://discourse.cmake.org/t/default-value-for-new-discovery-mode-option-for-gtest-discover-tests/1422 "2020-06-24T13:26:24Z")

</div>

I’m wondering if we might be able to change the default value of the new DISCOVERY\_MODE option for gtest\_discover\_tests(), added in the CMake 3.18 release. We are still in release candidate stage, so it’s not too late to…

---

## [File api and test cases](https://discourse.cmake.org/t/file-api-and-test-cases/1408)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 2\
**Last updated:** [June 19, 2020, 10:06pm UTC](https://discourse.cmake.org/t/file-api-and-test-cases/1408 "2020-06-19T22:06:00Z")

</div>

Does the file api enumerate test cases? I thought there was a change that introduced that, but I couldn’t find anything in CMake’s gitlab, so I’m probably misremembering. The main reason I’m asking is that if it does, th…

---

## [Nightly CMake Build Multiple Tests at Once](https://discourse.cmake.org/t/nightly-cmake-build-multiple-tests-at-once/1298)

<div class="topic-metadata">

**Author:** [@mknobloch](https://discourse.cmake.org/u/mknobloch)\
**Replies:** 2\
**Last updated:** [June 9, 2020, 9:35pm UTC](https://discourse.cmake.org/t/nightly-cmake-build-multiple-tests-at-once/1298 "2020-06-09T21:35:37Z")

</div>

Hello all, I am trying to run the CMake nightly build using the scripts provided from the CMake website, https://gitlab.kitware.com/cmake/cmake/blob/master/Help/dev/testing.rst. After reading over cmake\_common.cmake it…

---

## [compile\_commands.json is not created when no commands exist](https://discourse.cmake.org/t/compile-commands-json-is-not-created-when-no-commands-exist/1317)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 1\
**Last updated:** [June 4, 2020, 11:33pm UTC](https://discourse.cmake.org/t/compile-commands-json-is-not-created-when-no-commands-exist/1317 "2020-06-04T23:33:24Z")

</div>

currently, CMake does not create the file compile\_commands.json if the project has no compile commands: cmake\_minimum\_required( VERSION 3.17.0 ) project(ExportCompileCommands) # workaround for CMake 3.17.0 set(CMAKE\_EXP…

---

## [\[ENH\] Paths handling](https://discourse.cmake.org/t/enh-paths-handling/1313)

<div class="topic-metadata">

**Author:** [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)\
**Replies:** 1\
**Last updated:** [June 4, 2020, 11:31pm UTC](https://discourse.cmake.org/t/enh-paths-handling/1313 "2020-06-04T23:31:00Z")

</div>

Currently the handing of filesystem paths is not quite optimal: Handling is dispatched on two commands: get\_filename\_component and file get\_filename\_component is a bit counterintuitive because it is used for operatio…

---

## [cmake 3.16.5 Segmentation Violation](https://discourse.cmake.org/t/cmake-3-16-5-segmentation-violation/1316)

<div class="topic-metadata">

**Author:** [@tedheadster](https://discourse.cmake.org/u/tedheadster)\
**Replies:** 13\
**Last updated:** [June 4, 2020, 4:08pm UTC](https://discourse.cmake.org/t/cmake-3-16-5-segmentation-violation/1316 "2020-06-04T16:08:45Z")

</div>

I am getting a segmentation violation when running a recompiled ‘cmake’. I rebuilt with debugging symbols; here are the results: /var/tmp/portage/dev-util/cmake-3.16.5/image/usr/bin # gdb ./cmake GNU gdb (Gentoo 9.1 v…

---

## [Darwin.cmake and Fortran Linker](https://discourse.cmake.org/t/darwin-cmake-and-fortran-linker/1308)

<div class="topic-metadata">

**Author:** [@Anthony\_Zukaitis](https://discourse.cmake.org/u/Anthony_Zukaitis)\
**Replies:** 1\
**Last updated:** [June 3, 2020, 9:50am UTC](https://discourse.cmake.org/t/darwin-cmake-and-fortran-linker/1308 "2020-06-03T09:50:02Z")

</div>

We are seeing an issue using Intel Fortran and Fortran as the Linker Languge. We came across the issue where we wanted to add the headerpad\_max\_install\_names flag to the linker. In the Darwin.cmake file, Fortran is ign…

---

## [CPack and post-build actions](https://discourse.cmake.org/t/cpack-and-post-build-actions/1296)

<div class="topic-metadata">

**Author:** [@zaufi](https://discourse.cmake.org/u/zaufi)\
**Replies:** 1\
**Last updated:** [June 1, 2020, 10:28am UTC](https://discourse.cmake.org/t/cpack-and-post-build-actions/1296 "2020-06-01T10:28:17Z")

</div>

Hi, I’d like to propose to add CPACK\_POST\_BUILD\_SCRIPTS variable (plural form to be intact w/ CPACK\_INSTALL\_COMMANDS, \_SCRIPTS & etc). It’s a list of CMake scripts to perform right after CPack has built packages (per ge…

---

## [CPack Archive generator with components and custom scripts](https://discourse.cmake.org/t/cpack-archive-generator-with-components-and-custom-scripts/1295)

<div class="topic-metadata">

**Author:** [@zaufi](https://discourse.cmake.org/u/zaufi)\
**Replies:** 4\
**Last updated:** [May 31, 2020, 2:40pm UTC](https://discourse.cmake.org/t/cpack-archive-generator-with-components-and-custom-scripts/1295 "2020-05-31T14:40:09Z")

</div>

Hi, I have a project which installs various files into different components. It also uses CPack Archive generator to produce several archives. I tried to use CPACK\_INSTALL\_SCRIPTS to add some extra files to the produced…

---

## [CTest Script Mode ( -S ) and return codes](https://discourse.cmake.org/t/ctest-script-mode-s-and-return-codes/1286)

<div class="topic-metadata">

**Author:** [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)\
**Replies:** 4\
**Last updated:** [May 28, 2020, 10:28pm UTC](https://discourse.cmake.org/t/ctest-script-mode-s-and-return-codes/1286 "2020-05-28T22:28:59Z")

</div>

I wanted to start a discussion on CTest script mode, specifically return codes and how errors propagate silently up from the executed script. This discussion stems from the transition of numerous projects including CMak…

---

## [Why is defining an unsupported variable failing the build?](https://discourse.cmake.org/t/why-is-defining-an-unsupported-variable-failing-the-build/1269)

<div class="topic-metadata">

**Author:** [@dbahadir](https://discourse.cmake.org/u/dbahadir)\
**Replies:** 3\
**Last updated:** [May 26, 2020, 11:02am UTC](https://discourse.cmake.org/t/why-is-defining-an-unsupported-variable-failing-the-build/1269 "2020-05-26T11:02:21Z")

</div>

I read the idea of @craig.scott regarding the usage of CMAKE\_DEFAULT\_BUILD\_TYPE to indicate the default build type for different generators (and not only for the “Ninja Multi-Config” generator) here. I find it quite se…

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

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