# \#tool:cmake

**URL:** https://discourse.cmake.org/tag/tool-cmake/44.md?match_all_tags=true&page=1&tags%5B%5D=tool%3Acmake

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

**Page:** 2

---

## [Brand, Spankin' New...Trying to Understand gpiod.h and riscv-64](https://discourse.cmake.org/t/brand-spankin-new-trying-to-understand-gpiod-h-and-riscv-64/10702)

<div class="topic-metadata">

**Author:** [@silver2row](https://discourse.cmake.org/u/silver2row)\
**Replies:** 1\
**Last updated:** [April 20, 2024, 9:45am UTC](https://discourse.cmake.org/t/brand-spankin-new-trying-to-understand-gpiod-h-and-riscv-64/10702 "2024-04-20T09:45:55Z")

</div>

Hello, I have a BeagleV-Ahead I am using to natively compile via cmake .. && make and then using libgpiod-dev libs. via #include \<gpiod.h\> to get things going. I am receiving this error after cmake and make commands. R…

---

## [PACKAGE\_INIT generates PACKAGE\_PREFIX\_DIR with the wrong directory](https://discourse.cmake.org/t/package-init-generates-package-prefix-dir-with-the-wrong-directory/10453)

<div class="topic-metadata">

**Author:** [@josiest](https://discourse.cmake.org/u/josiest)\
**Replies:** 17\
**Last updated:** [April 15, 2024, 11:21am UTC](https://discourse.cmake.org/t/package-init-generates-package-prefix-dir-with-the-wrong-directory/10453 "2024-04-15T11:21:38Z")

</div>

I have a very small library called pi-events, and I’m trying to install it locally to another project I have called sdl-sandbox, which lives in D:/projects/sdl-sandbox My pi-events-config.cmake.in file looks like this: …

---

## [Unexpected behavior of TARGET\_RUNTIME\_DLLS when mixing STATIC, SHARED, PUBLIC, PRIVATE libraries](https://discourse.cmake.org/t/unexpected-behavior-of-target-runtime-dlls-when-mixing-static-shared-public-private-libraries/10352)

<div class="topic-metadata">

**Author:** [@rkoning](https://discourse.cmake.org/u/rkoning)\
**Replies:** 2\
**Last updated:** [April 10, 2024, 10:05pm UTC](https://discourse.cmake.org/t/unexpected-behavior-of-target-runtime-dlls-when-mixing-static-shared-public-private-libraries/10352 "2024-04-10T22:05:42Z")

</div>

I’m running into some unexpected behavior when using the TARGET\_RUNTIME\_DLLS generator expression, and I’m wondering if this is something that I’m just not understand properly or if its an unhandled edge case that I shou…

---

## [Using clang-tidy with cross compilation](https://discourse.cmake.org/t/using-clang-tidy-with-cross-compilation/5435)

<div class="topic-metadata">

**Author:** [@AdamWRichardson](https://discourse.cmake.org/u/AdamWRichardson)\
**Replies:** 6\
**Last updated:** [March 15, 2024, 11:33pm UTC](https://discourse.cmake.org/t/using-clang-tidy-with-cross-compilation/5435 "2024-03-15T23:33:35Z")

</div>

This may be a really silly issue but I’m struggling to get clang-tidy working while cross compiling. I’m using the RSIC-V GCC toolchain to generate the binaries for a small embedded project I have and as part of the bui…

---

## [Selection of targets from a superbuild's sub-projects](https://discourse.cmake.org/t/selection-of-targets-from-a-superbuilds-sub-projects/10243)

<div class="topic-metadata">

**Author:** [@Chardrazle](https://discourse.cmake.org/u/Chardrazle)\
**Replies:** 12\
**Last updated:** [March 10, 2024, 10:49am UTC](https://discourse.cmake.org/t/selection-of-targets-from-a-superbuilds-sub-projects/10243 "2024-03-10T10:49:28Z")

</div>

Hi, TL;DR; Is there a way of selecting specific targets (at build time) from the sub-projects that are built as part of a superbuild? Consider the simple scenario where there is a superbuild that builds two sub-project…

---

## [Installed module library can't find imported headers \[Ubuntu 22.04 LTS, CMake 3.28.1, Ninja 1.11.1 and Clang 17.0.6\]](https://discourse.cmake.org/t/installed-module-library-cant-find-imported-headers-ubuntu-22-04-lts-cmake-3-28-1-ninja-1-11-1-and-clang-17-0-6/9819)

<div class="topic-metadata">

**Author:** [@josecruz](https://discourse.cmake.org/u/josecruz)\
**Replies:** 22\
**Last updated:** [February 25, 2024, 12:29pm UTC](https://discourse.cmake.org/t/installed-module-library-cant-find-imported-headers-ubuntu-22-04-lts-cmake-3-28-1-ninja-1-11-1-and-clang-17-0-6/9819 "2024-02-25T12:29:05Z")

</div>

Using Ubuntu 22.04 LTS, CMake 3.28.1, Ninja 1.11.1 and Clang 17.0.6, I’m trying to create a library using modules, supported under these conditions, as described at import-cmake-the-experiment-is-over. I managed to succ…

---

## [How to do cross platform build for Linux target on Windows build system without even WSL.](https://discourse.cmake.org/t/how-to-do-cross-platform-build-for-linux-target-on-windows-build-system-without-even-wsl/10096)

<div class="topic-metadata">

**Author:** [@siddmohsin](https://discourse.cmake.org/u/siddmohsin)\
**Replies:** 1\
**Last updated:** [February 15, 2024, 6:57pm UTC](https://discourse.cmake.org/t/how-to-do-cross-platform-build-for-linux-target-on-windows-build-system-without-even-wsl/10096 "2024-02-15T18:57:59Z")

</div>

I am doing some POC where in I need to build for linux target on Windows build system \*\*without \*\* even WSL. So what I want to do is below. Build for Linux target on windows build system Take the build executable and …

---

## [Buildbot and kwrobot in CI](https://discourse.cmake.org/t/buildbot-and-kwrobot-in-ci/9995)

<div class="topic-metadata">

**Author:** [@pkiran](https://discourse.cmake.org/u/pkiran)\
**Replies:** 3\
**Last updated:** [February 5, 2024, 9:23pm UTC](https://discourse.cmake.org/t/buildbot-and-kwrobot-in-ci/9995 "2024-02-05T21:23:29Z")

</div>

Hello, Not sure if this is the right place, but I would like to learn more about the CI setup used for CMake. Would love to learn more about kwrobot and buildbot, how they are used in the process and with CDash. Can I a…

---

## [How to share precompiled headers via an interface library](https://discourse.cmake.org/t/how-to-share-precompiled-headers-via-an-interface-library/9933)

<div class="topic-metadata">

**Author:** [@Kentzo](https://discourse.cmake.org/u/Kentzo)\
**Replies:** 7\
**Last updated:** [January 27, 2024, 9:04am UTC](https://discourse.cmake.org/t/how-to-share-precompiled-headers-via-an-interface-library/9933 "2024-01-27T09:04:13Z")

</div>

From target\_precompile\_headers: A notable exception to this is where an interface library is created to define a commonly used set of precompile headers in one place and then other targets link to that interface librar…

---

## [cmake error at message(FATAL\_ERROR "CMake step for ${contentName} failed: ${result}")](https://discourse.cmake.org/t/cmake-error-at-message-fatal-error-cmake-step-for-contentname-failed-result/9898)

<div class="topic-metadata">

**Author:** [@natourand](https://discourse.cmake.org/u/natourand)\
**Replies:** 2\
**Last updated:** [January 23, 2024, 10:53pm UTC](https://discourse.cmake.org/t/cmake-error-at-message-fatal-error-cmake-step-for-contentname-failed-result/9898 "2024-01-23T22:53:17Z")

</div>

hello, I was trying to run cmake on Visual Studio code to use the gtest . I have already downloaded the MinGW compiler on my Windows computer. I also downloaded the relevant extensions in vs code such as cmake and cma…

---

## [The timing for using \`target\_include\_directories\` and \`target\_link\_libraries\`](https://discourse.cmake.org/t/the-timing-for-using-target-include-directories-and-target-link-libraries/9711)

<div class="topic-metadata">

**Author:** [@Sea\_Sea](https://discourse.cmake.org/u/Sea_Sea)\
**Replies:** 7\
**Last updated:** [December 30, 2023, 1:24am UTC](https://discourse.cmake.org/t/the-timing-for-using-target-include-directories-and-target-link-libraries/9711 "2023-12-30T01:24:37Z")

</div>

According to this project #include errors detected I want to know the usage timing for target\_include\_directories and target\_link\_libraries situation 1: I build a third party lib.so or lib.dll And using it on my proj…

---

## [How to verify configuration of the an external CMake project?](https://discourse.cmake.org/t/how-to-verify-configuration-of-the-an-external-cmake-project/9731)

<div class="topic-metadata">

**Author:** [@Kentzo](https://discourse.cmake.org/u/Kentzo)\
**Replies:** 3\
**Last updated:** [December 29, 2023, 7:09pm UTC](https://discourse.cmake.org/t/how-to-verify-configuration-of-the-an-external-cmake-project/9731 "2023-12-29T19:09:55Z")

</div>

I’m using the ExternalProject module to set up a dependency sub-project. This sub-project does some find\_package-like detection and auto-configures itself accordingly. In the main project I want to verify that it found …

---

## [Creating CMake module repository: scope issues](https://discourse.cmake.org/t/creating-cmake-module-repository-scope-issues/9566)

<div class="topic-metadata">

**Author:** [@hesperaux](https://discourse.cmake.org/u/hesperaux)\
**Replies:** 10\
**Last updated:** [December 24, 2023, 9:20pm UTC](https://discourse.cmake.org/t/creating-cmake-module-repository-scope-issues/9566 "2023-12-24T21:20:52Z")

</div>

Hello, I am new here. I have been attempting to setup a git repository that will contain cmake modules. I have achieved bringing this into another project using the Fetch Content pattern presented by Craig Scott in his…

---

## [add\_library and target\_include\_directories](https://discourse.cmake.org/t/add-library-and-target-include-directories/9482)

<div class="topic-metadata">

**Author:** [@Sea\_Sea](https://discourse.cmake.org/u/Sea_Sea)\
**Replies:** 1\
**Last updated:** [November 22, 2023, 2:28pm UTC](https://discourse.cmake.org/t/add-library-and-target-include-directories/9482 "2023-11-22T14:28:29Z")

</div>

add\_library already use the ${CMAKE\_CURRENT\_SOURCE\_DIR}/include/rtc why does target\_include\_directories do it again?

---

## [CMAKE is unable to build RP-2040-HAT-FREERTS-C](https://discourse.cmake.org/t/cmake-is-unable-to-build-rp-2040-hat-freerts-c/9361)

<div class="topic-metadata">

**Author:** [@alphabeta](https://discourse.cmake.org/u/alphabeta)\
**Replies:** 1\
**Last updated:** [November 17, 2023, 1:31pm UTC](https://discourse.cmake.org/t/cmake-is-unable-to-build-rp-2040-hat-freerts-c/9361 "2023-11-17T13:31:06Z")

</div>

PICO is installed in C drive there examples are easily build but when I am trying to build RP2040-HAT- FREERTOS-C which is installed in D drive it shows this error. Please help me on this .

---

## [CMAKE \<LINK\_LIBRARIES\> separated by spaces not commas in linker command](https://discourse.cmake.org/t/cmake-link-libraries-separated-by-spaces-not-commas-in-linker-command/9003)

<div class="topic-metadata">

**Author:** [@cwilliamson](https://discourse.cmake.org/u/cwilliamson)\
**Replies:** 7\
**Last updated:** [September 19, 2023, 5:53pm UTC](https://discourse.cmake.org/t/cmake-link-libraries-separated-by-spaces-not-commas-in-linker-command/9003 "2023-09-19T17:53:49Z")

</div>

I’m trying to get CMake to use a custom compiler to build some code. I’ve setup a cmake toolchain file that works great for everything besides linking in static libraries. The linker requires all libraries to be passed u…

---

## [Using third-party libraries](https://discourse.cmake.org/t/using-third-party-libraries/8852)

<div class="topic-metadata">

**Author:** [@Saviz](https://discourse.cmake.org/u/Saviz)\
**Replies:** 1\
**Last updated:** [September 1, 2023, 11:33am UTC](https://discourse.cmake.org/t/using-third-party-libraries/8852 "2023-09-01T11:33:19Z")

</div>

I’d like to begin by acknowledging that there are many other posts discussing this topic. Nevertheless, after a thorough review, I’ve observed that none of them explicitly explain the specifics of my questions issues tha…

---

## [CMake library target brought in thru Conan - when linked to executable I can't get rid of full-path to library](https://discourse.cmake.org/t/cmake-library-target-brought-in-thru-conan-when-linked-to-executable-i-cant-get-rid-of-full-path-to-library/8847)

<div class="topic-metadata">

**Author:** [@Rich\_von\_Lehe](https://discourse.cmake.org/u/Rich_von_Lehe)\
**Replies:** 6\
**Last updated:** [August 31, 2023, 1:34pm UTC](https://discourse.cmake.org/t/cmake-library-target-brought-in-thru-conan-when-linked-to-executable-i-cant-get-rid-of-full-path-to-library/8847 "2023-08-31T13:34:14Z")

</div>

I’m building a test application that links against a library provided by a Conan package. Through the use of some autogenerated CMake provided by Conan, that library is linked against as a target, such as: consumed-lib:…

---

## [Apply configure options to git checkout when adding external projects](https://discourse.cmake.org/t/apply-configure-options-to-git-checkout-when-adding-external-projects/8562)

<div class="topic-metadata">

**Author:** [@jhlegarreta](https://discourse.cmake.org/u/jhlegarreta)\
**Replies:** 2\
**Last updated:** [July 21, 2023, 1:04pm UTC](https://discourse.cmake.org/t/apply-configure-options-to-git-checkout-when-adding-external-projects/8562 "2023-07-21T13:04:05Z")

</div>

Hi, in ITK we have some third-party modules that we checkout using CMake’s ExternalProject\_Add() function’s git capabilities: https://cmake.org/cmake/help/latest/module/ExternalProject.html Specifically, we donwload D…

---

## [Why do I get "not finding compatible version with requested version ''"?](https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707)

<div class="topic-metadata">

**Author:** [@theateist](https://discourse.cmake.org/u/theateist)\
**Replies:** 7\
**Last updated:** [July 1, 2023, 8:50pm UTC](https://discourse.cmake.org/t/why-do-i-get-not-finding-compatible-version-with-requested-version/7707 "2023-07-01T20:50:48Z")

</div>

I’m trying to build tesseract repo on Windows 10 22H2. I was told to use colcon to build the repo. I’m new to colcon and cmake. I cloned the repo to C:\\Temp\\colcon\_ws\\src and ran colcon build from x64 Native Tools Comma…

---

## [Best practice to manage collection of projects](https://discourse.cmake.org/t/best-practice-to-manage-collection-of-projects/8330)

<div class="topic-metadata">

**Author:** [@menno](https://discourse.cmake.org/u/menno)\
**Replies:** 2\
**Last updated:** [June 17, 2023, 10:49pm UTC](https://discourse.cmake.org/t/best-practice-to-manage-collection-of-projects/8330 "2023-06-17T22:49:35Z")

</div>

We have a number of different CMake projects, each representing a set of tests for our code. Each project uses the same build target names (preprocess, compute, postprocess and others) to perform said steps of the set of…

---

## [cmake for torchtext](https://discourse.cmake.org/t/cmake-for-torchtext/7770)

<div class="topic-metadata">

**Author:** [@Toocic](https://discourse.cmake.org/u/Toocic)\
**Replies:** 0\
**Last updated:** [March 26, 2023, 11:25am UTC](https://discourse.cmake.org/t/cmake-for-torchtext/7770 "2023-03-26T11:25:20Z")

</div>

How to install torchtext in cmake project on windows 10? Error CMake Error at X:\\Programming\\C++\\Tests\\TestPyTorch1\\CMakeLists.txt:11 (find\_package): By not providing “FindTorchText.cmake” in CMAKE\_MODULE\_PATH this pr…

---

## [combine cmakelist](https://discourse.cmake.org/t/combine-cmakelist/7624)

<div class="topic-metadata">

**Author:** [@fawad](https://discourse.cmake.org/u/fawad)\
**Replies:** 1\
**Last updated:** [March 15, 2023, 1:07am UTC](https://discourse.cmake.org/t/combine-cmakelist/7624 "2023-03-15T01:07:24Z")

</div>

I have a root directroy with a list of projects in subfolder and a cmakelist.txt file with some code, then in the subfolder their are more folders and a cmakelist.txt, then in the subfolder i have a project file and its …

---

## [Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE\_ASM\_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.](https://discourse.cmake.org/t/tell-cmake-where-to-find-the-compiler-by-setting-either-the-environment-variable-cc-or-the-cmake-cache-entry-cmake-asm-compiler-to-the-full-path-to-the-compiler-or-to-the-compiler-name-if-it-is-in-the-path/7342)

<div class="topic-metadata">

**Author:** [@lalarukh](https://discourse.cmake.org/u/lalarukh)\
**Replies:** 10\
**Last updated:** [January 29, 2023, 6:13pm UTC](https://discourse.cmake.org/t/tell-cmake-where-to-find-the-compiler-by-setting-either-the-environment-variable-cc-or-the-cmake-cache-entry-cmake-asm-compiler-to-the-full-path-to-the-compiler-or-to-the-compiler-name-if-it-is-in-the-path/7342 "2023-01-29T18:13:32Z")

</div>

Hello! I have recently installed the ClickHouse from here: (How to Build ClickHouse on Mac OS X - ClickHouse Documentation). Successfully I have download the Clickhouse but when I run this command from documentation: …

---

## [Install everything \_but\_certain components](https://discourse.cmake.org/t/install-everything-but-certain-components/6209)

<div class="topic-metadata">

**Author:** [@minrk](https://discourse.cmake.org/u/minrk)\
**Replies:** 5\
**Last updated:** [January 18, 2023, 10:30am UTC](https://discourse.cmake.org/t/install-everything-but-certain-components/6209 "2023-01-18T10:30:20Z")

</div>

I work on packaging for conda-forge, and we often want to separate multiple outputs for one project (commonly separating a shared library and language bindings, but could be any reason to subset files into outputs). Thi…

---

## [Create a dissasembly from a single c file](https://discourse.cmake.org/t/create-a-dissasembly-from-a-single-c-file/6868)

<div class="topic-metadata">

**Author:** [@patsv](https://discourse.cmake.org/u/patsv)\
**Replies:** 6\
**Last updated:** [November 18, 2022, 7:17am UTC](https://discourse.cmake.org/t/create-a-dissasembly-from-a-single-c-file/6868 "2022-11-18T07:17:01Z")

</div>

Hi, I want to compile and produce an assembly file from a c file. Am translating some makefiles where one produces a single dissasembly file from a c file to determine some info about how this compiler aligns data and s…

---

## [Transitive Dependencies](https://discourse.cmake.org/t/transitive-dependencies/6645)

<div class="topic-metadata">

**Author:** [@DaAwesomeP](https://discourse.cmake.org/u/DaAwesomeP)\
**Replies:** 1\
**Last updated:** [October 12, 2022, 7:17am UTC](https://discourse.cmake.org/t/transitive-dependencies/6645 "2022-10-12T07:17:31Z")

</div>

Hello! I have two projects. projectA and projectB. Project A depends on projectB. projectB depends on system dependencies. When I build project A, I get a bunch of linker errors. projectB: cmake\_minimum\_required(VERSI…

---

## [CXX\_CLANG\_TIDY not running for library](https://discourse.cmake.org/t/cxx-clang-tidy-not-running-for-library/6547)

<div class="topic-metadata">

**Author:** [@DaAwesomeP](https://discourse.cmake.org/u/DaAwesomeP)\
**Replies:** 2\
**Last updated:** [September 22, 2022, 6:51pm UTC](https://discourse.cmake.org/t/cxx-clang-tidy-not-running-for-library/6547 "2022-09-22T18:51:14Z")

</div>

I am writing a library, and I cannot get clang-tidy to run on build. This is a headers-only library because all of the classes provided have templates, and you cannot define template class members outside of the template…

---

## [CMAKE\_STAGING\_PREFIX vs. CMAKE\_INSTALL\_PREFIX](https://discourse.cmake.org/t/cmake-staging-prefix-vs-cmake-install-prefix/6485)

<div class="topic-metadata">

**Author:** [@bradlit](https://discourse.cmake.org/u/bradlit)\
**Replies:** 1\
**Last updated:** [September 15, 2022, 10:19pm UTC](https://discourse.cmake.org/t/cmake-staging-prefix-vs-cmake-install-prefix/6485 "2022-09-15T22:19:08Z")

</div>

I’ve read the definitions in cmake-variables, but I’m still puzzled by the relationship between CMAKE\_STAGING\_PREFIX and CMAKE\_INSTALL\_PREFIX. Some simple experiments seem to indicate that the perform the same function,…

---

## [Because CMake-gui does not use UTF-8 (without BOM) for URLs?](https://discourse.cmake.org/t/because-cmake-gui-does-not-use-utf-8-without-bom-for-urls/5335)

<div class="topic-metadata">

**Author:** [@Daniel\_Briceno](https://discourse.cmake.org/u/Daniel_Briceno)\
**Replies:** 3\
**Last updated:** [April 5, 2022, 2:12pm UTC](https://discourse.cmake.org/t/because-cmake-gui-does-not-use-utf-8-without-bom-for-urls/5335 "2022-04-05T14:12:03Z")

</div>

I have as a user a name that has the letter Unicode: ñ. So always by generating with cmake I did not find the routes, I saw the route through the file explorer and I also saw the cmakelists.txt file, it was beginning to …

[Previous page](https://discourse.cmake.org/tag/tool-cmake/44.md?match_all_tags=true&tags%5B%5D=tool%3Acmake)

[Next page](https://discourse.cmake.org/tag/tool-cmake/44.md?match_all_tags=true&page=2&tags%5B%5D=tool%3Acmake)
