# Usage

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

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

**Page:** 92

---

## [Unresolved symbols in dynamic library](https://discourse.cmake.org/t/unresolved-symbols-in-dynamic-library/1546)

<div class="topic-metadata">

**Author:** [@DavidA](https://discourse.cmake.org/u/DavidA)\
**Replies:** 1\
**Last updated:** [July 14, 2020, 5:12pm UTC](https://discourse.cmake.org/t/unresolved-symbols-in-dynamic-library/1546 "2020-07-14T17:12:03Z")

</div>

I explained in my previous question that I am trying to build a dynamic library ‘libdpdk.so’ of my own functions linked to the 3rd party DPDK libraries. I would then link ‘libdpdk.so’ to my own main.cpp test program. Th…

---

## [overwriting CMAKE\_CXX\_FLAGS](https://discourse.cmake.org/t/overwriting-cmake-cxx-flags/1548)

<div class="topic-metadata">

**Author:** [@flashburn](https://discourse.cmake.org/u/flashburn)\
**Replies:** 2\
**Last updated:** [July 13, 2020, 7:59pm UTC](https://discourse.cmake.org/t/overwriting-cmake-cxx-flags/1548 "2020-07-13T19:59:39Z")

</div>

My environment has CXXFLAGS=-O2 -pipe -g -feliminate-unused-debug-types. For debugging purposes I don’t want to use these settings. In my CMakeLists.txt I tried set(CMAKE\_CXX\_FLAGS ""). However when I rebuild my makefil…

---

## [Linking to a library of my own code that requires 3rd party library](https://discourse.cmake.org/t/linking-to-a-library-of-my-own-code-that-requires-3rd-party-library/1526)

<div class="topic-metadata">

**Author:** [@DavidA](https://discourse.cmake.org/u/DavidA)\
**Replies:** 8\
**Last updated:** [July 13, 2020, 2:01pm UTC](https://discourse.cmake.org/t/linking-to-a-library-of-my-own-code-that-requires-3rd-party-library/1526 "2020-07-13T14:01:21Z")

</div>

I have a working CMake test project that consists of my C++ code linked to a 3rd party library called DPDK, targeting Linux. I now want to separate my code into a main.cpp and my own library of my functions that require …

---

## [Installing versioned Qt libraries with namelinks on Linux](https://discourse.cmake.org/t/installing-versioned-qt-libraries-with-namelinks-on-linux/1499)

<div class="topic-metadata">

**Author:** [@EosPengwern](https://discourse.cmake.org/u/EosPengwern)\
**Replies:** 1\
**Last updated:** [July 10, 2020, 2:38pm UTC](https://discourse.cmake.org/t/installing-versioned-qt-libraries-with-namelinks-on-linux/1499 "2020-07-10T14:38:17Z")

</div>

I have a Linux build of Qt where each library has a fully-versioned name with symlinks representing shorter version numbers: lrwxrwxrwx 1 username username 20 Sep 20 2019 libQt5Core.so -\> libQt5Core.so.5.12.5 l…

---

## [Linking to installed Qt libraries on Linux](https://discourse.cmake.org/t/linking-to-installed-qt-libraries-on-linux/1535)

<div class="topic-metadata">

**Author:** [@EosPengwern](https://discourse.cmake.org/u/EosPengwern)\
**Replies:** 2\
**Last updated:** [July 10, 2020, 2:37pm UTC](https://discourse.cmake.org/t/linking-to-installed-qt-libraries-on-linux/1535 "2020-07-10T14:37:20Z")

</div>

I’m having persistent difficulties installing and linking to Qt libraries on Linux. In previous questions here and here, I asked about how to install Qt libraries along with their namelinks, since the library name searc…

---

## [LLVM linker not working?](https://discourse.cmake.org/t/llvm-linker-not-working/1532)

<div class="topic-metadata">

**Author:** [@\_0.z](https://discourse.cmake.org/u/_0.z)\
**Replies:** 1\
**Last updated:** [July 10, 2020, 12:20pm UTC](https://discourse.cmake.org/t/llvm-linker-not-working/1532 "2020-07-10T12:20:13Z")

</div>

ccmake 3.16.3 LLVM | CLANG | LLD 10 Ninja 1.10.0 My assumption is that http://lld.llvm.org would be the correct linker to be utilised with LLVM | CLANG and therefore tried CMAKE\_LINKER = /usr/bin/llvm-link-10 CMAKE\_…

---

## [cmake-gui Cygwin issues](https://discourse.cmake.org/t/cmake-gui-cygwin-issues/1530)

<div class="topic-metadata">

**Author:** [@clove](https://discourse.cmake.org/u/clove)\
**Replies:** 0\
**Last updated:** [July 10, 2020, 10:18am UTC](https://discourse.cmake.org/t/cmake-gui-cygwin-issues/1530 "2020-07-10T10:18:32Z")

</div>

I have been using cmake-gui on Cyqwin. The most recent binary is 3.14.5. The version prints a lot of error messages as follows.QXcbShmImage: shmget() failed (88: Function not implemented) for size 67392 (216x78) QXcb…

---

## [building/referencing a library](https://discourse.cmake.org/t/building-referencing-a-library/1446)

<div class="topic-metadata">

**Author:** [@mzimmers](https://discourse.cmake.org/u/mzimmers)\
**Replies:** 8\
**Last updated:** [July 8, 2020, 8:42pm UTC](https://discourse.cmake.org/t/building-referencing-a-library/1446 "2020-07-08T20:42:44Z")

</div>

Hi, all - Brand new to using CMake. I need to port an RTP library to a new platform (the Espressif ESP32). I pulled a copy of ortp from github. It depends on bctoolbox (from the same author), which in turn depends on m…

---

## [generating vcxproj that uses relative paths](https://discourse.cmake.org/t/generating-vcxproj-that-uses-relative-paths/1522)

<div class="topic-metadata">

**Author:** [@eri0](https://discourse.cmake.org/u/eri0)\
**Replies:** 1\
**Last updated:** [July 8, 2020, 8:04pm UTC](https://discourse.cmake.org/t/generating-vcxproj-that-uses-relative-paths/1522 "2020-07-08T20:04:34Z")

</div>

CMake can generate Visual Studio projects, which is great! However, it looks like they are not supposed to be included in the source code repository. Sometimes I need to cooperate with people who are not familiar with CM…

---

## [CPACK\_RPM\_EXCLUDE\_FROM\_AUTO\_FILELIST ignored?](https://discourse.cmake.org/t/cpack-rpm-exclude-from-auto-filelist-ignored/1503)

<div class="topic-metadata">

**Author:** [@rickhg12hs](https://discourse.cmake.org/u/rickhg12hs)\
**Replies:** 3\
**Last updated:** [July 8, 2020, 4:57am UTC](https://discourse.cmake.org/t/cpack-rpm-exclude-from-auto-filelist-ignored/1503 "2020-07-08T04:57:13Z")

</div>

Using the latest cmake: $ cmake --version cmake version 3.18.20200707-gee781ac CMake suite maintained and supported by Kitware (kitware.com/cmake). cmakeing the cmake project from git clone https://gitlab.kitware.com/…

---

## [FindBLAS bug with Intel compiler on Windows?](https://discourse.cmake.org/t/findblas-bug-with-intel-compiler-on-windows/1493)

<div class="topic-metadata">

**Author:** [@scivision](https://discourse.cmake.org/u/scivision)\
**Replies:** 3\
**Last updated:** [July 7, 2020, 3:17am UTC](https://discourse.cmake.org/t/findblas-bug-with-intel-compiler-on-windows/1493 "2020-07-07T03:17:59Z")

</div>

At some point, finding BLAS and Lapack for Intel compilers on Windows seems to have broken. This issue occurs at least for CMake 3.16.8 and CMake 3.18-rc3. This happens for Intel Parallel Studio XE as well as the new Int…

---

## [What controls CPack staging location](https://discourse.cmake.org/t/what-controls-cpack-staging-location/1492)

<div class="topic-metadata">

**Author:** [@briadam](https://discourse.cmake.org/u/briadam)\
**Replies:** 3\
**Last updated:** [July 6, 2020, 8:30pm UTC](https://discourse.cmake.org/t/what-controls-cpack-staging-location/1492 "2020-07-06T20:30:05Z")

</div>

Background: Our Dakota project integrates Trilinos which uses the TriBITS system for CMake builds. (For better or worse) Dakota manages Trilinos as a sub-package with add\_subdirectory. In updating Dakota from Trilinos d2…

---

## [Windows: how to have multiple CMake versions installed?](https://discourse.cmake.org/t/windows-how-to-have-multiple-cmake-versions-installed/1491)

<div class="topic-metadata">

**Author:** [@scivision](https://discourse.cmake.org/u/scivision)\
**Replies:** 2\
**Last updated:** [July 6, 2020, 7:43pm UTC](https://discourse.cmake.org/t/windows-how-to-have-multiple-cmake-versions-installed/1491 "2020-07-06T19:43:57Z")

</div>

For dev purposes on Windows, we would like to have multiple CMake versions “installed” as we easily can on Linux. This would allow local testing of issues across CMake releases (e.g. 3.14 vs. 3.18). Yes, this is what clo…

---

## [QNX CMake Build](https://discourse.cmake.org/t/qnx-cmake-build/1309)

<div class="topic-metadata">

**Author:** [@developer](https://discourse.cmake.org/u/developer)\
**Replies:** 2\
**Last updated:** [July 6, 2020, 5:36pm UTC](https://discourse.cmake.org/t/qnx-cmake-build/1309 "2020-07-06T17:36:07Z")

</div>

Hello, I am getting undefined errors like the following when using the qnx toolchain file from the docs (https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-qnx). qnx700/target/qnx7/u…

---

## [Observation on compiler options](https://discourse.cmake.org/t/observation-on-compiler-options/1481)

<div class="topic-metadata">

**Author:** [@lfcarreon1](https://discourse.cmake.org/u/lfcarreon1)\
**Replies:** 2\
**Last updated:** [July 6, 2020, 12:17pm UTC](https://discourse.cmake.org/t/observation-on-compiler-options/1481 "2020-07-06T12:17:26Z")

</div>

Hi, I’m new to CMake and I have started experimenting with it by converting my hand coded make files into CMakeLists.txt after having read the book Professional CMake: A Practical Guide. I’m using CMake 3.17.3 that com…

---

## [Need cmake 3.17 linux arm64 binary for Travis CI build on arm64](https://discourse.cmake.org/t/need-cmake-3-17-linux-arm64-binary-for-travis-ci-build-on-arm64/1473)

<div class="topic-metadata">

**Author:** [@boxerab](https://discourse.cmake.org/u/boxerab)\
**Replies:** 8\
**Last updated:** [July 3, 2020, 1:58pm UTC](https://discourse.cmake.org/t/need-cmake-3-17-linux-arm64-binary-for-travis-ci-build-on-arm64/1473 "2020-07-03T13:58:15Z")

</div>

What is the best way of making this binary available to my Travis build? For x86-64, I just download the tarball from https://cmake.org/files/v3.17

---

## [Generated code dependency fails](https://discourse.cmake.org/t/generated-code-dependency-fails/1480)

<div class="topic-metadata">

**Author:** [@Marc\_Pawlowsky](https://discourse.cmake.org/u/Marc_Pawlowsky)\
**Replies:** 3\
**Last updated:** [July 3, 2020, 7:43am UTC](https://discourse.cmake.org/t/generated-code-dependency-fails/1480 "2020-07-03T07:43:22Z")

</div>

Sample code is available in https://github.com/marcpawl/cmake\_generated\_source.git I have two directories px and pxlib. px generates code, and pxlib consumes it. For px I have: cmake\_minimum\_required ( VERSION 3.12) …

---

## [cmake-file-api code model version 2.1](https://discourse.cmake.org/t/cmake-file-api-code-model-version-2-1/1465)

<div class="topic-metadata">

**Author:** [@Bob\_Brown](https://discourse.cmake.org/u/Bob_Brown)\
**Replies:** 5\
**Last updated:** [June 30, 2020, 5:37pm UTC](https://discourse.cmake.org/t/cmake-file-api-code-model-version-2-1/1465 "2020-06-30T17:37:23Z")

</div>

Hello, We maintain the CMake Tools extension for VS Code and we’re seeing reports of a new minor revision of the code model for cmake-file-api(7) in version 3.18-rc1 and above (revision 2.1). I couldn’t find any docume…

---

## [usage of CMAKE\_SYSROOT and CMAKE\_INSTALL\_PREFIX when cross-compiling](https://discourse.cmake.org/t/usage-of-cmake-sysroot-and-cmake-install-prefix-when-cross-compiling/1460)

<div class="topic-metadata">

**Author:** [@Stefan\_Seefeld](https://discourse.cmake.org/u/Stefan_Seefeld)\
**Replies:** 0\
**Last updated:** [June 29, 2020, 9:33pm UTC](https://discourse.cmake.org/t/usage-of-cmake-sysroot-and-cmake-install-prefix-when-cross-compiling/1460 "2020-06-29T21:33:40Z")

</div>

I’m trying to build packages for a cross-build environment (QNX), and I’m slightly confused by the use of the CMAKE\_SYSROOT and CMAKE\_INSTALL\_PREFIX variables. I would expect my generated (debian) package to contain ins…

---

## [Recommended RAM and hard drive space](https://discourse.cmake.org/t/recommended-ram-and-hard-drive-space/1445)

<div class="topic-metadata">

**Author:** [@Cohens\_Kahdeem](https://discourse.cmake.org/u/Cohens_Kahdeem)\
**Replies:** 3\
**Last updated:** [June 26, 2020, 7:50am UTC](https://discourse.cmake.org/t/recommended-ram-and-hard-drive-space/1445 "2020-06-26T07:50:36Z")

</div>

Hi, all. Based on your usage of CMake, what would you say is the recommended RAM (GB) and hard disk space (GB) for installation and optimal use? Working to determine compute resources required for the application prior t…

---

## [Wrapping function()](https://discourse.cmake.org/t/wrapping-function/1410)

<div class="topic-metadata">

**Author:** [@KUGA2](https://discourse.cmake.org/u/KUGA2)\
**Replies:** 4\
**Last updated:** [June 24, 2020, 3:32pm UTC](https://discourse.cmake.org/t/wrapping-function/1410 "2020-06-24T15:32:07Z")

</div>

Why does this not work? macro(myfunction FUNCTION\_NAME) function(${FUNCTION\_NAME}) endmacro() macro(endmyfunction) endfunction() endmacro() myfunction(new\_function) endmyfunction() This results in: A logical bl…

---

## [Can you provide an example of Cmake building a QT project in VS2015?](https://discourse.cmake.org/t/can-you-provide-an-example-of-cmake-building-a-qt-project-in-vs2015/1439)

<div class="topic-metadata">

**Author:** [@mirro187](https://discourse.cmake.org/u/mirro187)\
**Replies:** 0\
**Last updated:** [June 24, 2020, 6:57am UTC](https://discourse.cmake.org/t/can-you-provide-an-example-of-cmake-building-a-qt-project-in-vs2015/1439 "2020-06-24T06:57:07Z")

</div>

It is best to include the CMakeModules file

---

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

<div class="topic-metadata">

**Author:** [@Vaya\_Putra](https://discourse.cmake.org/u/Vaya_Putra)\
**Replies:** 6\
**Last updated:** [June 19, 2020, 11:52pm UTC](https://discourse.cmake.org/t/cmake-error-at-cmakelists-txt-2/1412 "2020-06-19T23:52:24Z")

</div>

dear all i am newbie using cmake. i found a problem since i have to upgrade my cmake. actually i already install cmake new version 3.15.6 i am too struggle how to fixed this. Usage CMake Error at CMakeLists.txt:2 (…

---

## [Trying to install CMake 3.17.3 on Ubuntu](https://discourse.cmake.org/t/trying-to-install-cmake-3-17-3-on-ubuntu/1415)

<div class="topic-metadata">

**Author:** [@PaulGureghian](https://discourse.cmake.org/u/PaulGureghian)\
**Replies:** 3\
**Last updated:** [June 19, 2020, 8:50pm UTC](https://discourse.cmake.org/t/trying-to-install-cmake-3-17-3-on-ubuntu/1415 "2020-06-19T20:50:54Z")

</div>

my system is Ubuntu 20 on WSL and up to date. screenshots

---

## [Chaging order of options in the link command of a cross-compilation project via CMAKE\_CXX\_LINK\_EXECUTABLE](https://discourse.cmake.org/t/chaging-order-of-options-in-the-link-command-of-a-cross-compilation-project-via-cmake-cxx-link-executable/1346)

<div class="topic-metadata">

**Author:** [@jairo](https://discourse.cmake.org/u/jairo)\
**Replies:** 2\
**Last updated:** [June 19, 2020, 1:48pm UTC](https://discourse.cmake.org/t/chaging-order-of-options-in-the-link-command-of-a-cross-compilation-project-via-cmake-cxx-link-executable/1346 "2020-06-19T13:48:40Z")

</div>

I have a CMake toolchain file to cross-compile to a TI C2000 (C28x) MCU. The compilation seems to go well except during the link process I receive a couple of warnings, the relevant warning says warning: Option -o is an…

---

## [Do not run custom targets in parallel](https://discourse.cmake.org/t/do-not-run-custom-targets-in-parallel/1353)

<div class="topic-metadata">

**Author:** [@KUGA2](https://discourse.cmake.org/u/KUGA2)\
**Replies:** 3\
**Last updated:** [June 19, 2020, 8:10am UTC](https://discourse.cmake.org/t/do-not-run-custom-targets-in-parallel/1353 "2020-06-19T08:10:24Z")

</div>

I have a custom function that creates a custom target with a custom command. This custom command uses a common file (changes it and restores it). Now, there is a race condition. If two of those targets run at the same t…

---

## [Maintaining list of Python source files without file(GLOB\_RECURSE ...)](https://discourse.cmake.org/t/maintaining-list-of-python-source-files-without-file-glob-recurse/1404)

<div class="topic-metadata">

**Author:** [@praetorian](https://discourse.cmake.org/u/praetorian)\
**Replies:** 4\
**Last updated:** [June 18, 2020, 9:05pm UTC](https://discourse.cmake.org/t/maintaining-list-of-python-source-files-without-file-glob-recurse/1404 "2020-06-18T21:05:47Z")

</div>

Hi everyone, I have a large project that uses CMake (3.6) & ninja for building. The code is mostly C++ but it has a few Python components as well. The build process auto-generates some Python files in ${CMAKE\_BINARY\_DIR…

---

## [how to use --build-config-sample?](https://discourse.cmake.org/t/how-to-use-build-config-sample/1354)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 1\
**Last updated:** [June 18, 2020, 7:19pm UTC](https://discourse.cmake.org/t/how-to-use-build-config-sample/1354 "2020-06-18T19:19:19Z")

</div>

ctest has an option called: --build-config-sample A sample executable to use to determine the configuration that should be used. e.g. Debug , Release etc. I do not understand its purpose. Can someone explain the con…

---

## [How to install the most current version](https://discourse.cmake.org/t/how-to-install-the-most-current-version/1400)

<div class="topic-metadata">

**Author:** [@PaulGureghian](https://discourse.cmake.org/u/PaulGureghian)\
**Replies:** 2\
**Last updated:** [June 18, 2020, 4:08pm UTC](https://discourse.cmake.org/t/how-to-install-the-most-current-version/1400 "2020-06-18T16:08:45Z")

</div>

on Debian 10 ?

---

## [CPack and rpm specfile packages](https://discourse.cmake.org/t/cpack-and-rpm-specfile-packages/1379)

<div class="topic-metadata">

**Author:** [@David\_Boucher](https://discourse.cmake.org/u/David_Boucher)\
**Replies:** 2\
**Last updated:** [June 17, 2020, 6:39pm UTC](https://discourse.cmake.org/t/cpack-and-rpm-specfile-packages/1379 "2020-06-17T18:39:45Z")

</div>

Hi, I have a big RPM spec file for a project that I would like to use with CPack. I can change things in that file if needed. This specfile contains several %package tags I would like to keep. I tried to use CPack with …

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

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