# Usage

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

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

**Page:** 88

---

## [Can't compile on Ubuntu 16.04 aarch64](https://discourse.cmake.org/t/cant-compile-on-ubuntu-16-04-aarch64/2248)

<div class="topic-metadata">

**Author:** [@poddingue](https://discourse.cmake.org/u/poddingue)\
**Replies:** 4\
**Last updated:** [November 27, 2020, 5:09pm UTC](https://discourse.cmake.org/t/cant-compile-on-ubuntu-16-04-aarch64/2248 "2020-11-27T17:09:54Z")

</div>

Hi there, I’m trying to build CMake directly from your repo, and I am facing some issues. First of all, here are the commands I used: - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - apt …

---

## [Include path added via include\_directories and target\_include\_directories](https://discourse.cmake.org/t/include-path-added-via-include-directories-and-target-include-directories/2254)

<div class="topic-metadata">

**Author:** [@dalianduzhi](https://discourse.cmake.org/u/dalianduzhi)\
**Replies:** 2\
**Last updated:** [November 27, 2020, 10:04am UTC](https://discourse.cmake.org/t/include-path-added-via-include-directories-and-target-include-directories/2254 "2020-11-27T10:04:49Z")

</div>

First,I added the include path1 via include\_directories and then I added the include path2 via target\_include\_directories.The result is path1 is before path2. How can I place path2 before path1 without changing the cal…

---

## [Read project version from cache](https://discourse.cmake.org/t/read-project-version-from-cache/1849)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 2\
**Last updated:** [November 26, 2020, 1:48am UTC](https://discourse.cmake.org/t/read-project-version-from-cache/1849 "2020-11-26T01:48:00Z")

</div>

See the following interaction: alex@Alex-Desktop:~/Development/Halide-build$ grep VERSION CMakeCache.txt CMAKE\_PROJECT\_VERSION:STATIC=12.0.0 CMAKE\_PROJECT\_VERSION\_MAJOR:STATIC=12 CMAKE\_PROJECT\_VERSION\_MINOR:STATIC=0 CMA…

---

## [What's new with respect to External\_Project build systems?](https://discourse.cmake.org/t/whats-new-with-respect-to-external-project-build-systems/2052)

<div class="topic-metadata">

**Author:** [@KentWilliams](https://discourse.cmake.org/u/KentWilliams)\
**Replies:** 2\
**Last updated:** [November 25, 2020, 10:59pm UTC](https://discourse.cmake.org/t/whats-new-with-respect-to-external-project-build-systems/2052 "2020-11-25T22:59:46Z")

</div>

4 years ago I converted the program I work on to use External\_Project to build prerequisites for the main code. It uses the “SuperBuild then Build” pattern where all the prerequisites are built out of one main CMakeList…

---

## [GET\_RUNTIME\_DEPENDENCIES does not seem to work with MinGW](https://discourse.cmake.org/t/get-runtime-dependencies-does-not-seem-to-work-with-mingw/2239)

<div class="topic-metadata">

**Author:** [@foolnotion](https://discourse.cmake.org/u/foolnotion)\
**Replies:** 3\
**Last updated:** [November 25, 2020, 10:12pm UTC](https://discourse.cmake.org/t/get-runtime-dependencies-does-not-seem-to-work-with-mingw/2239 "2020-11-25T22:12:19Z")

</div>

Hi, Using arch linux with MinGW and cmake 3.19. The following code works on Windows / MSVC / cmake version 3.18.20081302-MSVC\_2, but on MinGW does not find any dependencies at all. mylib is a shared library. On Windows …

---

## [cmake exception](https://discourse.cmake.org/t/cmake-exception/2240)

<div class="topic-metadata">

**Author:** [@kasha](https://discourse.cmake.org/u/kasha)\
**Replies:** 4\
**Last updated:** [November 25, 2020, 5:46pm UTC](https://discourse.cmake.org/t/cmake-exception/2240 "2020-11-25T17:46:25Z")

</div>

cmake -DCMAKE\_EXPORT\_COMPILE\_COMMANDS=ON .. -- Configuring done terminate called after throwing an instance of 'std::out\_of\_range' what(): basic\_string::replace: \_\_pos (which is 18446744073709551615) \> this-\>size() (…

---

## [some question](https://discourse.cmake.org/t/some-question/2227)

<div class="topic-metadata">

**Author:** [@cuger\_k](https://discourse.cmake.org/u/cuger_k)\
**Replies:** 1\
**Last updated:** [November 25, 2020, 5:25pm UTC](https://discourse.cmake.org/t/some-question/2227 "2020-11-25T17:25:57Z")

</div>

When I run the example, an error appears in the figure. Does anyone know what happened?

---

## [\-Wno-inconsistent-missing-overide - from unknown source](https://discourse.cmake.org/t/wno-inconsistent-missing-overide-from-unknown-source/2215)

<div class="topic-metadata">

**Author:** [@Jeremy\_Ardley](https://discourse.cmake.org/u/Jeremy_Ardley)\
**Replies:** 3\
**Last updated:** [November 25, 2020, 5:20pm UTC](https://discourse.cmake.org/t/wno-inconsistent-missing-overide-from-unknown-source/2215 "2020-11-25T17:20:31Z")

</div>

I am attempting to compile package opencv-4.5.0 on an Armbian (Debian Buster) system. I can compile this package no issues on another arm based system under Raspberry Pi OS. I am using gcc 8.3.0-6 and cmake 3.13.4 Th…

---

## [Generic CMAKE\_SYSTEM\_NAME](https://discourse.cmake.org/t/generic-cmake-system-name/1126)

<div class="topic-metadata">

**Author:** [@developer](https://discourse.cmake.org/u/developer)\
**Replies:** 4\
**Last updated:** [November 25, 2020, 4:48pm UTC](https://discourse.cmake.org/t/generic-cmake-system-name/1126 "2020-11-25T16:48:51Z")

</div>

Is the CMAKE\_SYSTEM\_NAME “Generic” documented somewhere in the new documentation location? I can only find it described in the old location (https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/CrossCompiling)

---

## [Clang-cl and CMAKE\_WINDOWS\_EXPORT\_ALL\_SYMBOLS](https://discourse.cmake.org/t/clang-cl-and-cmake-windows-export-all-symbols/2009)

<div class="topic-metadata">

**Author:** [@Horyu](https://discourse.cmake.org/u/Horyu)\
**Replies:** 2\
**Last updated:** [November 25, 2020, 12:22pm UTC](https://discourse.cmake.org/t/clang-cl-and-cmake-windows-export-all-symbols/2009 "2020-11-25T12:22:00Z")

</div>

Hi, I’m building cross-compiled apps for Windows under Linux. I use the openssl-cmake project to build openssl, it works fine to build static libraries, but when tryiing to build shared libraries, it exports the CMake …

---

## [CMAKE\_BUILD\_TYPE IGNORED](https://discourse.cmake.org/t/cmake-build-type-ignored/2230)

<div class="topic-metadata">

**Author:** [@mcandre](https://discourse.cmake.org/u/mcandre)\
**Replies:** 2\
**Last updated:** [November 25, 2020, 12:15pm UTC](https://discourse.cmake.org/t/cmake-build-type-ignored/2230 "2020-11-25T12:15:14Z")

</div>

A few UX notes about build types Why not default to Release type, for both cmake and ctest? Let’s have the simple project case be the easiest to implement! ctest and cmake should accept the same CLI flags for overridin…

---

## [CMake 3.19 - check\_c\_compiler\_flag doesn't support CMAKE\_REQUIRED\_FLAGS](https://discourse.cmake.org/t/cmake-3-19-check-c-compiler-flag-doesnt-support-cmake-required-flags/2233)

<div class="topic-metadata">

**Author:** [@galak](https://discourse.cmake.org/u/galak)\
**Replies:** 2\
**Last updated:** [November 25, 2020, 12:08pm UTC](https://discourse.cmake.org/t/cmake-3-19-check-c-compiler-flag-doesnt-support-cmake-required-flags/2233 "2020-11-25T12:08:26Z")

</div>

It seems that with 3.19, check\_c\_compiler\_flag no longer respects CMAKE\_REQUIRED\_FLAGS. check\_c\_compiler\_flag -\> cmake\_check\_compiler\_flag It looks like there are two implementations of cmake\_check\_compiler\_flag one in…

---

## [Question about CMAKE\_CXX\_ABI\_COMPILED Flag Variable](https://discourse.cmake.org/t/question-about-cmake-cxx-abi-compiled-flag-variable/1976)

<div class="topic-metadata">

**Author:** [@marchani](https://discourse.cmake.org/u/marchani)\
**Replies:** 2\
**Last updated:** [November 25, 2020, 12:06pm UTC](https://discourse.cmake.org/t/question-about-cmake-cxx-abi-compiled-flag-variable/1976 "2020-11-25T12:06:05Z")

</div>

I am attempting to cross-compile gRPC (https://github.com/grpc/grpc) from Windows to Linux as a third-party dependency using CMake and the Clang compiler, and I am also attempting to link to a pre-compiled version of lib…

---

## [Mechanisms for grouping targets, labels or otherwise?](https://discourse.cmake.org/t/mechanisms-for-grouping-targets-labels-or-otherwise/1941)

<div class="topic-metadata">

**Author:** [@mikepurvis](https://discourse.cmake.org/u/mikepurvis)\
**Replies:** 3\
**Last updated:** [November 25, 2020, 3:57am UTC](https://discourse.cmake.org/t/mechanisms-for-grouping-targets-labels-or-otherwise/1941 "2020-11-25T03:57:42Z")

</div>

Greetings CMake users— I’m a long-time CMake user via the ROS (Robot Operating System) community. It’s been interesting to watch over time as certain features which were initially implemented in the ROS 1 buildsystem are…

---

## [CUDA and CXX compiler - how to distinguish?](https://discourse.cmake.org/t/cuda-and-cxx-compiler-how-to-distinguish/1990)

<div class="topic-metadata">

**Author:** [@hkhauke](https://discourse.cmake.org/u/hkhauke)\
**Replies:** 3\
**Last updated:** [November 25, 2020, 12:00am UTC](https://discourse.cmake.org/t/cuda-and-cxx-compiler-how-to-distinguish/1990 "2020-11-25T00:00:29Z")

</div>

Hi, I use the latest options to integrate CUDA and CPP code in one library by setting enable\_language(CUDA). In my project, I apply typical options supported by CMAKE such as POSITION\_INDEPENDENT\_CODE which is nicely in…

---

## [Nsight-not-hitting-breakpoint-in-cmake-project](https://discourse.cmake.org/t/nsight-not-hitting-breakpoint-in-cmake-project/1964)

<div class="topic-metadata">

**Author:** [@Vahdaneh](https://discourse.cmake.org/u/Vahdaneh)\
**Replies:** 1\
**Last updated:** [November 24, 2020, 11:51pm UTC](https://discourse.cmake.org/t/nsight-not-hitting-breakpoint-in-cmake-project/1964 "2020-11-24T23:51:38Z")

</div>

Hello, I am trying to run one of the cuda\_sample files (V.11) by using CMake. However, GPU breakpoints are not working for me with CMake 3.18/VS2017/Nsight 2020.1. In my CMakeLists.txt, I use set(CUDA\_NVCC\_FLAGS\_DEBUG …

---

## [Problem with TI-C compiler](https://discourse.cmake.org/t/problem-with-ti-c-compiler/1943)

<div class="topic-metadata">

**Author:** [@AryKno](https://discourse.cmake.org/u/AryKno)\
**Replies:** 1\
**Last updated:** [November 24, 2020, 11:44pm UTC](https://discourse.cmake.org/t/problem-with-ti-c-compiler/1943 "2020-11-24T23:44:06Z")

</div>

Hello ! I am trying to build an executable with the TI-C compiler (TI v20.2.2.LTS precisely) to cross-compile for an ARM microcontroller. The compiler step is working properly, all the object files are generated. At t…

---

## [How to compile cmake on linux server?](https://discourse.cmake.org/t/how-to-compile-cmake-on-linux-server/2188)

<div class="topic-metadata">

**Author:** [@Ashish\_K](https://discourse.cmake.org/u/Ashish_K)\
**Replies:** 17\
**Last updated:** [November 24, 2020, 3:08pm UTC](https://discourse.cmake.org/t/how-to-compile-cmake-on-linux-server/2188 "2020-11-24T15:08:54Z")

</div>

I want to compile cmake in my working folder on one of the super computing facility. I am not sure how to compile it in my working directory. Can anyone please help me in this regard? – Ashish

---

## [\[cxx feature check\] what satisfies GNU\_POSIX\_REGEX | POSIX\_REGEX?](https://discourse.cmake.org/t/cxx-feature-check-what-satisfies-gnu-posix-regex-posix-regex/2218)

<div class="topic-metadata">

**Author:** [@\_0.z](https://discourse.cmake.org/u/_0.z)\
**Replies:** 2\
**Last updated:** [November 23, 2020, 4:06pm UTC](https://discourse.cmake.org/t/cxx-feature-check-what-satisfies-gnu-posix-regex-posix-regex/2218 "2020-11-23T16:06:14Z")

</div>

trying to compile llvm 11 from source with cmake 3.19, former pulling in Google’s benchmarking https://github.com/google/benchmark/blob/master/CMakeLists.txt#L263 which tests for GNU\_POSIX\_REGEX POSIX\_REGEX and the te…

---

## [can you give me cmakelist.txt for nodejs source code?](https://discourse.cmake.org/t/can-you-give-me-cmakelist-txt-for-nodejs-source-code/1915)

<div class="topic-metadata">

**Author:** [@anlexN](https://discourse.cmake.org/u/anlexN)\
**Replies:** 1\
**Last updated:** [November 22, 2020, 7:46pm UTC](https://discourse.cmake.org/t/can-you-give-me-cmakelist-txt-for-nodejs-source-code/1915 "2020-11-22T19:46:33Z")

</div>

nodejs jetbrain clion ide need it to open nodejs source code correctly. nodejs team now can not give it and need some talking.so you cmake please help me.

---

## [Not finding BLAS libraries](https://discourse.cmake.org/t/not-finding-blas-libraries/1862)

<div class="topic-metadata">

**Author:** [@afernandezody](https://discourse.cmake.org/u/afernandezody)\
**Replies:** 1\
**Last updated:** [November 22, 2020, 7:15pm UTC](https://discourse.cmake.org/t/not-finding-blas-libraries/1862 "2020-11-22T19:15:48Z")

</div>

Hello, This might be a basic issue but cmake is not able to find BLAS for some reason. The system is running CentOS8 and spitting out the error: … – Trying to figure out … – Compiler: GNU – libstdc++/C++ compiler v…

---

## [Using CMake with Ninja and MSVC on Cygwin's Mintty terminal.](https://discourse.cmake.org/t/using-cmake-with-ninja-and-msvc-on-cygwins-mintty-terminal/1722)

<div class="topic-metadata">

**Author:** [@underdisc](https://discourse.cmake.org/u/underdisc)\
**Replies:** 6\
**Last updated:** [November 20, 2020, 7:08pm UTC](https://discourse.cmake.org/t/using-cmake-with-ninja-and-msvc-on-cygwins-mintty-terminal/1722 "2020-11-20T19:08:34Z")

</div>

Sorry in advance because this is a little long, but I have been trying to get this to work for about a week now with no luck. I have come pretty far, but there are still a few problems preventing me from finishing this. …

---

## [AUTORCC](https://discourse.cmake.org/t/autorcc/2179)

<div class="topic-metadata">

**Author:** [@Smirnov\_Kirill\_Contr](https://discourse.cmake.org/u/Smirnov_Kirill_Contr)\
**Replies:** 5\
**Last updated:** [November 18, 2020, 4:26pm UTC](https://discourse.cmake.org/t/autorcc/2179 "2020-11-18T16:26:06Z")

</div>

Hello There is a project on Qt5.6.2 / CMake With CMake 3.9.2 on windows and CMake 3.10.2 on Linux project builds with no problem Automatic MOC, UIC and RCC for target SomeLibrary When CMake was updated to 3.18.4 (o…

---

## [Verifying Fortran/C Compiler Fails](https://discourse.cmake.org/t/verifying-fortran-c-compiler-fails/2183)

<div class="topic-metadata">

**Author:** [@RonRahaman](https://discourse.cmake.org/u/RonRahaman)\
**Replies:** 5\
**Last updated:** [November 18, 2020, 3:52pm UTC](https://discourse.cmake.org/t/verifying-fortran-c-compiler-fails/2183 "2020-11-18T15:52:32Z")

</div>

Hi all, FortranCInterface\_VERIFY isn’t working on my Mac after an OS and compiler updates. I’m running on macOS 11 with gcc-10 from Homebrew and cmake 18. I’m getting these errors in stdout (let me know if you want to …

---

## [Linux cross-compile x64 to aarch64](https://discourse.cmake.org/t/linux-cross-compile-x64-to-aarch64/1752)

<div class="topic-metadata">

**Author:** [@Frederick\_Gotham](https://discourse.cmake.org/u/Frederick_Gotham)\
**Replies:** 6\
**Last updated:** [November 17, 2020, 3:22pm UTC](https://discourse.cmake.org/t/linux-cross-compile-x64-to-aarch64/1752 "2020-11-17T15:22:08Z")

</div>

Unless anyone can convince me of otherwise, I’ve given up on cmake being able to cross-compile on Linux from x64 to aarch64. I started this topic about it earlier on a C group: https://groups.google.com/forum/#!topic/c…

---

## [cmake 3.8 and higher for debian stretch](https://discourse.cmake.org/t/cmake-3-8-and-higher-for-debian-stretch/223)

<div class="topic-metadata">

**Author:** [@graeme61](https://discourse.cmake.org/u/graeme61)\
**Replies:** 13\
**Last updated:** [November 17, 2020, 2:03pm UTC](https://discourse.cmake.org/t/cmake-3-8-and-higher-for-debian-stretch/223 "2020-11-17T14:03:42Z")

</div>

Have cmake 3.7.2 on linux. A piece of software im trying to run requires 3.8.0 and above . If i use apt-get install ,it installs the same version. How can i upgrade cmake for the debian stretch or is the debian versio…

---

## [find\_package(JNI) not able to find JNI (cmake v 3.17)](https://discourse.cmake.org/t/find-package-jni-not-able-to-find-jni-cmake-v-3-17/2075)

<div class="topic-metadata">

**Author:** [@yisseamake](https://discourse.cmake.org/u/yisseamake)\
**Replies:** 3\
**Last updated:** [November 17, 2020, 2:25am UTC](https://discourse.cmake.org/t/find-package-jni-not-able-to-find-jni-cmake-v-3-17/2075 "2020-11-17T02:25:04Z")

</div>

I am getting error indicating failure to find JNI package while it is installed correctly in pretty standard location /opt/jdk/jdk8 (ubuntu 14.04, e.g /opt/jdk/jdk8/jre/lib/amd64/server/libjvm.so ) and JAVA\_HOME variabl…

---

## [cannot link to dynamic library during parallel build](https://discourse.cmake.org/t/cannot-link-to-dynamic-library-during-parallel-build/1685)

<div class="topic-metadata">

**Author:** [@sandy-lcq](https://discourse.cmake.org/u/sandy-lcq)\
**Replies:** 2\
**Last updated:** [November 17, 2020, 2:19am UTC](https://discourse.cmake.org/t/cannot-link-to-dynamic-library-during-parallel-build/1685 "2020-11-17T02:19:13Z")

</div>

I met a compile fail problem, which is caused by parallel build. Please see this bug report for detail: https://bugs.llvm.org/show\_bug.cgi?id=46617 how can I fix this in CMakeList.txt? I have explicitly change targ…

---

## [How to get pseudo-target information when wrapping CMake](https://discourse.cmake.org/t/how-to-get-pseudo-target-information-when-wrapping-cmake/1737)

<div class="topic-metadata">

**Author:** [@lacasseio](https://discourse.cmake.org/u/lacasseio)\
**Replies:** 3\
**Last updated:** [November 16, 2020, 2:51pm UTC](https://discourse.cmake.org/t/how-to-get-pseudo-target-information-when-wrapping-cmake/1737 "2020-11-16T14:51:16Z")

</div>

The file-api’s codemodel allows gathering information about targets but explicitly exclude INTERFACE libraries: A JSON array of entries corresponding to the build system targets. Such targets are created by calls to ad…

---

## [Suggestions for getting crc32c library working with CMAKE\_OSX\_ARCHITECTURES](https://discourse.cmake.org/t/suggestions-for-getting-crc32c-library-working-with-cmake-osx-architectures/1794)

<div class="topic-metadata">

**Author:** [@hjmallon](https://discourse.cmake.org/u/hjmallon)\
**Replies:** 3\
**Last updated:** [November 16, 2020, 10:47am UTC](https://discourse.cmake.org/t/suggestions-for-getting-crc32c-library-working-with-cmake-osx-architectures/1794 "2020-11-16T10:47:46Z")

</div>

Google’s crc32c library is pretty small and gives good performing crc32c implementations for arm and intel https://github.com/google/crc32c It currently builds for Intel (everywhere) and arm on linux. My PR here gets it…

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

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