# Latest

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

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

**Page:** 182

---

## [Checking if specific boost headers are available](https://discourse.cmake.org/t/checking-if-specific-boost-headers-are-available/2352)

<div class="topic-metadata">

**Author:** [@javierelpianista](https://discourse.cmake.org/u/javierelpianista)\
**Replies:** 2\
**Last updated:** [December 12, 2020, 3:24pm UTC](https://discourse.cmake.org/t/checking-if-specific-boost-headers-are-available/2352 "2020-12-12T15:24:28Z")

</div>

Is there a way to check if specific boost header-only libraries are installed? I am aware of the COMPONENTS option in the find\_package(Boost ...) command, but it only works for compiled libraries. I am particularly inte…

---

## [Version range support write\_basic\_config\_version\_file() may be too restrictive](https://discourse.cmake.org/t/version-range-support-write-basic-config-version-file-may-be-too-restrictive/2347)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 5\
**Last updated:** [December 12, 2020, 1:19pm UTC](https://discourse.cmake.org/t/version-range-support-write-basic-config-version-file-may-be-too-restrictive/2347 "2020-12-12T13:19:11Z")

</div>

@marc.chevrier When we added the support for version ranges in MR 5226, using any compatibility mode other than AnyNewerVersion generates an author warning when any sort of version range is given to a find\_package() call…

---

## [What is the default target when building a project?](https://discourse.cmake.org/t/what-is-the-default-target-when-building-a-project/2341)

<div class="topic-metadata">

**Author:** [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)\
**Replies:** 4\
**Last updated:** [December 11, 2020, 8:27pm UTC](https://discourse.cmake.org/t/what-is-the-default-target-when-building-a-project/2341 "2020-12-11T20:27:07Z")

</div>

https://cmake.org/cmake/help/latest/manual/cmake.1.html#build-a-project Looking at the cmake build documentation I’m a bit confused. --target \<tgt\>..., -t \<tgt\>... Build \<tgt\> instead of the default target. Multip…

---

## [Clarification of 'backtrace' from file-api](https://discourse.cmake.org/t/clarification-of-backtrace-from-file-api/2295)

<div class="topic-metadata">

**Author:** [@mbee](https://discourse.cmake.org/u/mbee)\
**Replies:** 3\
**Last updated:** [December 11, 2020, 7:58pm UTC](https://discourse.cmake.org/t/clarification-of-backtrace-from-file-api/2295 "2020-12-11T19:58:47Z")

</div>

I’m not a beginner in cmake, but up to now have never used the file api or its predecessor, the server mode. Currently, I am trying to exploit the api and stumbled into the term ‘backtrace’. The documentation states for…

---

## [how to package a GNU make project?](https://discourse.cmake.org/t/how-to-package-a-gnu-make-project/2350)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 2\
**Last updated:** [December 11, 2020, 6:34pm UTC](https://discourse.cmake.org/t/how-to-package-a-gnu-make-project/2350 "2020-12-11T18:34:32Z")

</div>

I have a CMake project that depends on an external project. The external project is a GNU make build. With external\_project\_add i chose the binaries to install under build/dep1-prefix/bin. Now, i also want to install t…

---

## [CPack doesn't produce a debian dbgsym package alongside debian binary package](https://discourse.cmake.org/t/cpack-doesnt-produce-a-debian-dbgsym-package-alongside-debian-binary-package/1255)

<div class="topic-metadata">

**Author:** [@manuel](https://discourse.cmake.org/u/manuel)\
**Replies:** 3\
**Last updated:** [December 11, 2020, 4:17pm UTC](https://discourse.cmake.org/t/cpack-doesnt-produce-a-debian-dbgsym-package-alongside-debian-binary-package/1255 "2020-12-11T16:17:47Z")

</div>

Hello all, I have a CMake project which successfully builds a static library and packages it as a debian package. I would like to distribute a dgbsym package along with it. Altough I think I followed all the steps neces…

---

## [cpack doesn't produce .ddeb as expected](https://discourse.cmake.org/t/cpack-doesnt-produce-ddeb-as-expected/2349)

<div class="topic-metadata">

**Author:** [@gmabey](https://discourse.cmake.org/u/gmabey)\
**Replies:** 0\
**Last updated:** [December 11, 2020, 4:16pm UTC](https://discourse.cmake.org/t/cpack-doesnt-produce-ddeb-as-expected/2349 "2020-12-11T16:16:14Z")

</div>

---

## [Suggested way to add mapfile output to a project with multiple target toolchains?](https://discourse.cmake.org/t/suggested-way-to-add-mapfile-output-to-a-project-with-multiple-target-toolchains/2342)

<div class="topic-metadata">

**Author:** [@Russell\_Schultz](https://discourse.cmake.org/u/Russell_Schultz)\
**Replies:** 2\
**Last updated:** [December 11, 2020, 2:59pm UTC](https://discourse.cmake.org/t/suggested-way-to-add-mapfile-output-to-a-project-with-multiple-target-toolchains/2342 "2020-12-11T14:59:47Z")

</div>

I have a multi-toolchain development environment (IAR-ARM, MSVC, and Tensilica-Clang) and mapfile are invaluable to embedded development. In each toolchain file, I’m able to set default linker flags, etc, but in general…

---

## [Feature Request: Add env\_file option to CMake Command Mode](https://discourse.cmake.org/t/feature-request-add-env-file-option-to-cmake-command-mode/2344)

<div class="topic-metadata">

**Author:** [@WhoBrokeTheBuild](https://discourse.cmake.org/u/WhoBrokeTheBuild)\
**Replies:** 5\
**Last updated:** [December 11, 2020, 2:29pm UTC](https://discourse.cmake.org/t/feature-request-add-env-file-option-to-cmake-command-mode/2344 "2020-12-11T14:29:46Z")

</div>

Hello! I propose adding a new option to cmake -E that takes a file of environment variables to set, much like cmake -E env. Example: .env THIS=THAT MY\_PATH=/path/to/thing DEBUG\_MODE=yes cmake -E env\_file .env my\_com…

---

## [cpack -G NuGet : how does one generate the targets file?](https://discourse.cmake.org/t/cpack-g-nuget-how-does-one-generate-the-targets-file/1633)

<div class="topic-metadata">

**Author:** [@masariello](https://discourse.cmake.org/u/masariello)\
**Replies:** 2\
**Last updated:** [December 10, 2020, 9:31pm UTC](https://discourse.cmake.org/t/cpack-g-nuget-how-does-one-generate-the-targets-file/1633 "2020-12-10T21:31:20Z")

</div>

Hi All First time poster Quick question: what’s the recommended way to add a build/native/some\_pkg\_name.targets file to a NuGet package with CPack? I can certainly use something like the following: install(FILES proj…

---

## [Patch source with instrumentation without altering original code](https://discourse.cmake.org/t/patch-source-with-instrumentation-without-altering-original-code/2338)

<div class="topic-metadata">

**Author:** [@StefanSchmelz](https://discourse.cmake.org/u/StefanSchmelz)\
**Replies:** 1\
**Last updated:** [December 10, 2020, 6:45pm UTC](https://discourse.cmake.org/t/patch-source-with-instrumentation-without-altering-original-code/2338 "2020-12-10T18:45:06Z")

</div>

I want to use libtooling to generate instrumentattion code for debug builds. I will manage to run my generator from cmake, but i don’t really know how i could patch my Instrumentation into the source without altering the…

---

## [using find\_package between 2 externalProject\_add](https://discourse.cmake.org/t/using-find-package-between-2-externalproject-add/2285)

<div class="topic-metadata">

**Author:** [@grimgort](https://discourse.cmake.org/u/grimgort)\
**Replies:** 11\
**Last updated:** [December 10, 2020, 3:31pm UTC](https://discourse.cmake.org/t/using-find-package-between-2-externalproject-add/2285 "2020-12-10T15:31:53Z")

</div>

Hello, Good morning, I can’t find a solution to run a find\_package() between 2 externalProject\_add() during the “build time”. Indeed, Project2 needs Project1 both being compiled by externalProject. But since Project2 d…

---

## [print all fatal error of compilation to end of stdout](https://discourse.cmake.org/t/print-all-fatal-error-of-compilation-to-end-of-stdout/2320)

<div class="topic-metadata">

**Author:** [@grimgort](https://discourse.cmake.org/u/grimgort)\
**Replies:** 2\
**Last updated:** [December 10, 2020, 3:24pm UTC](https://discourse.cmake.org/t/print-all-fatal-error-of-compilation-to-end-of-stdout/2320 "2020-12-10T15:24:20Z")

</div>

Hello, I would like to have all fatal compilation errors at the end of the standard output or in a log file. Also, is the standard output also redirected to a cmake log file? If you don’t forget to rewrite it manually,…

---

## [how to build a .so lib on MacOS](https://discourse.cmake.org/t/how-to-build-a-so-lib-on-macos/2336)

<div class="topic-metadata">

**Author:** [@wangqi](https://discourse.cmake.org/u/wangqi)\
**Replies:** 2\
**Last updated:** [December 10, 2020, 9:36am UTC](https://discourse.cmake.org/t/how-to-build-a-so-lib-on-macos/2336 "2020-12-10T09:36:22Z")

</div>

Can I build a .so lib on MacOS? I have a project using openCV and have built a .dylib on my MacOS, and now I need to deploy my project on docker(Linux) and I hope I can build a .so on my MacOS and directly use it in Linu…

---

## [evaluating cmake](https://discourse.cmake.org/t/evaluating-cmake/2322)

<div class="topic-metadata">

**Author:** [@Massimiliano\_Cialdi](https://discourse.cmake.org/u/Massimiliano_Cialdi)\
**Replies:** 2\
**Last updated:** [December 9, 2020, 9:27pm UTC](https://discourse.cmake.org/t/evaluating-cmake/2322 "2020-12-09T21:27:27Z")

</div>

I am evaluating if cmake can help me in my projects. First of all I should make a premise about the constraints we have in the build processes. We build products based on microcontrollers running baremetal or RTOS (Fre…

---

## [Build for 32 and 64 bit](https://discourse.cmake.org/t/build-for-32-and-64-bit/2329)

<div class="topic-metadata">

**Author:** [@R030t1](https://discourse.cmake.org/u/R030t1)\
**Replies:** 3\
**Last updated:** [December 9, 2020, 7:32pm UTC](https://discourse.cmake.org/t/build-for-32-and-64-bit/2329 "2020-12-09T19:32:24Z")

</div>

Due to targeting certain features of Windows the 32 bit binaries must be generated even on a 64 bit system. What is the best way to do this? I’d like to have it happen with one build system invocation, but am unsure of w…

---

## [Unable build dll](https://discourse.cmake.org/t/unable-build-dll/2327)

<div class="topic-metadata">

**Author:** [@Andry](https://discourse.cmake.org/u/Andry)\
**Replies:** 1\
**Last updated:** [December 9, 2020, 5:00pm UTC](https://discourse.cmake.org/t/unable-build-dll/2327 "2020-12-09T17:00:29Z")

</div>

LINK : error LNK2001: unresolved external symbol \_DllMainCRTStartup cmake version 3.18.20081302-MSVC\_2 and cmake version 3.16.5 CMakeLists.txt cmake\_minimum\_required(VERSION 3.16) project(testttttt) include(Generat…

---

## [Subdirectory that is just header files](https://discourse.cmake.org/t/subdirectory-that-is-just-header-files/2316)

<div class="topic-metadata">

**Author:** [@scottaronbloom](https://discourse.cmake.org/u/scottaronbloom)\
**Replies:** 3\
**Last updated:** [December 9, 2020, 4:10pm UTC](https://discourse.cmake.org/t/subdirectory-that-is-just-header-files/2316 "2020-12-09T16:10:55Z")

</div>

I have a pain in the butt situation. I am stuck working with a very old makefile based make system (about 200 directories). Moving it to CMake is not a short term option. Building is “fine” but debugging is really horri…

---

## [New signing key for apt.kitware.com](https://discourse.cmake.org/t/new-signing-key-for-apt-kitware-com/2326)

<div class="topic-metadata">

**Author:** [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)\
**Replies:** 0\
**Last updated:** [December 9, 2020, 3:52pm UTC](https://discourse.cmake.org/t/new-signing-key-for-apt-kitware-com/2326 "2020-12-09T15:52:18Z")

</div>

All, The 2021 signing key for apt.kitware.com has been generated, and the 2019 key has been retired. The 2021 key will be used starting in January. As a reminder, we recommend installing the kitware-archive-keyring pac…

---

## [Simultaneous x86 and x86\_64 build](https://discourse.cmake.org/t/simultaneous-x86-and-x86-64-build/2313)

<div class="topic-metadata">

**Author:** [@mwezdeck](https://discourse.cmake.org/u/mwezdeck)\
**Replies:** 6\
**Last updated:** [December 9, 2020, 12:07am UTC](https://discourse.cmake.org/t/simultaneous-x86-and-x86-64-build/2313 "2020-12-09T00:07:28Z")

</div>

Hi, Thanks in advance for reply. Let’s consider such situation of compiling very complex project. cd \[project\] mkdir x86 cd x86 cmake … -GNinja -A x86 ninja cd \[project\] mkdir x86\_64 cd x86\_64 cmake .. -GNinja…

---

## [CMAKE Build in parallel Fail](https://discourse.cmake.org/t/cmake-build-in-parallel-fail/2299)

<div class="topic-metadata">

**Author:** [@arturoar3nas](https://discourse.cmake.org/u/arturoar3nas)\
**Replies:** 9\
**Last updated:** [December 8, 2020, 11:55pm UTC](https://discourse.cmake.org/t/cmake-build-in-parallel-fail/2299 "2020-12-08T23:55:41Z")

</div>

Hello, Always when I try to build some project with cmake --build \<some dir\> -j n this fail in most cases. How I can fix this? Thanks!

---

## [help passing passing empty parameter ("") indirectly to \`ExternalProject\_Add\`](https://discourse.cmake.org/t/help-passing-passing-empty-parameter-indirectly-to-externalproject-add/2307)

<div class="topic-metadata">

**Author:** [@daroxs95](https://discourse.cmake.org/u/daroxs95)\
**Replies:** 4\
**Last updated:** [December 7, 2020, 11:41pm UTC](https://discourse.cmake.org/t/help-passing-passing-empty-parameter-indirectly-to-externalproject-add/2307 "2020-12-07T23:41:42Z")

</div>

this code is not working currently(not deactivating the download step), if provided non empty string, it does treat it as the download command set(FRESH\_DOWNLOAD off CACHE BOOL "download a fresh copy of all dependencies…

---

## [Qt and cpprestsdk](https://discourse.cmake.org/t/qt-and-cpprestsdk/2310)

<div class="topic-metadata">

**Author:** [@zombieanfuehrer](https://discourse.cmake.org/u/zombieanfuehrer)\
**Replies:** 8\
**Last updated:** [December 7, 2020, 10:39pm UTC](https://discourse.cmake.org/t/qt-and-cpprestsdk/2310 "2020-12-07T22:39:27Z")

</div>

Good evening folks, i am quite a beginner and am just struggling through the correct configuration of CMakeLists.txt files. I have created a project based on my own file, Qt framework files and cpprestsdk (casablanca) …

---

## [How to achieve good dependencie granularity AND allowing source globing AND monkeypatching?](https://discourse.cmake.org/t/how-to-achieve-good-dependencie-granularity-and-allowing-source-globing-and-monkeypatching/2302)

<div class="topic-metadata">

**Author:** [@james\_brown](https://discourse.cmake.org/u/james_brown)\
**Replies:** 5\
**Last updated:** [December 7, 2020, 7:39pm UTC](https://discourse.cmake.org/t/how-to-achieve-good-dependencie-granularity-and-allowing-source-globing-and-monkeypatching/2302 "2020-12-07T19:39:16Z")

</div>

What I am doing I am using a CMake based build system where code is organized into libraries to allow monkeypatching and source globing. Basically, some directory are translated into libraries. Creating libraries rather…

---

## [execute\_proces() interaction between COMMAND\_ERROR\_IS\_FATAL and TIMEOUT](https://discourse.cmake.org/t/execute-proces-interaction-between-command-error-is-fatal-and-timeout/2303)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 5\
**Last updated:** [December 7, 2020, 4:57pm UTC](https://discourse.cmake.org/t/execute-proces-interaction-between-command-error-is-fatal-and-timeout/2303 "2020-12-07T16:57:15Z")

</div>

CMake 3.19 added a new COMMAND\_ERROR\_IS\_FATAL option to the execute\_process() command. The goal as originally stated in the issue was to be able to replace code like this: execute\_process(COMMAND foo RESULT\_VARIABLE \_re…

---

## [Get INSTALL\_INTERFACE in \`install(CODE)\`.](https://discourse.cmake.org/t/get-install-interface-in-install-code/2308)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 1\
**Last updated:** [December 7, 2020, 3:04pm UTC](https://discourse.cmake.org/t/get-install-interface-in-install-code/2308 "2020-12-07T15:04:07Z")

</div>

I think I have found a bug, or at the very least a vexing behavior. Here’s my minimal example: cmake\_minimum\_required(VERSION 3.16) project(example) add\_library(example INTERFACE) target\_compile\_definitions(example INT…

---

## [How to deal with code generators?](https://discourse.cmake.org/t/how-to-deal-with-code-generators/2301)

<div class="topic-metadata">

**Author:** [@Massimiliano\_Cialdi](https://discourse.cmake.org/u/Massimiliano_Cialdi)\
**Replies:** 1\
**Last updated:** [December 6, 2020, 6:35pm UTC](https://discourse.cmake.org/t/how-to-deal-with-code-generators/2301 "2020-12-06T18:35:59Z")

</div>

In the past I have dealt with code generators such as flex, bison, protobuf, etc… In an old project, using makefiles, it was the same make that wrote a header file containing the semantic version string, and a couple of…

---

## [CMake doesn't run code from CMakeLists.txt via add\_subdirectory](https://discourse.cmake.org/t/cmake-doesnt-run-code-from-cmakelists-txt-via-add-subdirectory/2304)

<div class="topic-metadata">

**Author:** [@kerim](https://discourse.cmake.org/u/kerim)\
**Replies:** 1\
**Last updated:** [December 6, 2020, 3:08am UTC](https://discourse.cmake.org/t/cmake-doesnt-run-code-from-cmakelists-txt-via-add-subdirectory/2304 "2020-12-06T03:08:09Z")

</div>

Hi, I have a project named Project and a subfolder KKK I write in KKK/CMakeLists.txt the command message("RUNNING KKK") but when I launch CMake for Project I can’t see this message RUNNING KKK P.S. in realworld I have…

---

## [Error when installing targets and exports in 3.19.1](https://discourse.cmake.org/t/error-when-installing-targets-and-exports-in-3-19-1/2245)

<div class="topic-metadata">

**Author:** [@vre](https://discourse.cmake.org/u/vre)\
**Replies:** 8\
**Last updated:** [December 5, 2020, 1:48pm UTC](https://discourse.cmake.org/t/error-when-installing-targets-and-exports-in-3-19-1/2245 "2020-12-05T13:48:44Z")

</div>

I’m using the following fragments to install targets and exports in a number of projects. install(TARGETS myproj EXPORT myproj ARCHIVE DESTINATION ${CMAKE\_INSTALL\_LIBDIR} COMPONENT development LIBRARY DESTINATION $…

---

## [Clarify note "export name that is the same as the package name" in cmake documetation](https://discourse.cmake.org/t/clarify-note-export-name-that-is-the-same-as-the-package-name-in-cmake-documetation/2280)

<div class="topic-metadata">

**Author:** [@yisseamake](https://discourse.cmake.org/u/yisseamake)\
**Replies:** 6\
**Last updated:** [December 4, 2020, 10:05pm UTC](https://discourse.cmake.org/t/clarify-note-export-name-that-is-the-same-as-the-package-name-in-cmake-documetation/2280 "2020-12-04T22:05:23Z")

</div>

cmake install man page: Note: The installed \<export-name\>.cmake file may come with additional per-configuration \<export-name\>-\*.cmake files to be loaded by globbing. Do not use an export name that is the same as the pa…

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

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