# \#tool:cmake

**URL:** https://discourse.cmake.org/tag/tool-cmake/44.md

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

---

## [CMake C++17 "does not name a type" however class is included](https://discourse.cmake.org/t/cmake-c-17-does-not-name-a-type-however-class-is-included/15637)

<div class="topic-metadata">

**Author:** [@matdubuisson](https://discourse.cmake.org/u/matdubuisson)\
**Replies:** 2\
**Last updated:** [May 3, 2026, 8:18am UTC](https://discourse.cmake.org/t/cmake-c-17-does-not-name-a-type-however-class-is-included/15637 "2026-05-03T08:18:27Z")

</div>

Hello everyone, I have upgraded a project from cmake 2.8 to cmake 4.0 and llvm 3.9.0 to 22.1.0 so of course I got compilation issues. For example in the project there is a class not found error for vm.hh file and the cl…

---

## [FASTBuild+clang-cl combo emits warnings which Ninja+clang-cl combo doesn't emit with same everything](https://discourse.cmake.org/t/fastbuild-clang-cl-combo-emits-warnings-which-ninja-clang-cl-combo-doesnt-emit-with-same-everything/15601)

<div class="topic-metadata">

**Author:** [@SenPie](https://discourse.cmake.org/u/SenPie)\
**Replies:** 6\
**Last updated:** [April 25, 2026, 11:51pm UTC](https://discourse.cmake.org/t/fastbuild-clang-cl-combo-emits-warnings-which-ninja-clang-cl-combo-doesnt-emit-with-same-everything/15601 "2026-04-25T23:51:51Z")

</div>

With the long awaited addition of FASTBuild to the list of supported generators we wanted to transition our game engine from Ninja+clang-cl setup to FASTBuild+clang-cl setup to leverage that sweet distributed compilation…

---

## [Integrating CDash submission into a normal CI](https://discourse.cmake.org/t/integrating-cdash-submission-into-a-normal-ci/15587)

<div class="topic-metadata">

**Author:** [@fsimonis](https://discourse.cmake.org/u/fsimonis)\
**Replies:** 8\
**Last updated:** [April 8, 2026, 12:20pm UTC](https://discourse.cmake.org/t/integrating-cdash-submission-into-a-normal-ci/15587 "2026-04-08T12:20:20Z")

</div>

Hi, I’m having trouble integrating CDash into my project’s CI and haven’t found any good answers, so I’m asking here. I manage a pretty standard CI that configures, builds, and tests a CMake project for a range of confi…

---

## [Feature Request: Allow prefix on property name defined with define\_property](https://discourse.cmake.org/t/feature-request-allow-prefix-on-property-name-defined-with-define-property/15570)

<div class="topic-metadata">

**Author:** [@joshr](https://discourse.cmake.org/u/joshr)\
**Replies:** 0\
**Last updated:** [March 22, 2026, 5:44pm UTC](https://discourse.cmake.org/t/feature-request-allow-prefix-on-property-name-defined-with-define-property/15570 "2026-03-22T17:44:25Z")

</div>

Hello, I was recently playing with define\_property and ran into a situation where I received the error: CMake Error (define\_property): Debug define\_property Variable name “COMPANY\_CACHE\_VAR” does not end with property …

---

## [Problem with CMake when compiling a project with Clang and CUDA support](https://discourse.cmake.org/t/problem-with-cmake-when-compiling-a-project-with-clang-and-cuda-support/11723)

<div class="topic-metadata">

**Author:** [@AAUDI](https://discourse.cmake.org/u/AAUDI)\
**Replies:** 1\
**Last updated:** [March 12, 2026, 5:01pm UTC](https://discourse.cmake.org/t/problem-with-cmake-when-compiling-a-project-with-clang-and-cuda-support/11723 "2026-03-12T17:01:23Z")

</div>

Hello, I’m trying to build an open-source project called VORTEX on Windows using CLANG as the compiler. However, when I run the CMake command, it seems that the NVCC (CUDA) compiler is not being detected. Could you plea…

---

## [Automatically discovering the minimal header install set](https://discourse.cmake.org/t/automatically-discovering-the-minimal-header-install-set/13832)

<div class="topic-metadata">

**Author:** [@sketch34](https://discourse.cmake.org/u/sketch34)\
**Replies:** 3\
**Last updated:** [February 20, 2026, 4:55am UTC](https://discourse.cmake.org/t/automatically-discovering-the-minimal-header-install-set/13832 "2026-02-20T04:55:05Z")

</div>

I have an install component ae\_sdk that produces the client-facing SDK. We want the SDK to contains the minimal set of headers required. Currently we achieve this by compiling a sample SDK project with the gcc -H flag (p…

---

## [set xcode "Library Search Paths" form cmake?](https://discourse.cmake.org/t/set-xcode-library-search-paths-form-cmake/12846)

<div class="topic-metadata">

**Author:** [@shokarta](https://discourse.cmake.org/u/shokarta)\
**Replies:** 4\
**Last updated:** [February 20, 2026, 3:34am UTC](https://discourse.cmake.org/t/set-xcode-library-search-paths-form-cmake/12846 "2026-02-20T03:34:42Z")

</div>

Hello guys, after I configure the project from QT, in xcode I need to manualy go to project BUILD SETTINGS, locate LIBRARY SEARCH PATHS and set some stuff manualy… can this be automated from cmake? I need to set follo…

---

## [Best practices for dependency management in a nested library / superproject setup (FetchContent vs. find\_package)](https://discourse.cmake.org/t/best-practices-for-dependency-management-in-a-nested-library-superproject-setup-fetchcontent-vs-find-package/15127)

<div class="topic-metadata">

**Author:** [@StormLord07](https://discourse.cmake.org/u/StormLord07)\
**Replies:** 7\
**Last updated:** [December 28, 2025, 7:58am UTC](https://discourse.cmake.org/t/best-practices-for-dependency-management-in-a-nested-library-superproject-setup-fetchcontent-vs-find-package/15127 "2025-12-28T07:58:11Z")

</div>

Hello, My team and I really like the versatility of FetchContent and we use it almost everywhere. We’ve built up a fair number of internal libraries to increase development speed, so things feel like Lego blocks now. Th…

---

## [PkgConfig: cflags must be usage requirements for \`IMPORTED\_TARGET\`s](https://discourse.cmake.org/t/pkgconfig-cflags-must-be-usage-requirements-for-imported-target-s/15152)

<div class="topic-metadata">

**Author:** [@skittishdev](https://discourse.cmake.org/u/skittishdev)\
**Replies:** 1\
**Last updated:** [September 4, 2025, 4:49pm UTC](https://discourse.cmake.org/t/pkgconfig-cflags-must-be-usage-requirements-for-imported-target-s/15152 "2025-09-04T16:49:37Z")

</div>

Hi, I recently discovered that when linking to a PkgConfig dependency, the cflags specified in the .pc file are not automatically added to the target compile command. I think it’d be fantastic to have cflags be usage re…

---

## [Exclude some TUs from --parallel](https://discourse.cmake.org/t/exclude-some-tus-from-parallel/11500)

<div class="topic-metadata">

**Author:** [@silverqx](https://discourse.cmake.org/u/silverqx)\
**Replies:** 7\
**Last updated:** [July 21, 2025, 12:08am UTC](https://discourse.cmake.org/t/exclude-some-tus-from-parallel/11500 "2025-07-21T00:08:58Z")

</div>

How to tell cmake not to compile 2-3 TU-s in parallel (eg. from 100 TU-s in total), added as subprojects using add\_subdirectory() - add\_executable() - add\_test() using -G Ninja generator. Is there any solution or workar…

---

## ["Show Live Issues" problem in Xcode with CMake generator and possible improvement](https://discourse.cmake.org/t/show-live-issues-problem-in-xcode-with-cmake-generator-and-possible-improvement/14176)

<div class="topic-metadata">

**Author:** [@Chinouo](https://discourse.cmake.org/u/Chinouo)\
**Replies:** 1\
**Last updated:** [July 20, 2025, 2:47am UTC](https://discourse.cmake.org/t/show-live-issues-problem-in-xcode-with-cmake-generator-and-possible-improvement/14176 "2025-07-20T02:47:03Z")

</div>

By default, CMake generates a .xcodeproj file, Xcode can index the code properly, but the Show Live Issues feature doesn’t work with this file. Code issues are only shown after building, However, if I create a new Xcode…

---

## [Does anyone have experience compiling for HPE OSS?](https://discourse.cmake.org/t/does-anyone-have-experience-compiling-for-hpe-oss/14308)

<div class="topic-metadata">

**Author:** [@manray](https://discourse.cmake.org/u/manray)\
**Replies:** 0\
**Last updated:** [July 2, 2025, 1:48pm UTC](https://discourse.cmake.org/t/does-anyone-have-experience-compiling-for-hpe-oss/14308 "2025-07-02T13:48:37Z")

</div>

I am switching build systems from Meson/Ninja to CMake/Ninja for a large C/C++ project that targets many operating systems. AIX, Solaris, Linux, Windows, etc seem well supported by CMake, but I am worried about HPE OSS a…

---

## [Does target\_link\_libraries(... PRIVATE) deduplicate?](https://discourse.cmake.org/t/does-target-link-libraries-private-deduplicate/14275)

<div class="topic-metadata">

**Author:** [@bmcdonnell-fb](https://discourse.cmake.org/u/bmcdonnell-fb)\
**Replies:** 1\
**Last updated:** [June 21, 2025, 10:21pm UTC](https://discourse.cmake.org/t/does-target-link-libraries-private-deduplicate/14275 "2025-06-21T22:21:16Z")

</div>

I have an embedded C application with static libraries, where both the application and lib1 use lib2. (lib2 is not part of lib1’s interface.) If my CMakeLists.txt includes something like this: add\_executable(app app.c)…

---

## [VS 2022 configuration build preset selector missing](https://discourse.cmake.org/t/vs-2022-configuration-build-preset-selector-missing/13960)

<div class="topic-metadata">

**Author:** [@mandrews](https://discourse.cmake.org/u/mandrews)\
**Replies:** 4\
**Last updated:** [April 20, 2025, 1:26am UTC](https://discourse.cmake.org/t/vs-2022-configuration-build-preset-selector-missing/13960 "2025-04-20T01:26:53Z")

</div>

Just starting to use the cmake tools built into VS 2022 and i built a quick windows test program based off of the CMakeLists.txt and CMakePresets.json which are generated when i create a new project using the ‘CMake Proj…

---

## [cmake offline build - how to pre-populate source dependencies in the build tree](https://discourse.cmake.org/t/cmake-offline-build-how-to-pre-populate-source-dependencies-in-the-build-tree/13173)

<div class="topic-metadata">

**Author:** [@s837jhc](https://discourse.cmake.org/u/s837jhc)\
**Replies:** 2\
**Last updated:** [February 24, 2025, 4:51pm UTC](https://discourse.cmake.org/t/cmake-offline-build-how-to-pre-populate-source-dependencies-in-the-build-tree/13173 "2025-02-24T16:51:01Z")

</div>

I am trying to build a project while offline. The project is sol2, but the question is more general. Using that project as an example to talk to in a response here is fine, but I am more interested in the general “cmake…

---

## [Proper post\_build script in xcode for Firebase Crashlytics?](https://discourse.cmake.org/t/proper-post-build-script-in-xcode-for-firebase-crashlytics/13465)

<div class="topic-metadata">

**Author:** [@shokarta](https://discourse.cmake.org/u/shokarta)\
**Replies:** 0\
**Last updated:** [January 23, 2025, 11:55am UTC](https://discourse.cmake.org/t/proper-post-build-script-in-xcode-for-firebase-crashlytics/13465 "2025-01-23T11:55:09Z")

</div>

Hello Guys… I am trying to properly automatizate Get started with Firebase Crashlytics step 4C and 4D. when it set manualy, it shall look like this: so, what I tried is: set(DWARF\_DSYM\_FOLDER\_PATH "${DWARF\_DSYM\_F…

---

## [error while loading shared libraries: libwhisper.so.1: cannot open shared object file: No such file or directory](https://discourse.cmake.org/t/error-while-loading-shared-libraries-libwhisper-so-1-cannot-open-shared-object-file-no-such-file-or-directory/13409)

<div class="topic-metadata">

**Author:** [@Raphy](https://discourse.cmake.org/u/Raphy)\
**Replies:** 0\
**Last updated:** [January 16, 2025, 3:01pm UTC](https://discourse.cmake.org/t/error-while-loading-shared-libraries-libwhisper-so-1-cannot-open-shared-object-file-no-such-file-or-directory/13409 "2025-01-16T15:01:01Z")

</div>

I installed whisper in MyPrj : ~/Downloads/whisper.cpp$ cmake --install builddir/ --prefix=/home/me/MyPrj/src/whisperLib -- Install configuration: "Release" -- Installing: /home/me/MyPrj/src/whisperLib/lib/libwhisper.so…

---

## [Why doesn't target\_compile\_options() print console warnings like set(CMAKE\_LANG\_FLAGS...)?](https://discourse.cmake.org/t/why-doesnt-target-compile-options-print-console-warnings-like-set-cmake-lang-flags/11371)

<div class="topic-metadata">

**Author:** [@RudyFisher7](https://discourse.cmake.org/u/RudyFisher7)\
**Replies:** 3\
**Last updated:** [December 5, 2024, 8:10pm UTC](https://discourse.cmake.org/t/why-doesnt-target-compile-options-print-console-warnings-like-set-cmake-lang-flags/11371 "2024-12-05T20:10:36Z")

</div>

The title says it all really. I’ve built a handful of c++ project with CMake now. set(CMAKE\_CXX\_FLAGS…) needs to be used in order to get the compiler warnings to print during compilation. target\_compile\_options() never p…

---

## [Supplying if() condition arguments via list variable](https://discourse.cmake.org/t/supplying-if-condition-arguments-via-list-variable/13015)

<div class="topic-metadata">

**Author:** [@ferdnyc](https://discourse.cmake.org/u/ferdnyc)\
**Replies:** 3\
**Last updated:** [November 22, 2024, 1:25am UTC](https://discourse.cmake.org/t/supplying-if-condition-arguments-via-list-variable/13015 "2024-11-22T01:25:02Z")

</div>

I know it’s not uncommon to do things like this: set(\_my\_targets lib1 lib2 mainexe configexe) install( TARGETS ${\_my\_targets} RUNTIME DESTINATION ... ) Or this… set(\_qt\_components Core Network Widgets) find\_packag…

---

## [Exit with custom status code](https://discourse.cmake.org/t/exit-with-custom-status-code/12944)

<div class="topic-metadata">

**Author:** [@tomoyo255](https://discourse.cmake.org/u/tomoyo255)\
**Replies:** 3\
**Last updated:** [November 12, 2024, 9:08am UTC](https://discourse.cmake.org/t/exit-with-custom-status-code/12944 "2024-11-12T09:08:07Z")

</div>

Hello, I would like to know if there’s a way to exit at will from a cmake CMakeLists.txt with a status code of my choice. If the current cmake list corresponds to one of a subdirectory suggesting a nested execution, it…

---

## [PROTOBUF\_GENERATE\_CPP does not generating src and header files](https://discourse.cmake.org/t/protobuf-generate-cpp-does-not-generating-src-and-header-files/9893)

<div class="topic-metadata">

**Author:** [@black\_anime](https://discourse.cmake.org/u/black_anime)\
**Replies:** 3\
**Last updated:** [November 3, 2024, 5:24am UTC](https://discourse.cmake.org/t/protobuf-generate-cpp-does-not-generating-src-and-header-files/9893 "2024-11-03T05:24:22Z")

</div>

Directory: |test --|build --|msg --|proto ----|test.poto --|CMakeLists.txt --|test.bat this is my CMakeLists.txt cmake\_minimum\_required(VERSION 3.0.0) project(test) message(STATUS "source path: ${PROJECT\_SOURCE\_DIR}"…

---

## [How to configure multiple cmake projects with CMakePresets.json?](https://discourse.cmake.org/t/how-to-configure-multiple-cmake-projects-with-cmakepresets-json/12673)

<div class="topic-metadata">

**Author:** [@agostini01](https://discourse.cmake.org/u/agostini01)\
**Replies:** 3\
**Last updated:** [October 9, 2024, 8:21pm UTC](https://discourse.cmake.org/t/how-to-configure-multiple-cmake-projects-with-cmakepresets-json/12673 "2024-10-09T20:21:16Z")

</div>

I recently found out about CMakePresets.json. I am trying to enable it in my workspace that has two CMakeLists.txt based projects. The structure of my workspace is: ├── myproject │ └── CMakeLists.txt ├── external │ …

---

## [two separate projects based on cmake](https://discourse.cmake.org/t/two-separate-projects-based-on-cmake/11328)

<div class="topic-metadata">

**Author:** [@v2panchal](https://discourse.cmake.org/u/v2panchal)\
**Replies:** 0\
**Last updated:** [July 26, 2024, 10:06am UTC](https://discourse.cmake.org/t/two-separate-projects-based-on-cmake/11328 "2024-07-26T10:06:38Z")

</div>

Hello We have two separate projects called A and B. Project A generated multiple libraries and Project B having multiple libraries and executables. Now Project B depends on Project A. so how can we make dependencies bet…

---

## [Can I point CMake to use the (older) libc of a different rootfs?](https://discourse.cmake.org/t/can-i-point-cmake-to-use-the-older-libc-of-a-different-rootfs/10925)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.cmake.org/u/bertulli)\
**Replies:** 1\
**Last updated:** [June 3, 2024, 7:48am UTC](https://discourse.cmake.org/t/can-i-point-cmake-to-use-the-older-libc-of-a-different-rootfs/10925 "2024-06-03T07:48:05Z")

</div>

Hi all! I’m trying to set up CMake to cross compile an application targeted to an old (2017) Linux system (functioning, but slow). I managed to write a toolchain file and I can compile it, but of course the libc picked i…

---

## [Coverage tool for cmake](https://discourse.cmake.org/t/coverage-tool-for-cmake/10643)

<div class="topic-metadata">

**Author:** [@pkiran](https://discourse.cmake.org/u/pkiran)\
**Replies:** 6\
**Last updated:** [May 17, 2024, 1:47pm UTC](https://discourse.cmake.org/t/coverage-tool-for-cmake/10643 "2024-05-17T13:47:43Z")

</div>

Hello, We have a lot of lines of code in cmake, maintained by multiple teams. I was wondering if there is some kind of a coverage tool for cmake itself, which helps to identify dead code. Thanks

---

## [CMAKE toolchain does not set the compiler option -std to gnu17 or c++17 although I have added "set(CMAKE\_CXX\_STANDARD 17)" in CMakeLists.txt.](https://discourse.cmake.org/t/cmake-toolchain-does-not-set-the-compiler-option-std-to-gnu17-or-c-17-although-i-have-added-set-cmake-cxx-standard-17-in-cmakelists-txt/10770)

<div class="topic-metadata">

**Author:** [@sahu.swapnil25](https://discourse.cmake.org/u/sahu.swapnil25)\
**Replies:** 3\
**Last updated:** [May 14, 2024, 2:00pm UTC](https://discourse.cmake.org/t/cmake-toolchain-does-not-set-the-compiler-option-std-to-gnu17-or-c-17-although-i-have-added-set-cmake-cxx-standard-17-in-cmakelists-txt/10770 "2024-05-14T14:00:26Z")

</div>

This is regarding the build of a project by new compiler that I have configured in cmake toolchain file. For new compiler, I have configured CMAKE\_CXX\_COMPILER and CMAKE\_CXX\_COMPILER\_ID. Also, for c++17 feature I have s…

---

## [failed to link the ".a" library into the project](https://discourse.cmake.org/t/failed-to-link-the-a-library-into-the-project/10812)

<div class="topic-metadata">

**Author:** [@Vinay\_hs](https://discourse.cmake.org/u/Vinay_hs)\
**Replies:** 4\
**Last updated:** [May 8, 2024, 7:02am UTC](https://discourse.cmake.org/t/failed-to-link-the-a-library-into-the-project/10812 "2024-05-08T07:02:19Z")

</div>

HI, I created a static library named “libadd.a” using e2 Studio IDE. Later, I initiated a Renesas microcontroller project in Visual Studio Code utilizing the Renesas Build Utilities extension. Unfortunately, I faced cha…

---

## [Export and implicit library dependencies](https://discourse.cmake.org/t/export-and-implicit-library-dependencies/10716)

<div class="topic-metadata">

**Author:** [@Felix-El](https://discourse.cmake.org/u/Felix-El)\
**Replies:** 1\
**Last updated:** [April 27, 2024, 3:46pm UTC](https://discourse.cmake.org/t/export-and-implicit-library-dependencies/10716 "2024-04-27T15:46:31Z")

</div>

On Linux, I’m building a shared library with CMake and exporting a find config for other projects to find\_package it. Now the C++ linker adds dependencies on implicit libraries (libcplusplus and more). If I try to impor…

---

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

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