# Latest

**URL:** https://discourse.cmake.org/latest.md?page=194

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

**Page:** 195

---

## [Share pre-compiled header object](https://discourse.cmake.org/t/share-pre-compiled-header-object/1428)

<div class="topic-metadata">

**Author:** [@MathiasMagnus](https://discourse.cmake.org/u/MathiasMagnus)\
**Replies:** 1\
**Last updated:** [June 23, 2020, 12:11pm UTC](https://discourse.cmake.org/t/share-pre-compiled-header-object/1428 "2020-06-23T12:11:07Z")

</div>

I have a whole bunch of unit tests that share the headers of Google Test and a bunch of common includes. Many targets, same PCH. I noticed that inheriting an INTERFACE library as per the docs will create multiple PCH fil…

---

## [Which variables are not meant to be set in the CMakeLists.txt?](https://discourse.cmake.org/t/which-variables-are-not-meant-to-be-set-in-the-cmakelists-txt/1424)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 1\
**Last updated:** [June 22, 2020, 1:07pm UTC](https://discourse.cmake.org/t/which-variables-are-not-meant-to-be-set-in-the-cmakelists-txt/1424 "2020-06-22T13:07:48Z")

</div>

I understand that some variables are not meant to be set() in the CMakeLists.txt file, but are allowed to be set at the command line or in a toolchain file. Which variables are these? Are they documented anywhere? For i…

---

## [PRE-Ninja Bash-Command](https://discourse.cmake.org/t/pre-ninja-bash-command/1418)

<div class="topic-metadata">

**Author:** [@aphardt](https://discourse.cmake.org/u/aphardt)\
**Replies:** 9\
**Last updated:** [June 22, 2020, 12:51pm UTC](https://discourse.cmake.org/t/pre-ninja-bash-command/1418 "2020-06-22T12:51:20Z")

</div>

Hi I work on a big Cortex-M project with arm-none-eabi-gcc, cmake and ninja-build. The current build process is a bash script which consists of 4 parts: Execute pre-cmake-build bash instruction (also here, some file…

---

## [Modifying CMAKE\_\<LANG\>\_LINK\_EXECUTABLE in toolchain file](https://discourse.cmake.org/t/modifying-cmake-lang-link-executable-in-toolchain-file/1386)

<div class="topic-metadata">

**Author:** [@jairo](https://discourse.cmake.org/u/jairo)\
**Replies:** 4\
**Last updated:** [June 21, 2020, 1:39pm UTC](https://discourse.cmake.org/t/modifying-cmake-lang-link-executable-in-toolchain-file/1386 "2020-06-21T13:39:58Z")

</div>

Hello! I’m having quite some trouble finding a way to modify CMAKE\_C\_LINK\_EXECUTABLE/CMAKE\_CXX\_LINK\_EXECUTABLE for my embedded cross-compilation project. The compiler ID resolves correctly to “TI” and subsequencly TI-C.…

---

## [CMake Error at CMakeLists.txt:2](https://discourse.cmake.org/t/cmake-error-at-cmakelists-txt-2/1412)

<div class="topic-metadata">

**Author:** [@Vaya\_Putra](https://discourse.cmake.org/u/Vaya_Putra)\
**Replies:** 6\
**Last updated:** [June 19, 2020, 11:52pm UTC](https://discourse.cmake.org/t/cmake-error-at-cmakelists-txt-2/1412 "2020-06-19T23:52:24Z")

</div>

dear all i am newbie using cmake. i found a problem since i have to upgrade my cmake. actually i already install cmake new version 3.15.6 i am too struggle how to fixed this. Usage CMake Error at CMakeLists.txt:2 (…

---

## [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…

---

## [Trying to install CMake 3.17.3 on Ubuntu](https://discourse.cmake.org/t/trying-to-install-cmake-3-17-3-on-ubuntu/1415)

<div class="topic-metadata">

**Author:** [@PaulGureghian](https://discourse.cmake.org/u/PaulGureghian)\
**Replies:** 3\
**Last updated:** [June 19, 2020, 8:50pm UTC](https://discourse.cmake.org/t/trying-to-install-cmake-3-17-3-on-ubuntu/1415 "2020-06-19T20:50:54Z")

</div>

my system is Ubuntu 20 on WSL and up to date. screenshots

---

## [Chaging order of options in the link command of a cross-compilation project via CMAKE\_CXX\_LINK\_EXECUTABLE](https://discourse.cmake.org/t/chaging-order-of-options-in-the-link-command-of-a-cross-compilation-project-via-cmake-cxx-link-executable/1346)

<div class="topic-metadata">

**Author:** [@jairo](https://discourse.cmake.org/u/jairo)\
**Replies:** 2\
**Last updated:** [June 19, 2020, 1:48pm UTC](https://discourse.cmake.org/t/chaging-order-of-options-in-the-link-command-of-a-cross-compilation-project-via-cmake-cxx-link-executable/1346 "2020-06-19T13:48:40Z")

</div>

I have a CMake toolchain file to cross-compile to a TI C2000 (C28x) MCU. The compilation seems to go well except during the link process I receive a couple of warnings, the relevant warning says warning: Option -o is an…

---

## [\[solved\] light theme is too dark](https://discourse.cmake.org/t/solved-light-theme-is-too-dark/1409)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 5\
**Last updated:** [June 19, 2020, 12:25pm UTC](https://discourse.cmake.org/t/solved-light-theme-is-too-dark/1409 "2020-06-19T12:25:19Z")

</div>

I chose the light theme on the mobile app for this forum. I find it very uncomfortable to read. the light theme is very dark, only a tiny bit lighter then the dark theme.

---

## [Do not run custom targets in parallel](https://discourse.cmake.org/t/do-not-run-custom-targets-in-parallel/1353)

<div class="topic-metadata">

**Author:** [@KUGA2](https://discourse.cmake.org/u/KUGA2)\
**Replies:** 3\
**Last updated:** [June 19, 2020, 8:10am UTC](https://discourse.cmake.org/t/do-not-run-custom-targets-in-parallel/1353 "2020-06-19T08:10:24Z")

</div>

I have a custom function that creates a custom target with a custom command. This custom command uses a common file (changes it and restores it). Now, there is a race condition. If two of those targets run at the same t…

---

## [Maintaining list of Python source files without file(GLOB\_RECURSE ...)](https://discourse.cmake.org/t/maintaining-list-of-python-source-files-without-file-glob-recurse/1404)

<div class="topic-metadata">

**Author:** [@praetorian](https://discourse.cmake.org/u/praetorian)\
**Replies:** 4\
**Last updated:** [June 18, 2020, 9:05pm UTC](https://discourse.cmake.org/t/maintaining-list-of-python-source-files-without-file-glob-recurse/1404 "2020-06-18T21:05:47Z")

</div>

Hi everyone, I have a large project that uses CMake (3.6) & ninja for building. The code is mostly C++ but it has a few Python components as well. The build process auto-generates some Python files in ${CMAKE\_BINARY\_DIR…

---

## [how to use --build-config-sample?](https://discourse.cmake.org/t/how-to-use-build-config-sample/1354)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 1\
**Last updated:** [June 18, 2020, 7:19pm UTC](https://discourse.cmake.org/t/how-to-use-build-config-sample/1354 "2020-06-18T19:19:19Z")

</div>

ctest has an option called: --build-config-sample A sample executable to use to determine the configuration that should be used. e.g. Debug , Release etc. I do not understand its purpose. Can someone explain the con…

---

## [How to install the most current version](https://discourse.cmake.org/t/how-to-install-the-most-current-version/1400)

<div class="topic-metadata">

**Author:** [@PaulGureghian](https://discourse.cmake.org/u/PaulGureghian)\
**Replies:** 2\
**Last updated:** [June 18, 2020, 4:08pm UTC](https://discourse.cmake.org/t/how-to-install-the-most-current-version/1400 "2020-06-18T16:08:45Z")

</div>

on Debian 10 ?

---

## [CPack and rpm specfile packages](https://discourse.cmake.org/t/cpack-and-rpm-specfile-packages/1379)

<div class="topic-metadata">

**Author:** [@David\_Boucher](https://discourse.cmake.org/u/David_Boucher)\
**Replies:** 2\
**Last updated:** [June 17, 2020, 6:39pm UTC](https://discourse.cmake.org/t/cpack-and-rpm-specfile-packages/1379 "2020-06-17T18:39:45Z")

</div>

Hi, I have a big RPM spec file for a project that I would like to use with CPack. I can change things in that file if needed. This specfile contains several %package tags I would like to keep. I tried to use CPack with …

---

## [CMake 3.18.0-rc2 is ready for testing](https://discourse.cmake.org/t/cmake-3-18-0-rc2-is-ready-for-testing/1398)

<div class="topic-metadata">

**Author:** [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)\
**Replies:** 0\
**Last updated:** [June 17, 2020, 4:46pm UTC](https://discourse.cmake.org/t/cmake-3-18-0-rc2-is-ready-for-testing/1398 "2020-06-17T16:46:27Z")

</div>

I am proud to announce the second CMake 3.18 release candidate. https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.18 Release notes appear below and are also published at http…

---

## [How do I add windows APIs to cmake?](https://discourse.cmake.org/t/how-do-i-add-windows-apis-to-cmake/1363)

<div class="topic-metadata">

**Author:** [@imlost](https://discourse.cmake.org/u/imlost)\
**Replies:** 4\
**Last updated:** [June 16, 2020, 8:19pm UTC](https://discourse.cmake.org/t/how-do-i-add-windows-apis-to-cmake/1363 "2020-06-16T20:19:41Z")

</div>

I’m currently porting a crossplatform project to CMAKE and so far I’ve been able to just use find\_package() or add\_subdirectory() when dealing with third party libraries, but I don’t know how do it with Windows APIs. In …

---

## [CMake Generator Error: Failure to Convert include\_directories(...) See attached ZIP file](https://discourse.cmake.org/t/cmake-generator-error-failure-to-convert-include-directories-see-attached-zip-file/1396)

<div class="topic-metadata">

**Author:** [@Garry\_Anderson1](https://discourse.cmake.org/u/Garry_Anderson1)\
**Replies:** 11\
**Last updated:** [June 16, 2020, 12:37pm UTC](https://discourse.cmake.org/t/cmake-generator-error-failure-to-convert-include-directories-see-attached-zip-file/1396 "2020-06-16T12:37:29Z")

</div>

Support Team: My code development is being blocked by the CMake Generator, which fails to generate any Unix Makefiles code from “include\_directories” found in the CMakeLists.txt source. Can anybody help figure out what…

---

## [How to gather all files automatically to compile for executable](https://discourse.cmake.org/t/how-to-gather-all-files-automatically-to-compile-for-executable/1394)

<div class="topic-metadata">

**Author:** [@johnratius](https://discourse.cmake.org/u/johnratius)\
**Replies:** 5\
**Last updated:** [June 15, 2020, 4:32pm UTC](https://discourse.cmake.org/t/how-to-gather-all-files-automatically-to-compile-for-executable/1394 "2020-06-15T16:32:03Z")

</div>

I am trying to compile libraries on my own from a CMake script. For now, it’s just GLAD and GLFW. So for a normal project, I create a SOURCES variable and add the necessary headers and cpp files to it, then use the SOUR…

---

## [CMake generating invalid Ninja build rules for asm](https://discourse.cmake.org/t/cmake-generating-invalid-ninja-build-rules-for-asm/1389)

<div class="topic-metadata">

**Author:** [@tbrearley](https://discourse.cmake.org/u/tbrearley)\
**Replies:** 3\
**Last updated:** [June 15, 2020, 4:11pm UTC](https://discourse.cmake.org/t/cmake-generating-invalid-ninja-build-rules-for-asm/1389 "2020-06-15T16:11:58Z")

</div>

I am attempting to use CMake with the Ninja generator to cross compile a project for ARM. Part of this project consists of .asm files that are passed to arm-none-eabi-as during the build process. However, when I attempt…

---

## [CMAKE\_CUDA\_HOST\_COMPILER reset to empty after enable\_language(CUDA) for CMake v3.17.3](https://discourse.cmake.org/t/cmake-cuda-host-compiler-reset-to-empty-after-enable-language-cuda-for-cmake-v3-17-3/1381)

<div class="topic-metadata">

**Author:** [@Triston\_C](https://discourse.cmake.org/u/Triston_C)\
**Replies:** 0\
**Last updated:** [June 12, 2020, 7:06pm UTC](https://discourse.cmake.org/t/cmake-cuda-host-compiler-reset-to-empty-after-enable-language-cuda-for-cmake-v3-17-3/1381 "2020-06-12T19:06:33Z")

</div>

My CMAKE\_CUDA\_HOST\_COMPILER was set as aarch64-linux-gnu-gcc. After enable\_language(CUDA), the var is set to empty string. The problem did not happene in v3.17.2. message(STATUS “CMAKE\_CUDA\_HOST\_COMPILER=${CMAKE\_CUDA\_HO…

---

## [Provide more tags](https://discourse.cmake.org/t/provide-more-tags/1395)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 0\
**Last updated:** [June 15, 2020, 9:59am UTC](https://discourse.cmake.org/t/provide-more-tags/1395 "2020-06-15T09:59:29Z")

</div>

Current tagging system is too restricted. Please add the possibility to create more tags to narrow topic subscriptions.

---

## [How to find a specific Python module?](https://discourse.cmake.org/t/how-to-find-a-specific-python-module/1393)

<div class="topic-metadata">

**Author:** [@airwin](https://discourse.cmake.org/u/airwin)\
**Replies:** 2\
**Last updated:** [June 15, 2020, 1:31am UTC](https://discourse.cmake.org/t/how-to-find-a-specific-python-module/1393 "2020-06-15T01:31:43Z")

</div>

I have a specific Python module that currently happens to be located at /home/software/plplot/installcmake/lib/python3.7/site-packages/\_plplotc.so The specific prefix part of that fullpath can be specified using the en…

---

## [cmake\_parse\_arguments causes all arguments to be unhandeled](https://discourse.cmake.org/t/cmake-parse-arguments-causes-all-arguments-to-be-unhandeled/1392)

<div class="topic-metadata">

**Author:** [@johnratius](https://discourse.cmake.org/u/johnratius)\
**Replies:** 4\
**Last updated:** [June 14, 2020, 10:45pm UTC](https://discourse.cmake.org/t/cmake-parse-arguments-causes-all-arguments-to-be-unhandeled/1392 "2020-06-14T22:45:31Z")

</div>

I have a function and am trying to pass arguments though. Specifically my project name, and then Source files for my project. It’s set up like this: function( make\_function ) set( oneValueArgs APP\_NAME ) set( multiVal…

---

## [CMake Generator Error for Unix Makefiles - Would like a Solution.](https://discourse.cmake.org/t/cmake-generator-error-for-unix-makefiles-would-like-a-solution/1385)

<div class="topic-metadata">

**Author:** [@Garry\_Anderson1](https://discourse.cmake.org/u/Garry_Anderson1)\
**Replies:** 9\
**Last updated:** [June 14, 2020, 10:10am UTC](https://discourse.cmake.org/t/cmake-generator-error-for-unix-makefiles-would-like-a-solution/1385 "2020-06-14T10:10:39Z")

</div>

Hi CMake Discourse Gurus” When the CMake Generator (cmake -G “Eclipse CDT4 - Unix Makefiles”) process the following command line found in CMakeLists.txt: include\_directories($(MACRO\_UTILS\_INC\_FOLDER)) a Generated rea…

---

## [add\_test in CTestTestfile.cmake to contain relative paths.](https://discourse.cmake.org/t/add-test-in-ctesttestfile-cmake-to-contain-relative-paths/1340)

<div class="topic-metadata">

**Author:** [@Jacob\_Varghese](https://discourse.cmake.org/u/Jacob_Varghese)\
**Replies:** 18\
**Last updated:** [June 14, 2020, 1:15am UTC](https://discourse.cmake.org/t/add-test-in-ctesttestfile-cmake-to-contain-relative-paths/1340 "2020-06-14T01:15:05Z")

</div>

Can CTestTestfile.cmake hold relative paths instead of absolute ? I’m trying to move my build and test folders and executables to another VM and test it there where the folder structure is obviously different. I need to…

---

## [Set default toolchain system-wide](https://discourse.cmake.org/t/set-default-toolchain-system-wide/1373)

<div class="topic-metadata">

**Author:** [@Achpile](https://discourse.cmake.org/u/Achpile)\
**Replies:** 2\
**Last updated:** [June 12, 2020, 7:14am UTC](https://discourse.cmake.org/t/set-default-toolchain-system-wide/1373 "2020-06-12T07:14:10Z")

</div>

Good day. I use cmake on linux for cross-compilation. For both 32 and 64 systems i have separate “chroots”. Now I also want to add one for windows as well to compile with mingw. So the question is - can I set up mingw to…

---

## [Can I create a global variable to use for future projects?](https://discourse.cmake.org/t/can-i-create-a-global-variable-to-use-for-future-projects/1359)

<div class="topic-metadata">

**Author:** [@johnratius](https://discourse.cmake.org/u/johnratius)\
**Replies:** 5\
**Last updated:** [June 12, 2020, 1:55am UTC](https://discourse.cmake.org/t/can-i-create-a-global-variable-to-use-for-future-projects/1359 "2020-06-12T01:55:29Z")

</div>

I am wondering if there is a way to set a “global” variable, except it can be used with other projects that don’t initially declare it. Let me explain: I have a folder on my system that contains many useful include fold…

---

## [Feature Request: Give me a way to specify the MSVC Toolset when using "-G Ninja"](https://discourse.cmake.org/t/feature-request-give-me-a-way-to-specify-the-msvc-toolset-when-using-g-ninja/1332)

<div class="topic-metadata">

**Author:** [@steven-johnson](https://discourse.cmake.org/u/steven-johnson)\
**Replies:** 8\
**Last updated:** [June 10, 2020, 11:24pm UTC](https://discourse.cmake.org/t/feature-request-give-me-a-way-to-specify-the-msvc-toolset-when-using-g-ninja/1332 "2020-06-10T23:24:35Z")

</div>

TL;DR: I wish CMake had an optional arg that meant “run vcvarsall x64|x86|etc before doing anything else”. More backstory: I have a buildbot worker script running in a git-for-windows bash shell (basically, msys2) The…

---

## [find\_program issue with space in filename](https://discourse.cmake.org/t/find-program-issue-with-space-in-filename/1365)

<div class="topic-metadata">

**Author:** [@fry](https://discourse.cmake.org/u/fry)\
**Replies:** 2\
**Last updated:** [June 10, 2020, 11:01pm UTC](https://discourse.cmake.org/t/find-program-issue-with-space-in-filename/1365 "2020-06-10T23:01:10Z")

</div>

I have the following code: find\_program( RECON\_EXE NAMES "Reason Recon" "Reason Recon 11 RESDK41 Logging" PATHS "/Applications/Reason Recon" "/Applications" "c:/Program Files/Propellerhead/Reason Recon" ) me…

---

## [CMake 3.18.0-rc1 is ready for testing](https://discourse.cmake.org/t/cmake-3-18-0-rc1-is-ready-for-testing/1360)

<div class="topic-metadata">

**Author:** [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)\
**Replies:** 2\
**Last updated:** [June 10, 2020, 3:07pm UTC](https://discourse.cmake.org/t/cmake-3-18-0-rc1-is-ready-for-testing/1360 "2020-06-10T15:07:41Z")

</div>

I am proud to announce the first CMake 3.18 release candidate. https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.18 Release notes appear below and are also published at https…

[Previous page](https://discourse.cmake.org/latest.md?page=193)

[Next page](https://discourse.cmake.org/latest.md?page=195)
