# Latest

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

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

**Page:** 196

---

## [Behaviour of source\_group(TREE ...) with no FILES specified](https://discourse.cmake.org/t/behaviour-of-source-group-tree-with-no-files-specified/1357)

<div class="topic-metadata">

**Author:** [@Andrew](https://discourse.cmake.org/u/Andrew)\
**Replies:** 2\
**Last updated:** [June 9, 2020, 10:40pm UTC](https://discourse.cmake.org/t/behaviour-of-source-group-tree-with-no-files-specified/1357 "2020-06-09T22:40:32Z")

</div>

Generating for Xcode using CMake 3.15.3: Why does: source\_group(TREE ${CMAKE\_CURRENT\_SOURCE\_DIR}/${my\_source\_subdir} FILES ${my\_files}) do something sensible (all source files in a nested structure), while source\_gro…

---

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

---

## [Linking towards an older OS version (Mac)](https://discourse.cmake.org/t/linking-towards-an-older-os-version-mac/1351)

<div class="topic-metadata">

**Author:** [@Gonzalo\_Garramuno](https://discourse.cmake.org/u/Gonzalo_Garramuno)\
**Replies:** 2\
**Last updated:** [June 9, 2020, 8:20pm UTC](https://discourse.cmake.org/t/linking-towards-an-older-os-version-mac/1351 "2020-06-09T20:20:38Z")

</div>

I have my executable working on MacOSX Catalina. However, since I am not using any of the features of it, I would like to target the earliest version os the OS I can, like, say, Mojave. I would like to know what flags/…

---

## [PRIVATE target\_link\_libraries on header only imported library results in linkage requirement](https://discourse.cmake.org/t/private-target-link-libraries-on-header-only-imported-library-results-in-linkage-requirement/1350)

<div class="topic-metadata">

**Author:** [@Kerstin\_Keller](https://discourse.cmake.org/u/Kerstin_Keller)\
**Replies:** 3\
**Last updated:** [June 9, 2020, 2:56pm UTC](https://discourse.cmake.org/t/private-target-link-libraries-on-header-only-imported-library-results-in-linkage-requirement/1350 "2020-06-09T14:56:40Z")

</div>

Let’s assume I have a library that links privately to an imported, header only library: FindAsio.cmake (unfortunately does not export itself) add\_library(asio::asio INTERFACE IMPORTED) set\_target\_properties(asio::asio …

---

## [Building cmake from source for Android](https://discourse.cmake.org/t/building-cmake-from-source-for-android/1341)

<div class="topic-metadata">

**Author:** [@Jacob\_Varghese](https://discourse.cmake.org/u/Jacob_Varghese)\
**Replies:** 2\
**Last updated:** [June 9, 2020, 5:23am UTC](https://discourse.cmake.org/t/building-cmake-from-source-for-android/1341 "2020-06-09T05:23:50Z")

</div>

Has anyone tried building cmake for Android? Any issues? I would like to run ctest from within an emulator.

---

## [CMake project review and suggestions (closed)](https://discourse.cmake.org/t/cmake-project-review-and-suggestions-closed/768)

<div class="topic-metadata">

**Author:** [@Artemis](https://discourse.cmake.org/u/Artemis)\
**Replies:** 34\
**Last updated:** [June 8, 2020, 2:10pm UTC](https://discourse.cmake.org/t/cmake-project-review-and-suggestions-closed/768 "2020-06-08T14:10:42Z")

</div>

I’m working on my first CMake project, a C library. I’ll ask for help and suggestions as I make progress (like an “art review”, but for CMake) I’ve read plenty of material on the subject (documentation included, of cou…

---

## [Avoid Macport dependencies on MacOS](https://discourse.cmake.org/t/avoid-macport-dependencies-on-macos/1335)

<div class="topic-metadata">

**Author:** [@JanWielemaker](https://discourse.cmake.org/u/JanWielemaker)\
**Replies:** 3\
**Last updated:** [June 8, 2020, 1:03pm UTC](https://discourse.cmake.org/t/avoid-macport-dependencies-on-macos/1335 "2020-06-08T13:03:51Z")

</div>

I’m trying to build a bundle for MacOS. To do so, I’ve built the project dependencies in some local directory setting the minimal deployment target to 10.12 and do the same for the project itself, hoping to end up with…

---

## [General pattern for making libraries available to other projects?](https://discourse.cmake.org/t/general-pattern-for-making-libraries-available-to-other-projects/1264)

<div class="topic-metadata">

**Author:** [@thomthom](https://discourse.cmake.org/u/thomthom)\
**Replies:** 6\
**Last updated:** [June 8, 2020, 8:13am UTC](https://discourse.cmake.org/t/general-pattern-for-making-libraries-available-to-other-projects/1264 "2020-06-08T08:13:32Z")

</div>

So far my projects have been rather small and simple. Haven’t had much use of reusing parts nor have I shared my libraries. However, my projects have grown and there are some I’m considering making available for general…

---

## [Visual Studio - External Dependencies Empty?](https://discourse.cmake.org/t/visual-studio-external-dependencies-empty/1285)

<div class="topic-metadata">

**Author:** [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)\
**Replies:** 3\
**Last updated:** [June 5, 2020, 6:24pm UTC](https://discourse.cmake.org/t/visual-studio-external-dependencies-empty/1285 "2020-06-05T18:24:35Z")

</div>

I’m having serious issues related to my visual studio solutions cmake is generating. I’m unable to “Find All References” or it takes a ridiculously slow time. When I click on got to definition on files I know are be…

---

## [Copy (changed) scripts as part of build](https://discourse.cmake.org/t/copy-changed-scripts-as-part-of-build/1320)

<div class="topic-metadata">

**Author:** [@Andrew](https://discourse.cmake.org/u/Andrew)\
**Replies:** 3\
**Last updated:** [June 5, 2020, 1:30pm UTC](https://discourse.cmake.org/t/copy-changed-scripts-as-part-of-build/1320 "2020-06-05T13:30:21Z")

</div>

In my Make architecture, I had the following: Directory/ Makefile src bin (output goes here) \*\* my\_exe run/ \*\* run1.sh \*\* run2.sh \*\* run3.sh The run\*.sh scripts all run "…/bin/my\_exe ". my\_exe itself is a dummy …

---

## [CMake: can't find library header files](https://discourse.cmake.org/t/cmake-cant-find-library-header-files/1334)

<div class="topic-metadata">

**Author:** [@unbdd](https://discourse.cmake.org/u/unbdd)\
**Replies:** 2\
**Last updated:** [June 5, 2020, 7:37am UTC](https://discourse.cmake.org/t/cmake-cant-find-library-header-files/1334 "2020-06-05T07:37:36Z")

</div>

I have a CMake project with the following folder structure: my\_project ├── build ├── CMakeLists.txt ├── hello\_test │ ├── CMakeLists.txt │ └── main.cpp └── my\_libs └── hello\_lib ├── CMakeLists.txt …

---

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

---

## [undefind symbol in Swig python build](https://discourse.cmake.org/t/undefind-symbol-in-swig-python-build/1331)

<div class="topic-metadata">

**Author:** [@poseid](https://discourse.cmake.org/u/poseid)\
**Replies:** 0\
**Last updated:** [June 4, 2020, 8:28pm UTC](https://discourse.cmake.org/t/undefind-symbol-in-swig-python-build/1331 "2020-06-04T20:28:35Z")

</div>

Hello, I am trying to build an example swig module for Python3. The build works fine but the resulting module is not working. The symbol can not be found. CMakeLists.txt cmake\_minimum\_required(VERSION 3.12) project(s…

---

## [Is it safe to delete CMakeCache.txt before each incremental build?](https://discourse.cmake.org/t/is-it-safe-to-delete-cmakecache-txt-before-each-incremental-build/1279)

<div class="topic-metadata">

**Author:** [@KUGA2](https://discourse.cmake.org/u/KUGA2)\
**Replies:** 1\
**Last updated:** [May 28, 2020, 10:54am UTC](https://discourse.cmake.org/t/is-it-safe-to-delete-cmakecache-txt-before-each-incremental-build/1279 "2020-05-28T10:54:53Z")

</div>

My incremental CI builds frequently get: ##\[error\]CMake Error: Target xxx has dependency information when it shouldn't. ##\[error\]Your cache is probably stale. Please remove the entry xxx\_LIB\_DEPENDS from the cache. Is …

---

## [cmake does not follow symlinks on windows](https://discourse.cmake.org/t/cmake-does-not-follow-symlinks-on-windows/1322)

<div class="topic-metadata">

**Author:** [@Stephan268](https://discourse.cmake.org/u/Stephan268)\
**Replies:** 9\
**Last updated:** [June 4, 2020, 5:20pm UTC](https://discourse.cmake.org/t/cmake-does-not-follow-symlinks-on-windows/1322 "2020-06-04T17:20:33Z")

</div>

get\_filename\_component(... REALPATH) and file (INSTALL ... DESTINATION ... USE\_SOURCE\_PERMISSIONS FOLLOW\_SYMLINK\_CHAIN) do not process symbolic links on windows. Is this a known problem (cmake 3.17.2)?

---

## [add\_custom\_command converting my absolute executable path to relative?](https://discourse.cmake.org/t/add-custom-command-converting-my-absolute-executable-path-to-relative/1326)

<div class="topic-metadata">

**Author:** [@Paul\_Belanger](https://discourse.cmake.org/u/Paul_Belanger)\
**Replies:** 5\
**Last updated:** [June 4, 2020, 4:46pm UTC](https://discourse.cmake.org/t/add-custom-command-converting-my-absolute-executable-path-to-relative/1326 "2020-06-04T16:46:13Z")

</div>

As part of the configuration stage of my project, I create a small executable program somewhere in the CMAKE\_BINARY\_DIR tree. I’m then trying to use that program as part of an ‘add\_custom\_command’ call to generate some s…

---

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

---

## [Macro unrecognized when compiling assembly code](https://discourse.cmake.org/t/macro-unrecognized-when-compiling-assembly-code/472)

<div class="topic-metadata">

**Author:** [@skulkarni](https://discourse.cmake.org/u/skulkarni)\
**Replies:** 5\
**Last updated:** [June 4, 2020, 12:54pm UTC](https://discourse.cmake.org/t/macro-unrecognized-when-compiling-assembly-code/472 "2020-06-04T12:54:49Z")

</div>

Hi, When compiling assembly code the macro is not recognized and throwing up error. \[ 85%\] Building ASM object BLE/nRF52/modules/CMakeFiles/MODULES.dir/nrfx/mdk/gcc\_startup\_nrf52.S.obj D:XXXX\\gcc\_7\_2\_1\\tools\\bin\\arm-n…

---

## [file GET\_RUNTIME\_DEPENDENCIES picks up incorrect shared objects](https://discourse.cmake.org/t/file-get-runtime-dependencies-picks-up-incorrect-shared-objects/1314)

<div class="topic-metadata">

**Author:** [@Stephan268](https://discourse.cmake.org/u/Stephan268)\
**Replies:** 10\
**Last updated:** [June 4, 2020, 1:06am UTC](https://discourse.cmake.org/t/file-get-runtime-dependencies-picks-up-incorrect-shared-objects/1314 "2020-06-04T01:06:15Z")

</div>

file (GET\_RUNTIME\_DEPENDENCIES ) returns incorrect dependencies to /usr/lib instead of /usr/lib64 on Linux. Examples are libstdc++.so, libX11.so The cmake documentation states that libraries are searched on paths retur…

---

## [Overriding CMAKE\_CXX\_COMPILER with VS2017 on Windows 10](https://discourse.cmake.org/t/overriding-cmake-cxx-compiler-with-vs2017-on-windows-10/1311)

<div class="topic-metadata">

**Author:** [@dr-traktor](https://discourse.cmake.org/u/dr-traktor)\
**Replies:** 1\
**Last updated:** [June 3, 2020, 6:55pm UTC](https://discourse.cmake.org/t/overriding-cmake-cxx-compiler-with-vs2017-on-windows-10/1311 "2020-06-03T18:55:14Z")

</div>

Is there a way to specify a custom compiler on Windows 10 using Visual Studio 2017, and not use the one inside the VS2017 installation? Below are my attempts to do so. Using CMake 3.17.3 on Windows 10 and Visual Stud…

---

## [Intended way to interface with external targets(?)](https://discourse.cmake.org/t/intended-way-to-interface-with-external-targets/1099)

<div class="topic-metadata">

**Author:** [@UebelAndre](https://discourse.cmake.org/u/UebelAndre)\
**Replies:** 1\
**Last updated:** [June 3, 2020, 3:11pm UTC](https://discourse.cmake.org/t/intended-way-to-interface-with-external-targets/1099 "2020-06-03T15:11:35Z")

</div>

I have a project with a similar structure ├── external │ ├── ext │ ├── glew │ └── opencv └── src And I’ve never felt like I correctly integrate CMake projects from my external directory with my source. I usually …

---

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

---

## [CMake promotes Fortran reals to 8 bytes](https://discourse.cmake.org/t/cmake-promotes-fortran-reals-to-8-bytes/1302)

<div class="topic-metadata">

**Author:** [@RedKnight7](https://discourse.cmake.org/u/RedKnight7)\
**Replies:** 4\
**Last updated:** [June 2, 2020, 5:26pm UTC](https://discourse.cmake.org/t/cmake-promotes-fortran-reals-to-8-bytes/1302 "2020-06-02T17:26:13Z")

</div>

We are using gfortran to build our code. When we build with our legacy configure system, default reals are 4 bytes with 24 digits of precision. When we build with cmake 3.16.5 , default reals are 8-bytes with 53 digits …

---

## [CMake Pre-Build command](https://discourse.cmake.org/t/cmake-pre-build-command/1083)

<div class="topic-metadata">

**Author:** [@developer](https://discourse.cmake.org/u/developer)\
**Replies:** 17\
**Last updated:** [June 2, 2020, 11:44am UTC](https://discourse.cmake.org/t/cmake-pre-build-command/1083 "2020-06-02T11:44:33Z")

</div>

I am trying to have a formatting tool (AStyle) run before building a given target. There is the add\_custom\_command that can be associated with a target and specified as PRE\_BUILD. Unfortunately, this doesn’t work with M…

---

## [Build failure with Ninja Multi-Config](https://discourse.cmake.org/t/build-failure-with-ninja-multi-config/1290)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 23\
**Last updated:** [June 1, 2020, 2:41pm UTC](https://discourse.cmake.org/t/build-failure-with-ninja-multi-config/1290 "2020-06-01T14:41:49Z")

</div>

Hi all, I just tried testing out Ninja Multi-Config for the first time on Windows. My project has worked with both the Ninja and Visual Studio 19 generators before without issue. I try running in a developer command pro…

---

## [CMake 3.16.8 available for download](https://discourse.cmake.org/t/cmake-3-16-8-available-for-download/1300)

<div class="topic-metadata">

**Author:** [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)\
**Replies:** 0\
**Last updated:** [June 1, 2020, 1:24pm UTC](https://discourse.cmake.org/t/cmake-3-16-8-available-for-download/1300 "2020-06-01T13:24:24Z")

</div>

We are pleased to announce that CMake 3.16.8 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! Changes made since 3.16.7: Bra…

---

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

---

## [Generator for Eclipse CDT4 Unix Makefiles - Error](https://discourse.cmake.org/t/generator-for-eclipse-cdt4-unix-makefiles-error/966)

<div class="topic-metadata">

**Author:** [@Garry\_Anderson](https://discourse.cmake.org/u/Garry_Anderson)\
**Replies:** 9\
**Last updated:** [May 29, 2020, 10:26pm UTC](https://discourse.cmake.org/t/generator-for-eclipse-cdt4-unix-makefiles-error/966 "2020-05-29T22:26:37Z")

</div>

CMake Commuinity & Guru Support Group: I am using command line for cmake -G “Eclipse CDT4 - Unix Makefiles” to generate makefiles (from CMake tree) to be imported into Eclipse environment, but it looks like your Cmake G…

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

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