# Latest

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

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

**Page:** 207

---

## [C Preprocessor Dependency Scanning for Custom Languages](https://discourse.cmake.org/t/c-preprocessor-dependency-scanning-for-custom-languages/519)

<div class="topic-metadata">

**Author:** [@sennis](https://discourse.cmake.org/u/sennis)\
**Replies:** 3\
**Last updated:** [January 20, 2020, 3:59pm UTC](https://discourse.cmake.org/t/c-preprocessor-dependency-scanning-for-custom-languages/519 "2020-01-20T15:59:29Z")

</div>

I have been working on a project that requires 2 different compilers. I have written the language files so that the secondary compiler files can be compiled via add\_executable, add\_library, etc. This secondary compiler u…

---

## [Simple project, want some tips on file watching, continuous building](https://discourse.cmake.org/t/simple-project-want-some-tips-on-file-watching-continuous-building/504)

<div class="topic-metadata">

**Author:** [@dlidstrom](https://discourse.cmake.org/u/dlidstrom)\
**Replies:** 2\
**Last updated:** [January 19, 2020, 11:00am UTC](https://discourse.cmake.org/t/simple-project-want-some-tips-on-file-watching-continuous-building/504 "2020-01-19T11:00:57Z")

</div>

I have a simple project that builds an executable. I need some tips on how what conventions to follow. For example, I follow the convention of creating a build/ directory in the root of my project, then in there I issue …

---

## [How to embed Info.plist in a simple Mac binary file](https://discourse.cmake.org/t/how-to-embed-info-plist-in-a-simple-mac-binary-file/512)

<div class="topic-metadata">

**Author:** [@DeepSymmetry](https://discourse.cmake.org/u/DeepSymmetry)\
**Replies:** 3\
**Last updated:** [January 16, 2020, 5:42pm UTC](https://discourse.cmake.org/t/how-to-embed-info-plist-in-a-simple-mac-binary-file/512 "2020-01-16T17:42:15Z")

</div>

Greetings! For some time I have been happily using CMake to build Unix and Windows executables for my Carabiner project. This has worked great until macOS Catalina. In order to let people run this command-line tool witho…

---

## [Tutorial Step 5 does not work as presented](https://discourse.cmake.org/t/tutorial-step-5-does-not-work-as-presented/507)

<div class="topic-metadata">

**Author:** [@mrichter](https://discourse.cmake.org/u/mrichter)\
**Replies:** 7\
**Last updated:** [January 16, 2020, 1:11am UTC](https://discourse.cmake.org/t/tutorial-step-5-does-not-work-as-presented/507 "2020-01-16T01:11:50Z")

</div>

I’m really new to CMake, and I’ve been following the tutorial at https://cmake.org/cmake/help/latest/guide/tutorial/index.html#adding-system-introspection-step-5. The instructions for running step 5 do not work. For on…

---

## [Re-export private compile definitions as interface definitions (cmake 3.12)](https://discourse.cmake.org/t/re-export-private-compile-definitions-as-interface-definitions-cmake-3-12/498)

<div class="topic-metadata">

**Author:** [@reuk](https://discourse.cmake.org/u/reuk)\
**Replies:** 5\
**Last updated:** [January 15, 2020, 3:34pm UTC](https://discourse.cmake.org/t/re-export-private-compile-definitions-as-interface-definitions-cmake-3-12/498 "2020-01-15T15:34:08Z")

</div>

Given the following CMakeLists, I would expect the ‘genexdebug’ target to print out “foo bar” when run, but it only prints “foo”. Can anyone tell me why? What’s the best way to check for specific private definitions, and…

---

## [How to set option to a library but only when used by examples](https://discourse.cmake.org/t/how-to-set-option-to-a-library-but-only-when-used-by-examples/481)

<div class="topic-metadata">

**Author:** [@inetic](https://discourse.cmake.org/u/inetic)\
**Replies:** 2\
**Last updated:** [January 15, 2020, 9:35am UTC](https://discourse.cmake.org/t/how-to-set-option-to-a-library-but-only-when-used-by-examples/481 "2020-01-15T09:35:53Z")

</div>

I have a CMake project that is a library that also adds an example. Something like this /example/ -\> myexample.cpp -\> CMakeLists.txt /include/ -\> mylib.h /src/ -\> mylib.cpp /CMakeLists.txt My /CMakeLists.txt looks …

---

## [Compiling ARM64 ASM in Visual Studio with CMake](https://discourse.cmake.org/t/compiling-arm64-asm-in-visual-studio-with-cmake/500)

<div class="topic-metadata">

**Author:** [@mlindgren](https://discourse.cmake.org/u/mlindgren)\
**Replies:** 0\
**Last updated:** [January 14, 2020, 9:57pm UTC](https://discourse.cmake.org/t/compiling-arm64-asm-in-visual-studio-with-cmake/500 "2020-01-14T21:57:08Z")

</div>

Hi folks, I’m working on a cross-platform project which has some hand-written assembly to optimize performance for various CPU architectures. I’m converting this project to CMake from a proprietary build system, startin…

---

## [Get complete compile flags for a target](https://discourse.cmake.org/t/get-complete-compile-flags-for-a-target/485)

<div class="topic-metadata">

**Author:** [@DKB](https://discourse.cmake.org/u/DKB)\
**Replies:** 3\
**Last updated:** [January 14, 2020, 5:31pm UTC](https://discourse.cmake.org/t/get-complete-compile-flags-for-a-target/485 "2020-01-14T17:31:21Z")

</div>

I have a number of legacy Makefiles I am using through add\_custom\_command to produce libraries and executables as we slowly port to CMake. One issue I’m having is dealing with the CXX and CUDA target compile flags propag…

---

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

<div class="topic-metadata">

**Author:** [@rickenator](https://discourse.cmake.org/u/rickenator)\
**Replies:** 6\
**Last updated:** [January 14, 2020, 8:23am UTC](https://discourse.cmake.org/t/cmake-error-at-cmakelists-txt-333-error/484 "2020-01-14T08:23:59Z")

</div>

At the end of my rope. Trying to compile CMB-superbuild using their instructions at https://gitlab.kitware.com/cmb/cmb-superbuild/blob/master/README.md I’m having this error: CMake Error at CMakeLists.txt:333 (add\_sub…

---

## [Cannot get tiny test with an extrenal static library to run](https://discourse.cmake.org/t/cannot-get-tiny-test-with-an-extrenal-static-library-to-run/467)

<div class="topic-metadata">

**Author:** [@poldi](https://discourse.cmake.org/u/poldi)\
**Replies:** 6\
**Last updated:** [January 13, 2020, 11:46pm UTC](https://discourse.cmake.org/t/cannot-get-tiny-test-with-an-extrenal-static-library-to-run/467 "2020-01-13T23:46:52Z")

</div>

I’m trying to use an (Project) external static libary, but end up with undefined references regardless of what I do. My cmake file looks as follows cmake\_minimum\_required(VERSION 2.8.12) # first version with add\_compil…

---

## [CMakeLists.txt : Link options not working properly](https://discourse.cmake.org/t/cmakelists-txt-link-options-not-working-properly/489)

<div class="topic-metadata">

**Author:** [@sramnath](https://discourse.cmake.org/u/sramnath)\
**Replies:** 0\
**Last updated:** [January 13, 2020, 10:14pm UTC](https://discourse.cmake.org/t/cmakelists-txt-link-options-not-working-properly/489 "2020-01-13T22:14:28Z")

</div>

Hello, I am using the TI-CGT compiler and have been successful in getting all my source files to compile. However, I am unable to get the link command to successfully link, and I have crafted a manual link command whi…

---

## [How do I create multiple installation targets?](https://discourse.cmake.org/t/how-do-i-create-multiple-installation-targets/475)

<div class="topic-metadata">

**Author:** [@xfbs](https://discourse.cmake.org/u/xfbs)\
**Replies:** 3\
**Last updated:** [January 13, 2020, 1:27pm UTC](https://discourse.cmake.org/t/how-do-i-create-multiple-installation-targets/475 "2020-01-13T13:27:18Z")

</div>

Hey there. I am rewriting some build system for a larger project. Currently, we have multiple targets to install different components (install\_lib, install\_hdr, install\_data, etc). We need this because we generate differ…

---

## [cmake hangs in check\_symbol\_exists](https://discourse.cmake.org/t/cmake-hangs-in-check-symbol-exists/479)

<div class="topic-metadata">

**Author:** [@eriols](https://discourse.cmake.org/u/eriols)\
**Replies:** 2\
**Last updated:** [January 11, 2020, 6:25pm UTC](https://discourse.cmake.org/t/cmake-hangs-in-check-symbol-exists/479 "2020-01-11T18:25:01Z")

</div>

I have a build I’m moving from one windows machine to another, one running Windows 10, another Windows Server 2012. The CMAKE\_HOST\_SYSTEM\_PROCESSOR is AMD64 for both. All works on the Windows 10 and I have other builds…

---

## [Accessing "install" arguments from cpack External generator](https://discourse.cmake.org/t/accessing-install-arguments-from-cpack-external-generator/469)

<div class="topic-metadata">

**Author:** [@Sebastian.Setzer](https://discourse.cmake.org/u/Sebastian.Setzer)\
**Replies:** 1\
**Last updated:** [January 9, 2020, 12:34pm UTC](https://discourse.cmake.org/t/accessing-install-arguments-from-cpack-external-generator/469 "2020-01-09T12:34:00Z")

</div>

Dear list, In the CPACK\_EXTERNAL\_PACKAGE\_SCRIPT, how can you query the arguments passed to the “install” command? For example, for every file in the “staging” directory, how can you query which PERMISSIONS have been pa…

---

## [Qt5 component library not copied to CMAKE\_RUNTIME\_OUTPUT\_DIRECTORY](https://discourse.cmake.org/t/qt5-component-library-not-copied-to-cmake-runtime-output-directory/461)

<div class="topic-metadata">

**Author:** [@jwuttke](https://discourse.cmake.org/u/jwuttke)\
**Replies:** 8\
**Last updated:** [January 8, 2020, 11:33am UTC](https://discourse.cmake.org/t/qt5-component-library-not-copied-to-cmake-runtime-output-directory/461 "2020-01-08T11:33:46Z")

</div>

Under Windows, CMake sees the following: set(CMAKE\_RUNTIME\_OUTPUT\_DIRECTORY ${PROJECT\_BINARY\_DIR}/bin/$\<CONFIG\>) find\_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets Network Concurrent) target\_link\_libraries(mylib …

---

## [How to print location of Qt5 component library?](https://discourse.cmake.org/t/how-to-print-location-of-qt5-component-library/462)

<div class="topic-metadata">

**Author:** [@jwuttke](https://discourse.cmake.org/u/jwuttke)\
**Replies:** 7\
**Last updated:** [January 7, 2020, 6:47pm UTC](https://discourse.cmake.org/t/how-to-print-location-of-qt5-component-library/462 "2020-01-07T18:47:46Z")

</div>

CMake code find\_package(HDF5 MODULE REQUIRED COMPONENTS CXX) message(STATUS "hdf5: VERSION=${HDF5\_VERSION}, LIB=${HDF5\_LIBRARIES}) results in informative output like -- hdf5: VERSION=1.10.4, LIB=/usr/lib/x86\_64-linux-…

---

## [Set group when installing files](https://discourse.cmake.org/t/set-group-when-installing-files/464)

<div class="topic-metadata">

**Author:** [@David\_Dixon](https://discourse.cmake.org/u/David_Dixon)\
**Replies:** 2\
**Last updated:** [January 7, 2020, 6:38pm UTC](https://discourse.cmake.org/t/set-group-when-installing-files/464 "2020-01-07T18:38:33Z")

</div>

Is it possible to set the group for an install when using the CMake installation support?

---

## [Generated libraries, not sources.](https://discourse.cmake.org/t/generated-libraries-not-sources/458)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 2\
**Last updated:** [January 7, 2020, 4:57pm UTC](https://discourse.cmake.org/t/generated-libraries-not-sources/458 "2020-01-07T16:57:06Z")

</div>

We are trying to move our build system from GNU Make to CMake and have run into issues defining an unconventional part of our build. This pattern repeats itself multiple places, so it would be useful to write a function …

---

## [How to limit the scope of compiler flags only to a (my) local library?](https://discourse.cmake.org/t/how-to-limit-the-scope-of-compiler-flags-only-to-a-my-local-library/457)

<div class="topic-metadata">

**Author:** [@discovery](https://discourse.cmake.org/u/discovery)\
**Replies:** 7\
**Last updated:** [January 7, 2020, 3:22pm UTC](https://discourse.cmake.org/t/how-to-limit-the-scope-of-compiler-flags-only-to-a-my-local-library/457 "2020-01-07T15:22:11Z")

</div>

1 I am trying the example below : add\_library( mylib src/my\_code.cpp) target\_include\_directories(mylib PUBLIC include ${catkin\_INCLUDE\_DIRS} ${thirdPartyLib\_INCLUDE\_DIRS}) add\_dependencies( …

---

## [How to use OpenACC\_ACCEL\_TARGET](https://discourse.cmake.org/t/how-to-use-openacc-accel-target/454)

<div class="topic-metadata">

**Author:** [@paskino](https://discourse.cmake.org/u/paskino)\
**Replies:** 6\
**Last updated:** [January 7, 2020, 3:07pm UTC](https://discourse.cmake.org/t/how-to-use-openacc-accel-target/454 "2020-01-07T15:07:05Z")

</div>

Hi there, I’m using OpenACC on a simple example. If I understand well the FindOpenACC machinery one should be able to pass to CMake the target architecture with the OpenACC\_ACCEL\_TARGET. I issue the following command c…

---

## [What is the intended use case of the install command line option?](https://discourse.cmake.org/t/what-is-the-intended-use-case-of-the-install-command-line-option/452)

<div class="topic-metadata">

**Author:** [@CrustyAuklet](https://discourse.cmake.org/u/CrustyAuklet)\
**Replies:** 5\
**Last updated:** [January 7, 2020, 12:07am UTC](https://discourse.cmake.org/t/what-is-the-intended-use-case-of-the-install-command-line-option/452 "2020-01-07T00:07:10Z")

</div>

What is the intended use case of the cmake --install command line option (or the older install target)? I am wondering because it seems extremely cumbersome and hard to customize compared to CPack. The documentation sta…

---

## [is not a full path to an existing compiler tool](https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436)

<div class="topic-metadata">

**Author:** [@skulkarni](https://discourse.cmake.org/u/skulkarni)\
**Replies:** 7\
**Last updated:** [January 3, 2020, 6:27am UTC](https://discourse.cmake.org/t/is-not-a-full-path-to-an-existing-compiler-tool/436 "2020-01-03T06:27:16Z")

</div>

Hi I am new to Cmake. I have installed Cmake tool and downloaded gcc-arm-none-eabi. Below settings I have done in my cmake file set(ARM\_NONE\_EABI\_TOOLCHAIN\_PATH “C:/Users/XXXXX/binaries/gcc-arm-none-eabi/bin”) Also I…

---

## [Escaping semicolons in CMAKE\_CONFIGURE\_DEPENDS?](https://discourse.cmake.org/t/escaping-semicolons-in-cmake-configure-depends/447)

<div class="topic-metadata">

**Author:** [@spinda](https://discourse.cmake.org/u/spinda)\
**Replies:** 6\
**Last updated:** [January 2, 2020, 10:26pm UTC](https://discourse.cmake.org/t/escaping-semicolons-in-cmake-configure-depends/447 "2020-01-02T22:26:49Z")

</div>

The documentation for CMAKE\_CONFIGURE\_DEPENDS states: Specify files as a semicolon-separated list of paths. Relative paths are interpreted as relative to the current source directory. What should I do when the path i…

---

## [Linkage of libcublasLt.so from CUDA\_TOOLKIT\_ROOT\_DIR/lib64](https://discourse.cmake.org/t/linkage-of-libcublaslt-so-from-cuda-toolkit-root-dir-lib64/438)

<div class="topic-metadata">

**Author:** [@cponder](https://discourse.cmake.org/u/cponder)\
**Replies:** 7\
**Last updated:** [December 31, 2019, 10:11pm UTC](https://discourse.cmake.org/t/linkage-of-libcublaslt-so-from-cuda-toolkit-root-dir-lib64/438 "2019-12-31T22:11:22Z")

</div>

I’m building a library that depends on CUDA & cuBLAS. A peculiarity I’m seeing is that the paths are resolved for the CUDA & cuBLAS libraries --\> ldd libCUDA-SGEMM.so linux-vdso.so.1 (0x00007ffda4173000) libcuda.s…

---

## [Build explicit target with ExternalProject](https://discourse.cmake.org/t/build-explicit-target-with-externalproject/442)

<div class="topic-metadata">

**Author:** [@MBZ](https://discourse.cmake.org/u/MBZ)\
**Replies:** 3\
**Last updated:** [December 30, 2019, 2:08pm UTC](https://discourse.cmake.org/t/build-explicit-target-with-externalproject/442 "2019-12-30T14:08:45Z")

</div>

How do I build specific target with ExternalProject ? scenario 1: my external project has few targets and I would like to build only on of them scenario 2: the targets in my external project has EXCLUDE\_FROM\_ALL so I m…

---

## [FetchContent\_Declare not recognized](https://discourse.cmake.org/t/fetchcontent-declare-not-recognized/443)

<div class="topic-metadata">

**Author:** [@adamvm](https://discourse.cmake.org/u/adamvm)\
**Replies:** 2\
**Last updated:** [December 30, 2019, 1:48pm UTC](https://discourse.cmake.org/t/fetchcontent-declare-not-recognized/443 "2019-12-30T13:48:59Z")

</div>

Hello, I added gtest based on : https://kubasejdak.com/19-reasons-why-cmake-is-actually-awesome#4-cmake-allows-easy-external-project-download-and-incorporation so head of my CMakeLists.txt looks: cmake\_minimum\_required…

---

## [Directly invoke the linker](https://discourse.cmake.org/t/directly-invoke-the-linker/433)

<div class="topic-metadata">

**Author:** [@Acsor](https://discourse.cmake.org/u/Acsor)\
**Replies:** 7\
**Last updated:** [December 26, 2019, 5:35pm UTC](https://discourse.cmake.org/t/directly-invoke-the-linker/433 "2019-12-26T17:35:25Z")

</div>

I am setting up a cross-compiling C project targeting two micro architectures, inspired by ARM and MIPS. Without loss of generality, I’ll focus on the micro ARM architecture, where the compile instructions I was given ar…

---

## [Extending GENERATED property to additional compiler output files?](https://discourse.cmake.org/t/extending-generated-property-to-additional-compiler-output-files/432)

<div class="topic-metadata">

**Author:** [@ferdnyc](https://discourse.cmake.org/u/ferdnyc)\
**Replies:** 3\
**Last updated:** [December 23, 2019, 9:12pm UTC](https://discourse.cmake.org/t/extending-generated-property-to-additional-compiler-output-files/432 "2019-12-23T21:12:28Z")

</div>

In certain configurations, output files may be produced in the build directory that CMake is unaware of. For example, when compiling C++ code with the -ftest-coverage -fprofile-arcs flags to produce coverage data, each …

---

## [Using GitHub Actions to build C++ projects using CMake](https://discourse.cmake.org/t/using-github-actions-to-build-c-projects-using-cmake/426)

<div class="topic-metadata">

**Author:** [@cristianadam](https://discourse.cmake.org/u/cristianadam)\
**Replies:** 0\
**Last updated:** [December 22, 2019, 3:11pm UTC](https://discourse.cmake.org/t/using-github-actions-to-build-c-projects-using-cmake/426 "2019-12-22T15:11:05Z")

</div>

I’ve blogged about how to use GitHub Actions to build C++ projects using CMake: https://cristianadam.eu/20191222/using-github-actions-with-c-plus-plus-and-cmake/ The HelloWorld project that I’ve tested with is here: htt…

---

## [CMake 3.16.2 available for download](https://discourse.cmake.org/t/cmake-3-16-2-available-for-download/417)

<div class="topic-metadata">

**Author:** [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)\
**Replies:** 0\
**Last updated:** [December 19, 2019, 4:18pm UTC](https://discourse.cmake.org/t/cmake-3-16-2-available-for-download/417 "2019-12-19T16:18:22Z")

</div>

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

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

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