# Latest

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

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

**Page:** 183

---

## [File TOUCH error](https://discourse.cmake.org/t/file-touch-error/2293)

<div class="topic-metadata">

**Author:** [@VineethV](https://discourse.cmake.org/u/VineethV)\
**Replies:** 1\
**Last updated:** [December 4, 2020, 8:37pm UTC](https://discourse.cmake.org/t/file-touch-error/2293 "2020-12-04T20:37:49Z")

</div>

I have the below code in one of my CMakeList.txt files. # Create a config file to differentiate Release and Debug build version if("${CMAKE\_BUILD\_TYPE}" STREQUAL "Debug") file( TOUCH "${CMAKE\_RUNTIME\_OUTPUT\_DIRECTORY}…

---

## [Cross compile for aarch64 on Ubuntu](https://discourse.cmake.org/t/cross-compile-for-aarch64-on-ubuntu/2161)

<div class="topic-metadata">

**Author:** [@godfool](https://discourse.cmake.org/u/godfool)\
**Replies:** 10\
**Last updated:** [December 4, 2020, 12:45pm UTC](https://discourse.cmake.org/t/cross-compile-for-aarch64-on-ubuntu/2161 "2020-12-04T12:45:12Z")

</div>

I’ve got the tool chain file fairly well figured out. The problem I run into is that the sysroot is at /usr/aarch64-linux-gnu, while the arm64 libs and includes are in /usr/lib/aarch64-linux-gnu and /usr/include/aarch64-…

---

## [What happens when vs\_link\_exe copies dependent exes?](https://discourse.cmake.org/t/what-happens-when-vs-link-exe-copies-dependent-exes/2290)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 1\
**Last updated:** [December 3, 2020, 11:45pm UTC](https://discourse.cmake.org/t/what-happens-when-vs-link-exe-copies-dependent-exes/2290 "2020-12-03T23:45:55Z")

</div>

I’m getting loader errors from a CMake project I work on (Halide). Here’s what I observe: I have Halide.dll in my installed directory. It has md5sum 8676341266e7f5ceb450b98df32f00ab and size 87210496 bytes. When I try …

---

## [Recover compiler warnings of up to date targets](https://discourse.cmake.org/t/recover-compiler-warnings-of-up-to-date-targets/2288)

<div class="topic-metadata">

**Author:** [@bachp](https://discourse.cmake.org/u/bachp)\
**Replies:** 1\
**Last updated:** [December 3, 2020, 4:50pm UTC](https://discourse.cmake.org/t/recover-compiler-warnings-of-up-to-date-targets/2288 "2020-12-03T16:50:13Z")

</div>

Hi All, Is there a way to recover compiler warnings from target that were up to date and thus not run in the current build run. The goal is to be able to show diagnostics for the whole project in Eclipse even tough onl…

---

## [output of cmake command to a file](https://discourse.cmake.org/t/output-of-cmake-command-to-a-file/2287)

<div class="topic-metadata">

**Author:** [@Tzlil\_Gavra](https://discourse.cmake.org/u/Tzlil_Gavra)\
**Replies:** 1\
**Last updated:** [December 3, 2020, 3:37pm UTC](https://discourse.cmake.org/t/output-of-cmake-command-to-a-file/2287 "2020-12-03T15:37:17Z")

</div>

I’m trying to get the output of my compiler while building a project (with the command cmake --build build\_dir --target all -- -j 3) Because I want every target to be printed in a separate file, I can’t use simple pipin…

---

## [ExternalProject\_Add for Makefile project error during build](https://discourse.cmake.org/t/externalproject-add-for-makefile-project-error-during-build/2275)

<div class="topic-metadata">

**Author:** [@eqbalz](https://discourse.cmake.org/u/eqbalz)\
**Replies:** 1\
**Last updated:** [December 2, 2020, 8:10pm UTC](https://discourse.cmake.org/t/externalproject-add-for-makefile-project-error-during-build/2275 "2020-12-02T20:10:12Z")

</div>

I am trying to add Postgresql as a dependency for my project for which I am using ExternalProject module to download the source from github and build, but the build step fails when running from cmake (cmake --build .). C…

---

## [Help with CC, Clang, Environment, and CMake](https://discourse.cmake.org/t/help-with-cc-clang-environment-and-cmake/2221)

<div class="topic-metadata">

**Author:** [@mathomp4](https://discourse.cmake.org/u/mathomp4)\
**Replies:** 11\
**Last updated:** [December 1, 2020, 9:26pm UTC](https://discourse.cmake.org/t/help-with-cc-clang-environment-and-cmake/2221 "2020-12-01T21:26:38Z")

</div>

All, I think I might be an idiot, but I’m not sure what’s going on. I’m having issues with CMake because it seems to be finding the “wrong clang”. In an autotools build (controlled by CMake/ExternalProject\_Add), it’s tr…

---

## [Contribution to the Pelles C Module](https://discourse.cmake.org/t/contribution-to-the-pelles-c-module/2268)

<div class="topic-metadata">

**Author:** [@clin1234](https://discourse.cmake.org/u/clin1234)\
**Replies:** 2\
**Last updated:** [December 1, 2020, 5:39pm UTC](https://discourse.cmake.org/t/contribution-to-the-pelles-c-module/2268 "2020-12-01T17:39:26Z")

</div>

My name is Charlie Lin, and I intend to contribute and maintain support for the Pelles C toolchain.

---

## [Use external libraries that are already linked to a subproject](https://discourse.cmake.org/t/use-external-libraries-that-are-already-linked-to-a-subproject/2269)

<div class="topic-metadata">

**Author:** [@kerim](https://discourse.cmake.org/u/kerim)\
**Replies:** 4\
**Last updated:** [December 1, 2020, 5:00pm UTC](https://discourse.cmake.org/t/use-external-libraries-that-are-already-linked-to-a-subproject/2269 "2020-12-01T17:00:21Z")

</div>

Hi, Let’s suppose I have a project with two subfolders and subPrj1 links libhdf5\_D.lib: Now I want to link subPrj1 to subPrj2 and use the same libhdf5\_D.lib in subPrj2. What is the “cleanest” way to do that? Do I ha…

---

## [cmake command line -D and using DEFINED](https://discourse.cmake.org/t/cmake-command-line-d-and-using-defined/2264)

<div class="topic-metadata">

**Author:** [@bradbell](https://discourse.cmake.org/u/bradbell)\
**Replies:** 6\
**Last updated:** [December 1, 2020, 1:50pm UTC](https://discourse.cmake.org/t/cmake-command-line-d-and-using-defined/2264 "2020-12-01T13:50:13Z")

</div>

I would like to be able to just define a cmake variable without giving it a value, similar to how the C preprocessor can define variables and check if the variable is defined. It seems that I have to use -D variable\_n…

---

## [Can't cross-compile for Windows since CMake \> 3.17.2](https://discourse.cmake.org/t/cant-cross-compile-for-windows-since-cmake-3-17-2/2247)

<div class="topic-metadata">

**Author:** [@Horyu](https://discourse.cmake.org/u/Horyu)\
**Replies:** 3\
**Last updated:** [December 1, 2020, 12:59pm UTC](https://discourse.cmake.org/t/cant-cross-compile-for-windows-since-cmake-3-17-2/2247 "2020-12-01T12:59:41Z")

</div>

Hi, I’m using vcpkg to cross-compile libraries for Windows, I use the llvm 9 + clang-cl 9 toolchains and since the new update of vcpkg that brought cmake to 3.18.4 I can’t cross-compile anymore, it seems the linker sear…

---

## [execute\_process only run once](https://discourse.cmake.org/t/execute-process-only-run-once/2273)

<div class="topic-metadata">

**Author:** [@dalianduzhi](https://discourse.cmake.org/u/dalianduzhi)\
**Replies:** 5\
**Last updated:** [December 1, 2020, 11:16am UTC](https://discourse.cmake.org/t/execute-process-only-run-once/2273 "2020-12-01T11:16:22Z")

</div>

In CMakeLists.txt, execute\_process only run once while run the CMakeLists.txt at first time? If config is done and run the CMakeLists.txt, the execute\_process command will not be run?

---

## [How to check variables specified with -D command line option?](https://discourse.cmake.org/t/how-to-check-variables-specified-with-d-command-line-option/2270)

<div class="topic-metadata">

**Author:** [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)\
**Replies:** 2\
**Last updated:** [December 1, 2020, 9:55am UTC](https://discourse.cmake.org/t/how-to-check-variables-specified-with-d-command-line-option/2270 "2020-12-01T09:55:02Z")

</div>

I’d like my users to be able to set various variable values on the command line. So the cmake ‘-D’ option does this. But how can I insure that the user has spelled the variable correctly on the command line? E.g. suppose…

---

## [Setup a custom preprocessor: using without wrapper function and dependencies](https://discourse.cmake.org/t/setup-a-custom-preprocessor-using-without-wrapper-function-and-dependencies/2272)

<div class="topic-metadata">

**Author:** [@dev-zero](https://discourse.cmake.org/u/dev-zero)\
**Replies:** 1\
**Last updated:** [December 1, 2020, 8:27am UTC](https://discourse.cmake.org/t/setup-a-custom-preprocessor-using-without-wrapper-function-and-dependencies/2272 "2020-12-01T08:27:07Z")

</div>

We are using CMake for a larger Fortran-based project in which we are also employing the Fypp preprocessor. To implement this I added a function ADD\_FYPP\_SOURCES which takes the files, defines a custom command and retur…

---

## [Post-configuration task](https://discourse.cmake.org/t/post-configuration-task/1949)

<div class="topic-metadata">

**Author:** [@tom](https://discourse.cmake.org/u/tom)\
**Replies:** 4\
**Last updated:** [November 30, 2020, 4:03pm UTC](https://discourse.cmake.org/t/post-configuration-task/1949 "2020-11-30T16:03:09Z")

</div>

Hi all, I’m sure this has been asked before, but I couldn’t find any existing threads. I’m developing a C++ platform that our clients regularly compile for themselves. They often compile multiple different configurati…

---

## [How to pass compiler and options to external project configure script?](https://discourse.cmake.org/t/how-to-pass-compiler-and-options-to-external-project-configure-script/2261)

<div class="topic-metadata">

**Author:** [@penguin359](https://discourse.cmake.org/u/penguin359)\
**Replies:** 1\
**Last updated:** [November 30, 2020, 2:14pm UTC](https://discourse.cmake.org/t/how-to-pass-compiler-and-options-to-external-project-configure-script/2261 "2020-11-30T14:14:47Z")

</div>

I am using CMake to compile some native code for Android which relies on a third-party library that uses the autoconf/automake build system. I having trouble trying to figure out how to pass in all the appropriate variab…

---

## [Cannot sign up for reporting a cmake bug](https://discourse.cmake.org/t/cannot-sign-up-for-reporting-a-cmake-bug/2263)

<div class="topic-metadata">

**Author:** [@bradbell](https://discourse.cmake.org/u/bradbell)\
**Replies:** 4\
**Last updated:** [November 30, 2020, 2:10pm UTC](https://discourse.cmake.org/t/cannot-sign-up-for-reporting-a-cmake-bug/2263 "2020-11-30T14:10:52Z")

</div>

I tried to register on https://gitlab.kitware.com/users/sign\_in but I never got a confirmation e-mail. Now when I try to register, it says my username is already taken. When I try to log on it says I need to confirm m…

---

## [Problematic absolute paths in cmake file created by INSTALL(EXPORT)](https://discourse.cmake.org/t/problematic-absolute-paths-in-cmake-file-created-by-install-export/2246)

<div class="topic-metadata">

**Author:** [@Holger](https://discourse.cmake.org/u/Holger)\
**Replies:** 3\
**Last updated:** [November 30, 2020, 1:51pm UTC](https://discourse.cmake.org/t/problematic-absolute-paths-in-cmake-file-created-by-install-export/2246 "2020-11-30T13:51:35Z")

</div>

Hi, I am building the NetworkManagerQt package inside a Yocto project. NetworkMangagerQt creates a file called KF5NetworkManagerQtTargets.cmake using the following command inside a CMakeLists.txt file: install(EXPORT…

---

## [Do not let add\_compile\_definitions to change my define](https://discourse.cmake.org/t/do-not-let-add-compile-definitions-to-change-my-define/2252)

<div class="topic-metadata">

**Author:** [@dalianduzhi](https://discourse.cmake.org/u/dalianduzhi)\
**Replies:** 7\
**Last updated:** [November 30, 2020, 1:43pm UTC](https://discourse.cmake.org/t/do-not-let-add-compile-definitions-to-change-my-define/2252 "2020-11-30T13:43:02Z")

</div>

In MSYS2 on windows10, I want to add the following define to the ArmCC compiler via add\_compile\_definitions -D\_\_TIME\_\_="“NO\_TIME”" But no matter how I write,I can not get the what I wanted. How can I get this define?

---

## [How to download ancillary files during build with wget from Google Drive](https://discourse.cmake.org/t/how-to-download-ancillary-files-during-build-with-wget-from-google-drive/652)

<div class="topic-metadata">

**Author:** [@heather999](https://discourse.cmake.org/u/heather999)\
**Replies:** 2\
**Last updated:** [November 30, 2020, 4:51am UTC](https://discourse.cmake.org/t/how-to-download-ancillary-files-during-build-with-wget-from-google-drive/652 "2020-11-30T04:51:40Z")

</div>

Hi, I’m rather new to cmake and am trying to add a step to an existing cmake project to download 2 ancillary files available on Google Drive using wget. The format for the download command line is a little complicated, …

---

## [No QT5 found on iOS install](https://discourse.cmake.org/t/no-qt5-found-on-ios-install/2148)

<div class="topic-metadata">

**Author:** [@mlander](https://discourse.cmake.org/u/mlander)\
**Replies:** 3\
**Last updated:** [November 29, 2020, 5:48pm UTC](https://discourse.cmake.org/t/no-qt5-found-on-ios-install/2148 "2020-11-29T17:48:05Z")

</div>

I’ve updated the necessary downloads for QT5.15 with with Xcode and Python for a Mantaflow app and am stumped troubleshooting. I’m not too well versed with the coding world! "No Qt5 found (recommended!), trying to use Q…

---

## [How to generate depends.make file for custom language](https://discourse.cmake.org/t/how-to-generate-depends-make-file-for-custom-language/2173)

<div class="topic-metadata">

**Author:** [@rjenkins](https://discourse.cmake.org/u/rjenkins)\
**Replies:** 2\
**Last updated:** [November 29, 2020, 6:02am UTC](https://discourse.cmake.org/t/how-to-generate-depends-make-file-for-custom-language/2173 "2020-11-29T06:02:00Z")

</div>

Hello, I am trying to make a custom language option for building cmake, but my compilation does not correctly update when I do a touch on a header file. In older versions of cmake I remember using (with c++ compilers) …

---

## [Add bin folder of external shared lib to run environment var](https://discourse.cmake.org/t/add-bin-folder-of-external-shared-lib-to-run-environment-var/2257)

<div class="topic-metadata">

**Author:** [@kerim](https://discourse.cmake.org/u/kerim)\
**Replies:** 5\
**Last updated:** [November 28, 2020, 12:31pm UTC](https://discourse.cmake.org/t/add-bin-folder-of-external-shared-lib-to-run-environment-var/2257 "2020-11-28T12:31:07Z")

</div>

Hi, I’m learning the basics of CMake. The task is to link external shared library and launch in debug/release mode. I’m able to successfully link this library and build the project but I’m unable to launch the app bec…

---

## [Testing client cmake usage](https://discourse.cmake.org/t/testing-client-cmake-usage/643)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 7\
**Last updated:** [November 28, 2020, 1:48am UTC](https://discourse.cmake.org/t/testing-client-cmake-usage/643 "2020-11-28T01:48:22Z")

</div>

We want our clients to be able to find\_package our package, and we supply a number of sample applications in our repository. We would like to be able to test that these build and run correctly from the perspective of a c…

---

## [Disable compiler checks](https://discourse.cmake.org/t/disable-compiler-checks/735)

<div class="topic-metadata">

**Author:** [@satrapes](https://discourse.cmake.org/u/satrapes)\
**Replies:** 19\
**Last updated:** [November 27, 2020, 9:13pm UTC](https://discourse.cmake.org/t/disable-compiler-checks/735 "2020-11-27T21:13:58Z")

</div>

Hello, When running cmake it will try to find a suitable compiler and try to see if it can program a simple program with it. Can someone verify that if you specify a variable from the command line that this will not b…

---

## [Can't compile on Ubuntu 16.04 aarch64](https://discourse.cmake.org/t/cant-compile-on-ubuntu-16-04-aarch64/2248)

<div class="topic-metadata">

**Author:** [@poddingue](https://discourse.cmake.org/u/poddingue)\
**Replies:** 4\
**Last updated:** [November 27, 2020, 5:09pm UTC](https://discourse.cmake.org/t/cant-compile-on-ubuntu-16-04-aarch64/2248 "2020-11-27T17:09:54Z")

</div>

Hi there, I’m trying to build CMake directly from your repo, and I am facing some issues. First of all, here are the commands I used: - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - apt …

---

## [Include path added via include\_directories and target\_include\_directories](https://discourse.cmake.org/t/include-path-added-via-include-directories-and-target-include-directories/2254)

<div class="topic-metadata">

**Author:** [@dalianduzhi](https://discourse.cmake.org/u/dalianduzhi)\
**Replies:** 2\
**Last updated:** [November 27, 2020, 10:04am UTC](https://discourse.cmake.org/t/include-path-added-via-include-directories-and-target-include-directories/2254 "2020-11-27T10:04:49Z")

</div>

First,I added the include path1 via include\_directories and then I added the include path2 via target\_include\_directories.The result is path1 is before path2. How can I place path2 before path1 without changing the cal…

---

## [How can Cmake be configured to ignore such 'ADD\_SUBDIRECTORY is not an existing directory' errors?](https://discourse.cmake.org/t/how-can-cmake-be-configured-to-ignore-such-add-subdirectory-is-not-an-existing-directory-errors/2250)

<div class="topic-metadata">

**Author:** [@mirro187](https://discourse.cmake.org/u/mirro187)\
**Replies:** 1\
**Last updated:** [November 27, 2020, 6:06am UTC](https://discourse.cmake.org/t/how-can-cmake-be-configured-to-ignore-such-add-subdirectory-is-not-an-existing-directory-errors/2250 "2020-11-27T06:06:02Z")

</div>

---

## [compile ASM using armasm with MSYS2 in windows10](https://discourse.cmake.org/t/compile-asm-using-armasm-with-msys2-in-windows10/2243)

<div class="topic-metadata">

**Author:** [@dalianduzhi](https://discourse.cmake.org/u/dalianduzhi)\
**Replies:** 1\
**Last updated:** [November 26, 2020, 1:59pm UTC](https://discourse.cmake.org/t/compile-asm-using-armasm-with-msys2-in-windows10/2243 "2020-11-26T13:59:55Z")

</div>

I used the cmake + ninja and got the rule for compiling ASM file command = \\armasm.exe @$RSP\_FILE -o $out $in description = Building ASM object $out rspfile = $RSP\_FILE rspfile\_content = $DEFINES $INCLUDES $FLAGS b…

---

## [Read project version from cache](https://discourse.cmake.org/t/read-project-version-from-cache/1849)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 2\
**Last updated:** [November 26, 2020, 1:48am UTC](https://discourse.cmake.org/t/read-project-version-from-cache/1849 "2020-11-26T01:48:00Z")

</div>

See the following interaction: alex@Alex-Desktop:~/Development/Halide-build$ grep VERSION CMakeCache.txt CMAKE\_PROJECT\_VERSION:STATIC=12.0.0 CMAKE\_PROJECT\_VERSION\_MAJOR:STATIC=12 CMAKE\_PROJECT\_VERSION\_MINOR:STATIC=0 CMA…

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

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