# Usage

**URL:** https://discourse.cmake.org/c/usage/12.md?page=96

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

**Page:** 97

---

## [Projects/Subprojects in cdash](https://discourse.cmake.org/t/projects-subprojects-in-cdash/222)

<div class="topic-metadata">

**Author:** [@David\_Dixon](https://discourse.cmake.org/u/David_Dixon)\
**Replies:** 7\
**Last updated:** [February 15, 2020, 10:43pm UTC](https://discourse.cmake.org/t/projects-subprojects-in-cdash/222 "2020-02-15T22:43:54Z")

</div>

I work on a project (call it super) that has several subprojects (call them sub1 and sub2) and I have a few issues (I tried to bold the the issues). Also, I had to remove several images because I am a new user… In CDash…

---

## [Source package vs binary installer; CPackArchive vs other generators](https://discourse.cmake.org/t/source-package-vs-binary-installer-cpackarchive-vs-other-generators/622)

<div class="topic-metadata">

**Author:** [@jwuttke](https://discourse.cmake.org/u/jwuttke)\
**Replies:** 1\
**Last updated:** [February 13, 2020, 12:25am UTC](https://discourse.cmake.org/t/source-package-vs-binary-installer-cpackarchive-vs-other-generators/622 "2020-02-13T00:25:29Z")

</div>

While actively working through the docs, things are slowly getting clearer to me … and new questions arise: Is CPackArchive the only generator for source packages? All other CPack generators generate installers? CPack…

---

## [custom targets not shown in my dependency graph](https://discourse.cmake.org/t/custom-targets-not-shown-in-my-dependency-graph/624)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 1\
**Last updated:** [February 12, 2020, 9:49pm UTC](https://discourse.cmake.org/t/custom-targets-not-shown-in-my-dependency-graph/624 "2020-02-12T21:49:21Z")

</div>

hello, All my custom targets are missing in the graphviz dependency graph. The build has an executable that is dependent on them! How can I generate a dependency graph for custom targets? add\_executable( dummyExe ${CM…

---

## [Targets package and source\_package - created only when configured for Make or Ninja?](https://discourse.cmake.org/t/targets-package-and-source-package-created-only-when-configured-for-make-or-ninja/620)

<div class="topic-metadata">

**Author:** [@jwuttke](https://discourse.cmake.org/u/jwuttke)\
**Replies:** 3\
**Last updated:** [February 12, 2020, 8:48pm UTC](https://discourse.cmake.org/t/targets-package-and-source-package-created-only-when-configured-for-make-or-ninja/620 "2020-02-12T20:48:27Z")

</div>

The CPack help page says: "Inclusion of the CPack module adds two new build targets, package and package\_source". Craig Scott’s book says: these targets are only created if the project is configured for a Makefile or Nin…

---

## [local install vs install for CPack; absolute vs relative path](https://discourse.cmake.org/t/local-install-vs-install-for-cpack-absolute-vs-relative-path/623)

<div class="topic-metadata">

**Author:** [@jwuttke](https://discourse.cmake.org/u/jwuttke)\
**Replies:** 1\
**Last updated:** [February 12, 2020, 5:40pm UTC](https://discourse.cmake.org/t/local-install-vs-install-for-cpack-absolute-vs-relative-path/623 "2020-02-12T17:40:41Z")

</div>

CPack installer generators (at least some of them) forbid absolute paths. Of course I can adjust for that - but how then ensure that make install still does the local installation to the right absolute location?

---

## [How to make FindOpenAL prefer OpenAL Soft on macOS](https://discourse.cmake.org/t/how-to-make-findopenal-prefer-openal-soft-on-macos/618)

<div class="topic-metadata">

**Author:** [@McSinyx](https://discourse.cmake.org/u/McSinyx)\
**Replies:** 1\
**Last updated:** [February 12, 2020, 1:55pm UTC](https://discourse.cmake.org/t/how-to-make-findopenal-prefer-openal-soft-on-macos/618 "2020-02-12T13:55:50Z")

</div>

With openal-soft installed from Homebrew, setting OPENALDIR=$(brew --prefix openal-soft) does not seem to have any effect. This is tested on Travis for Alure (see builds 133 to 137). This is originally opened as issue 2…

---

## [CTest Coverage Cmake Error](https://discourse.cmake.org/t/ctest-coverage-cmake-error/550)

<div class="topic-metadata">

**Author:** [@allen-barnett](https://discourse.cmake.org/u/allen-barnett)\
**Replies:** 8\
**Last updated:** [February 6, 2020, 6:49pm UTC](https://discourse.cmake.org/t/ctest-coverage-cmake-error/550 "2020-02-06T18:49:14Z")

</div>

I’m getting a CMake error from a CTest script calling ctest\_coverage( ... CAPTURE\_CMAKE\_ERROR xyz RETURN\_VALUE abc ) abc is 0 but xyz is 255 on return from the function. But I can’t figure what what’s going wrong. It’s…

---

## [How to use CMake to cross-compile for Linux target using Wind River cross-compiler?](https://discourse.cmake.org/t/how-to-use-cmake-to-cross-compile-for-linux-target-using-wind-river-cross-compiler/580)

<div class="topic-metadata">

**Author:** [@DavidA](https://discourse.cmake.org/u/DavidA)\
**Replies:** 2\
**Last updated:** [February 5, 2020, 3:18pm UTC](https://discourse.cmake.org/t/how-to-use-cmake-to-cross-compile-for-linux-target-using-wind-river-cross-compiler/580 "2020-02-05T15:18:24Z")

</div>

We develop an application that runs on Intel processor under Linux using a Wind River toolset. The application is built on Windows using an Eclipse-based IDE, CDT and gnu make, using the Wind River cross-compiler. I wan…

---

## [cmake\_configuration\_types and 3rd party libraries](https://discourse.cmake.org/t/cmake-configuration-types-and-3rd-party-libraries/570)

<div class="topic-metadata">

**Author:** [@sghosh](https://discourse.cmake.org/u/sghosh)\
**Replies:** 1\
**Last updated:** [February 5, 2020, 10:43am UTC](https://discourse.cmake.org/t/cmake-configuration-types-and-3rd-party-libraries/570 "2020-02-05T10:43:22Z")

</div>

I am trying to create a custom cmake\_configuration\_type using the method as described here The issue I am facing is the correct linking of 3rd party libraries. E.g., when I create a custom configuration the executable is…

---

## [CTest leaves a file descriptor open before executing tests](https://discourse.cmake.org/t/ctest-leaves-a-file-descriptor-open-before-executing-tests/578)

<div class="topic-metadata">

**Author:** [@lfyuomr-gylo](https://discourse.cmake.org/u/lfyuomr-gylo)\
**Replies:** 0\
**Last updated:** [February 4, 2020, 6:26pm UTC](https://discourse.cmake.org/t/ctest-leaves-a-file-descriptor-open-before-executing-tests/578 "2020-02-04T18:26:56Z")

</div>

I have a problem with observing an extra file descriptor during my tests execution via ctest. I have described my issue here on StackOverflow: I have two questions (copied from my StackOverflow issue): Is it a bug…

---

## [Executing a complex command in CTest](https://discourse.cmake.org/t/executing-a-complex-command-in-ctest/541)

<div class="topic-metadata">

**Author:** [@Aurelien\_Coussat](https://discourse.cmake.org/u/Aurelien_Coussat)\
**Replies:** 2\
**Last updated:** [January 31, 2020, 1:30pm UTC](https://discourse.cmake.org/t/executing-a-complex-command-in-ctest/541 "2020-01-31T13:30:05Z")

</div>

Hi! I am trying to add a test to my project using add\_test. It works well when I provide simple commands. I am now trying to add a more complex test which should succeed when different commands succeed, i.e. I would …

---

## [Cmake-gui seems corrupted. Shows incomplete dialog box without any buttons](https://discourse.cmake.org/t/cmake-gui-seems-corrupted-shows-incomplete-dialog-box-without-any-buttons/562)

<div class="topic-metadata">

**Author:** [@Raghavendra\_R](https://discourse.cmake.org/u/Raghavendra_R)\
**Replies:** 1\
**Last updated:** [January 31, 2020, 8:58am UTC](https://discourse.cmake.org/t/cmake-gui-seems-corrupted-shows-incomplete-dialog-box-without-any-buttons/562 "2020-01-31T08:58:15Z")

</div>

Recently i updated to the new version 3.16.3 and since then i dont see the complete dialog box. I even reverted to little older version(3.15.5) there too, i see the same problem. Please refer the snapshot attached for t…

---

## [Cannot compile in AIX using c-compiler](https://discourse.cmake.org/t/cannot-compile-in-aix-using-c-compiler/549)

<div class="topic-metadata">

**Author:** [@zeigercap1](https://discourse.cmake.org/u/zeigercap1)\
**Replies:** 15\
**Last updated:** [January 29, 2020, 10:19pm UTC](https://discourse.cmake.org/t/cannot-compile-in-aix-using-c-compiler/549 "2020-01-29T22:19:36Z")

</div>

Trying to build executables from c-code in AIX (IBM version of Unix) using CMake. CMake downloaded and installed without incident. However, when giving it a test c-code file to build, it finds the c-compiler correctly, b…

---

## [CMake -\> Eclipse CDT4: how to prevent Eclipse from indexing files not in project?](https://discourse.cmake.org/t/cmake-eclipse-cdt4-how-to-prevent-eclipse-from-indexing-files-not-in-project/521)

<div class="topic-metadata">

**Author:** [@Rich\_von\_Lehe](https://discourse.cmake.org/u/Rich_von_Lehe)\
**Replies:** 3\
**Last updated:** [January 29, 2020, 3:30pm UTC](https://discourse.cmake.org/t/cmake-eclipse-cdt4-how-to-prevent-eclipse-from-indexing-files-not-in-project/521 "2020-01-29T15:30:16Z")

</div>

I’m not sure if this is just a shortcoming of Eclipse or not. I have a large source tree and also a CMake project that uses a small fraction of the source files in that tree. When I generate for Eclipse CDT4 and import…

---

## [How to rebuild a specific subdirectory?](https://discourse.cmake.org/t/how-to-rebuild-a-specific-subdirectory/547)

<div class="topic-metadata">

**Author:** [@DavidA](https://discourse.cmake.org/u/DavidA)\
**Replies:** 3\
**Last updated:** [January 29, 2020, 10:04am UTC](https://discourse.cmake.org/t/how-to-rebuild-a-specific-subdirectory/547 "2020-01-29T10:04:40Z")

</div>

Hi, I have a CMakeLists.txt file that builds an executable and includes add\_subdirectory() calls to build a series of dynamic libraries - one per subdirectory. This runs on Linux and uses the Ninja generator. With this…

---

## [Update command failed](https://discourse.cmake.org/t/update-command-failed/434)

<div class="topic-metadata">

**Author:** [@David\_Dixon](https://discourse.cmake.org/u/David_Dixon)\
**Replies:** 8\
**Last updated:** [January 26, 2020, 4:56pm UTC](https://discourse.cmake.org/t/update-command-failed/434 "2020-01-26T16:56:05Z")

</div>

Does anyone know how to debug update command failures? When I run my ctest script by hand, the update step succeeds. When run through CI it fails. Update command failed: “git” “fetch” Where can I find information regar…

---

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

---

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

---

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

---

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

---

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

---

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

---

## [File API and exports](https://discourse.cmake.org/t/file-api-and-exports/411)

<div class="topic-metadata">

**Author:** [@Kerstin\_Keller](https://discourse.cmake.org/u/Kerstin_Keller)\
**Replies:** 2\
**Last updated:** [December 19, 2019, 12:23pm UTC](https://discourse.cmake.org/t/file-api-and-exports/411 "2019-12-19T12:23:39Z")

</div>

Hi, I know the file API’s purpose is intended mainly for IDE’s. However I wonder if CMake also exposes the install targets via the file API? Basically I need all information about targets which get exported (and their i…

---

## [Library's CMake generates DLL. Application's CMake wants LIB](https://discourse.cmake.org/t/librarys-cmake-generates-dll-applications-cmake-wants-lib/408)

<div class="topic-metadata">

**Author:** [@jwuttke](https://discourse.cmake.org/u/jwuttke)\
**Replies:** 6\
**Last updated:** [December 19, 2019, 1:01am UTC](https://discourse.cmake.org/t/librarys-cmake-generates-dll-applications-cmake-wants-lib/408 "2019-12-19T01:01:14Z")

</div>

My library has minimal, straightforward CMake code with the pertinent lines add\_library(MyLib \<sources\>) install( TARGETS MyLib LIBRARY DESTINATION ${destination}/lib RUNTIME DESTINATION ${destination}/lib …

---

## [the amount of project() statements](https://discourse.cmake.org/t/the-amount-of-project-statements/406)

<div class="topic-metadata">

**Author:** [@Lieven](https://discourse.cmake.org/u/Lieven)\
**Replies:** 1\
**Last updated:** [December 18, 2019, 3:35pm UTC](https://discourse.cmake.org/t/the-amount-of-project-statements/406 "2019-12-18T15:35:49Z")

</div>

Consider the following situation : A code base consisting out of: many libraries many applications/executables Assume organized like this rootdir |—executables |—libraries Where the executables contains a sub di…

---

## [find\_package\_handle\_standard\_args terminates though not REQUIRED](https://discourse.cmake.org/t/find-package-handle-standard-args-terminates-though-not-required/382)

<div class="topic-metadata">

**Author:** [@jwuttke](https://discourse.cmake.org/u/jwuttke)\
**Replies:** 3\
**Last updated:** [December 14, 2019, 5:35pm UTC](https://discourse.cmake.org/t/find-package-handle-standard-args-terminates-though-not-required/382 "2019-12-14T17:35:48Z")

</div>

Searching for library “Cerf” # FindCerf.cmake: ... find\_path(Cerf\_INCLUDE\_DIR cerf.h) find\_library(Cerf\_LIBRARIES NAMES cerf) include(FindPackageHandleStandardArgs) find\_package\_handle\_standard\_args(Cerf DEFAULT\_MSG Cer…

---

## [Getting verbose message for cmake](https://discourse.cmake.org/t/getting-verbose-message-for-cmake/383)

<div class="topic-metadata">

**Author:** [@mahmoodn](https://discourse.cmake.org/u/mahmoodn)\
**Replies:** 1\
**Last updated:** [December 14, 2019, 4:54pm UTC](https://discourse.cmake.org/t/getting-verbose-message-for-cmake/383 "2019-12-14T16:54:37Z")

</div>

For PyTorch, I get this error -- Could NOT find NCCL (missing: NCCL\_INCLUDE\_DIR NCCL\_LIBRARY) CMake Warning at third\_party/gloo/cmake/Dependencies.cmake:96 (message): Not compiling with NCCL support. Suppress this wa…

[Previous page](https://discourse.cmake.org/c/usage/12.md?page=95)

[Next page](https://discourse.cmake.org/c/usage/12.md?page=97)
