# Latest

**URL:** https://discourse.cmake.org/latest.md?page=186

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

**Page:** 187

---

## [Cross compilation help](https://discourse.cmake.org/t/cross-compilation-help/1486)

<div class="topic-metadata">

**Author:** [@Arcnor](https://discourse.cmake.org/u/Arcnor)\
**Replies:** 1\
**Last updated:** [November 11, 2020, 3:02pm UTC](https://discourse.cmake.org/t/cross-compilation-help/1486 "2020-11-11T15:02:30Z")

</div>

Hi, I’m trying to use CMake to generate a project for cross compiling for another system (gaming console). The SDK uses MSVC with a property sheet for settings and clang as its compiler. I’ve hacked around to make CMake…

---

## [CMake doesn't change value of all specified cache variables at once](https://discourse.cmake.org/t/cmake-doesnt-change-value-of-all-specified-cache-variables-at-once/1471)

<div class="topic-metadata">

**Author:** [@OntheRocks](https://discourse.cmake.org/u/OntheRocks)\
**Replies:** 1\
**Last updated:** [November 11, 2020, 2:57pm UTC](https://discourse.cmake.org/t/cmake-doesnt-change-value-of-all-specified-cache-variables-at-once/1471 "2020-11-11T14:57:13Z")

</div>

I am trying to build google flatbuffers (https://github.com/google/flatbuffers) in Linux. I need to change the default values of some cache variables after generating the makefile. However to change all of them I need to…

---

## [How is the OSGANIMATION\_LIBRARY\_RELEASE option in the Cmake configuration generated?](https://discourse.cmake.org/t/how-is-the-osganimation-library-release-option-in-the-cmake-configuration-generated/1468)

<div class="topic-metadata">

**Author:** [@mirro187](https://discourse.cmake.org/u/mirro187)\
**Replies:** 1\
**Last updated:** [November 11, 2020, 2:55pm UTC](https://discourse.cmake.org/t/how-is-the-osganimation-library-release-option-in-the-cmake-configuration-generated/1468 "2020-11-11T14:55:24Z")

</div>

It was strange,I did not set this option in findosg. cmake… CMAKE version 3.14.2

---

## [cmake --system-information ignores cross-compilation](https://discourse.cmake.org/t/cmake-system-information-ignores-cross-compilation/1444)

<div class="topic-metadata">

**Author:** [@magnus.grandin](https://discourse.cmake.org/u/magnus.grandin)\
**Replies:** 1\
**Last updated:** [November 11, 2020, 2:51pm UTC](https://discourse.cmake.org/t/cmake-system-information-ignores-cross-compilation/1444 "2020-11-11T14:51:40Z")

</div>

I have been trying to use cmake on the command line with switch --system-information to dump system level information about a given configuration. In particular, I am interested in verifying that certain variables (e.g. …

---

## [Do I need to install IO2D library](https://discourse.cmake.org/t/do-i-need-to-install-io2d-library/1416)

<div class="topic-metadata">

**Author:** [@PaulGureghian](https://discourse.cmake.org/u/PaulGureghian)\
**Replies:** 1\
**Last updated:** [November 11, 2020, 2:46pm UTC](https://discourse.cmake.org/t/do-i-need-to-install-io2d-library/1416 "2020-11-11T14:46:13Z")

</div>

in a specific location so CMake ‘find\_package’ can find it and / or do I need to edit a CMake \_MODULE\_PATH or CMake\_Prefix\_Path file ?

---

## [Performing Test CMAKE\_HAVE\_LIBC\_PTHREAD - Failed](https://discourse.cmake.org/t/performing-test-cmake-have-libc-pthread-failed/1402)

<div class="topic-metadata">

**Author:** [@femifapo](https://discourse.cmake.org/u/femifapo)\
**Replies:** 1\
**Last updated:** [November 11, 2020, 2:43pm UTC](https://discourse.cmake.org/t/performing-test-cmake-have-libc-pthread-failed/1402 "2020-11-11T14:43:26Z")

</div>

Hi, I am trying to build openpose but get stuck with several errors. The first of which is a cmake error mentioned in the title while using “cmake …”. Then I also get this error "CMake Error at cuda\_compile\_1\_generated\_…

---

## [Downloads Page](https://discourse.cmake.org/t/downloads-page/2153)

<div class="topic-metadata">

**Author:** [@Rausch\_Sebastian](https://discourse.cmake.org/u/Rausch_Sebastian)\
**Replies:** 3\
**Last updated:** [November 11, 2020, 1:48pm UTC](https://discourse.cmake.org/t/downloads-page/2153 "2020-11-11T13:48:01Z")

</div>

Hi, you have surely been notified, that the CMake downloads page is currently displaying: “Error establishing a database connection” If not, you are welcome J Viele Grüße Sebastian

---

## [Cmake-gui not detecting top-level project?](https://discourse.cmake.org/t/cmake-gui-not-detecting-top-level-project/2142)

<div class="topic-metadata">

**Author:** [@anon45792294](https://discourse.cmake.org/u/anon45792294)\
**Replies:** 5\
**Last updated:** [November 11, 2020, 11:33am UTC](https://discourse.cmake.org/t/cmake-gui-not-detecting-top-level-project/2142 "2020-11-11T11:33:15Z")

</div>

I’m using cmake 3.19.0-rc1 and I’m currently getting strange behavior from cmake-gui. Here is the code causing the problem: cmake\_minimum\_required(VERSION 3.18) list(APPEND CMAKE\_MODULE\_PATH "${CMAKE\_CURRENT\_SOURCE\_DI…

---

## [CUDA dependency in sub project](https://discourse.cmake.org/t/cuda-dependency-in-sub-project/2144)

<div class="topic-metadata">

**Author:** [@Morteza\_Kianian](https://discourse.cmake.org/u/Morteza_Kianian)\
**Replies:** 1\
**Last updated:** [November 10, 2020, 8:09pm UTC](https://discourse.cmake.org/t/cuda-dependency-in-sub-project/2144 "2020-11-10T20:09:33Z")

</div>

I have a project which is a library that depends on a couple of other libraries (dependencies). The code and CMakeLists.txt for the dependencies are in sub-directories within a directory called depend which contains a CM…

---

## [get\_filename\_component name\_we / name\_wle: what is 'or' ?](https://discourse.cmake.org/t/get-filename-component-name-we-name-wle-what-is-or/1370)

<div class="topic-metadata">

**Author:** [@davemilter](https://discourse.cmake.org/u/davemilter)\
**Replies:** 8\
**Last updated:** [November 10, 2020, 3:09pm UTC](https://discourse.cmake.org/t/get-filename-component-name-we-name-wle-what-is-or/1370 "2020-11-10T15:09:29Z")

</div>

I can not understand documentation of get\_filename\_component . It describes: NAME\_WE = File name without directory or longest extension NAME\_WLE = File name without directory or last extension What does it mean? If…

---

## [What is difference between install, install/local and install/strip?](https://discourse.cmake.org/t/what-is-difference-between-install-install-local-and-install-strip/1329)

<div class="topic-metadata">

**Author:** [@cnruby](https://discourse.cmake.org/u/cnruby)\
**Replies:** 2\
**Last updated:** [November 10, 2020, 2:45pm UTC](https://discourse.cmake.org/t/what-is-difference-between-install-install-local-and-install-strip/1329 "2020-11-10T14:45:24Z")

</div>

I run the following command cd build && ninja help to get these targets \[1/1\] All primary targets available: install/strip: phony install/local: phony install: phony ... What is difference between install, install/lo…

---

## [cmake add\_custom\_command + Xcode: multi output = multi command invocation](https://discourse.cmake.org/t/cmake-add-custom-command-xcode-multi-output-multi-command-invocation/1303)

<div class="topic-metadata">

**Author:** [@davemilter](https://discourse.cmake.org/u/davemilter)\
**Replies:** 1\
**Last updated:** [November 10, 2020, 2:33pm UTC](https://discourse.cmake.org/t/cmake-add-custom-command-xcode-multi-output-multi-command-invocation/1303 "2020-11-10T14:33:26Z")

</div>

cross posting I have custom command that generate several headers at once. All works fine with make/ninja files generated by cmake. But if I generate Xcode project via cmake -GXCode, then instead of once gen.sh was i…

---

## [Propagating CXX flags to out of source projects?](https://discourse.cmake.org/t/propagating-cxx-flags-to-out-of-source-projects/2138)

<div class="topic-metadata">

**Author:** [@mrfirmware](https://discourse.cmake.org/u/mrfirmware)\
**Replies:** 11\
**Last updated:** [November 10, 2020, 12:07pm UTC](https://discourse.cmake.org/t/propagating-cxx-flags-to-out-of-source-projects/2138 "2020-11-10T12:07:12Z")

</div>

I need to propagate some cross-compiler flags like -mcpu down to some lower level libraries that are out of source. Is there “CMake way” to do this or do I need to agree upon some global variable name convention and “pas…

---

## [Inconsistent behaviour of \<PROJECT-NAME\>\_\* Variables defined on PROJECT Command](https://discourse.cmake.org/t/inconsistent-behaviour-of-project-name-variables-defined-on-project-command/1288)

<div class="topic-metadata">

**Author:** [@infohoschie](https://discourse.cmake.org/u/infohoschie)\
**Replies:** 2\
**Last updated:** [November 9, 2020, 9:54pm UTC](https://discourse.cmake.org/t/inconsistent-behaviour-of-project-name-variables-defined-on-project-command/1288 "2020-11-09T21:54:23Z")

</div>

When a Project is defined some project specific variables are set: \<PROJECT-NAME\>\_SOURCE\_DIR \<PROJECT-NAME\>\_BINARY\_DIR \<PROJECT-NAME\>\_VERSION \<PROJECT-NAME\>\_DESCRIPTION The scope of this variables seems to be inconsis…

---

## [Where are Exported Global Variables?](https://discourse.cmake.org/t/where-are-exported-global-variables/1299)

<div class="topic-metadata">

**Author:** [@Grant\_Anderson](https://discourse.cmake.org/u/Grant_Anderson)\
**Replies:** 1\
**Last updated:** [November 9, 2020, 9:50pm UTC](https://discourse.cmake.org/t/where-are-exported-global-variables/1299 "2020-11-09T21:50:34Z")

</div>

Community Gurus: Does anybody know where the “exported global variables” are stored, and how to access them? When I execute this command ’ cmake -G “Eclipse CDT4 - Unix Makefiles” source ’ I see a comment in the genera…

---

## [Feature Request - looping through properties](https://discourse.cmake.org/t/feature-request-looping-through-properties/1284)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 6\
**Last updated:** [November 9, 2020, 9:49pm UTC](https://discourse.cmake.org/t/feature-request-looping-through-properties/1284 "2020-11-09T21:49:24Z")

</div>

it would be really useful when the foreach would not enter NOTFOUND lists. Currently with every list I receive from get\_property I need to check if the property is set. If a property is not set \<var\>-NOTFOUND is receive…

---

## [add dependinfo to custom target](https://discourse.cmake.org/t/add-dependinfo-to-custom-target/1276)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 1\
**Last updated:** [November 9, 2020, 9:39pm UTC](https://discourse.cmake.org/t/add-dependinfo-to-custom-target/1276 "2020-11-09T21:39:29Z")

</div>

When I set an executable: enable\_language(CXX) add\_executable( MyProj\_MyExe2 main.cc ) CMake populates CMAKE\_DEPENDS\_LANGUAGES in DependInfo.cmake: # The set of languages for which implicit dependencies are needed: se…

---

## [how to perform a gcc command by using CMake and make](https://discourse.cmake.org/t/how-to-perform-a-gcc-command-by-using-cmake-and-make/963)

<div class="topic-metadata">

**Author:** [@Lerner](https://discourse.cmake.org/u/Lerner)\
**Replies:** 1\
**Last updated:** [November 9, 2020, 8:50pm UTC](https://discourse.cmake.org/t/how-to-perform-a-gcc-command-by-using-cmake-and-make/963 "2020-11-09T20:50:40Z")

</div>

Hello everyone, I’m trying to create a statically linked lib-curl executable using CMake but I get undefined reference errors when I try to ‘make’ it, although I can successfully compile it with: "gcc -static main.c -o…

---

## [Fail cmake if there are unused variables defined](https://discourse.cmake.org/t/fail-cmake-if-there-are-unused-variables-defined/840)

<div class="topic-metadata">

**Author:** [@shukron](https://discourse.cmake.org/u/shukron)\
**Replies:** 2\
**Last updated:** [November 9, 2020, 8:32pm UTC](https://discourse.cmake.org/t/fail-cmake-if-there-are-unused-variables-defined/840 "2020-11-09T20:32:43Z")

</div>

Hi all! I want make cmake fail if there are some unused variables defined. Currently I do get a warning, but I couldn’t find a way to cause cmake exit with non-zero return value. For example, I want the following invo…

---

## [Automatically detecting generated dependencies](https://discourse.cmake.org/t/automatically-detecting-generated-dependencies/1183)

<div class="topic-metadata">

**Author:** [@chris.olton](https://discourse.cmake.org/u/chris.olton)\
**Replies:** 7\
**Last updated:** [November 9, 2020, 8:25pm UTC](https://discourse.cmake.org/t/automatically-detecting-generated-dependencies/1183 "2020-11-09T20:25:45Z")

</div>

Our project has multiple source files and multiple generated header files (in addition to non-generated header files if that matters). These source files variously depend on these generated header files. How can I get cm…

---

## [get\_prerequisites() tries to resolve system libraries even though advised not to](https://discourse.cmake.org/t/get-prerequisites-tries-to-resolve-system-libraries-even-though-advised-not-to/1148)

<div class="topic-metadata">

**Author:** [@Stephan268](https://discourse.cmake.org/u/Stephan268)\
**Replies:** 1\
**Last updated:** [November 9, 2020, 8:10pm UTC](https://discourse.cmake.org/t/get-prerequisites-tries-to-resolve-system-libraries-even-though-advised-not-to/1148 "2020-11-09T20:10:08Z")

</div>

My cmake file calls get\_prerequisites() with exclude\_system = 1 and recurse = 1 My expectation is that system libraries are not processed, which is what I want because I do not want to include them in the binary pack…

---

## [Wildcards in PATHS or HINTS in find\_file, file\_path, etc.](https://discourse.cmake.org/t/wildcards-in-paths-or-hints-in-find-file-file-path-etc/975)

<div class="topic-metadata">

**Author:** [@e\_ensafi](https://discourse.cmake.org/u/e_ensafi)\
**Replies:** 5\
**Last updated:** [November 9, 2020, 8:07pm UTC](https://discourse.cmake.org/t/wildcards-in-paths-or-hints-in-find-file-file-path-etc/975 "2020-11-09T20:07:44Z")

</div>

Hi, The following seems to work, but as far as I can see, the documentation does not indicate that wildcards are legal: # I have a file called /Path/To/Stuff/Under/Other/Stuff/MyFile.txt SET(MY\_ROOT\_DIR /Path/To/Stuff)…

---

## [Common files used by multiple targets](https://discourse.cmake.org/t/common-files-used-by-multiple-targets/1203)

<div class="topic-metadata">

**Author:** [@vheon](https://discourse.cmake.org/u/vheon)\
**Replies:** 1\
**Last updated:** [November 9, 2020, 7:57pm UTC](https://discourse.cmake.org/t/common-files-used-by-multiple-targets/1203 "2020-11-09T19:57:19Z")

</div>

Hi, I’m trying to port a project from a custom build system that generate Makefile to CMake. I am a novice of CMake but I’m studying :stuck\_out\_tongue: The project builds multiple executable and each executable is build…

---

## [Source doesn't exist yet for target depending on custom target using source generated by add\_custom\_command](https://discourse.cmake.org/t/source-doesnt-exist-yet-for-target-depending-on-custom-target-using-source-generated-by-add-custom-command/1218)

<div class="topic-metadata">

**Author:** [@Smit\_Patil](https://discourse.cmake.org/u/Smit_Patil)\
**Replies:** 1\
**Last updated:** [November 9, 2020, 7:53pm UTC](https://discourse.cmake.org/t/source-doesnt-exist-yet-for-target-depending-on-custom-target-using-source-generated-by-add-custom-command/1218 "2020-11-09T19:53:48Z")

</div>

I am trying to port a meson project to CMake. I have the following subdirectories in my main CMake file: add\_subdirectory(protos) add\_subdirectory(qtlayershell) add\_subdirectory(demo) and the following in protos/CMak…

---

## [CTest library path](https://discourse.cmake.org/t/ctest-library-path/1236)

<div class="topic-metadata">

**Author:** [@abroekhuis](https://discourse.cmake.org/u/abroekhuis)\
**Replies:** 1\
**Last updated:** [November 9, 2020, 7:48pm UTC](https://discourse.cmake.org/t/ctest-library-path/1236 "2020-11-09T19:48:18Z")

</div>

Hi all, I have a working build, in which I have several tests as well. On a specific environment I use a build in which several of the linked libraries are in atypical directories. Using the CMAKE\_FIND\_ROOT\_PATH this is…

---

## [CMake different build output in windows and linux for ARM M0](https://discourse.cmake.org/t/cmake-different-build-output-in-windows-and-linux-for-arm-m0/1233)

<div class="topic-metadata">

**Author:** [@david.reimondez](https://discourse.cmake.org/u/david.reimondez)\
**Replies:** 1\
**Last updated:** [November 9, 2020, 7:46pm UTC](https://discourse.cmake.org/t/cmake-different-build-output-in-windows-and-linux-for-arm-m0/1233 "2020-11-09T19:46:31Z")

</div>

Hi all ! We are using cmake in combination with Ninja and gcc-arm compiler for doing cross-compiling for ARM M0 microcontroller processor. The output of this is an .hex file It is quite interesting that using exactly s…

---

## [Potential regression?: CMake + SWIG not detecting C++ headers as dependencies](https://discourse.cmake.org/t/potential-regression-cmake-swig-not-detecting-c-headers-as-dependencies/2135)

<div class="topic-metadata">

**Author:** [@sir.ferdek](https://discourse.cmake.org/u/sir.ferdek)\
**Replies:** 7\
**Last updated:** [November 9, 2020, 3:49pm UTC](https://discourse.cmake.org/t/potential-regression-cmake-swig-not-detecting-c-headers-as-dependencies/2135 "2020-11-09T15:49:16Z")

</div>

Hello everyone. I am looking for help in either configuring properly my project or determining if this is a bug that should be reported on gitlab. I have prepared a minimalistic project that reproduces the issue (but as…

---

## [TestBigEndian: Performance](https://discourse.cmake.org/t/testbigendian-performance/1248)

<div class="topic-metadata">

**Author:** [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)\
**Replies:** 11\
**Last updated:** [November 9, 2020, 1:24pm UTC](https://discourse.cmake.org/t/testbigendian-performance/1248 "2020-11-09T13:24:49Z")

</div>

TestBigEndian has performance problems. TestBigEndian re-does a lot of work for no good reason. If you have multiple projects checking for Endianness this can add up and eat at the configuration time. The main reason …

---

## [CMake 3.19.0-rc3 is ready for testing](https://discourse.cmake.org/t/cmake-3-19-0-rc3-is-ready-for-testing/2136)

<div class="topic-metadata">

**Author:** [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)\
**Replies:** 0\
**Last updated:** [November 6, 2020, 7:07pm UTC](https://discourse.cmake.org/t/cmake-3-19-0-rc3-is-ready-for-testing/2136 "2020-11-06T19:07:42Z")

</div>

I am proud to announce the third CMake 3.19 release candidate. https://cmake.org/download/ The first two 3.19.0 release candidates included the “cmake\_path()” command. This has been removed in rc3 pending further deve…

---

## [String escaping with target\_compile\_options()](https://discourse.cmake.org/t/string-escaping-with-target-compile-options/2117)

<div class="topic-metadata">

**Author:** [@JoelLinn](https://discourse.cmake.org/u/JoelLinn)\
**Replies:** 2\
**Last updated:** [November 4, 2020, 6:59pm UTC](https://discourse.cmake.org/t/string-escaping-with-target-compile-options/2117 "2020-11-04T18:59:43Z")

</div>

Hi, I need to pass some unorthodox arguments to the compiler, but without having their special characters escaped, like /wd"1234". This works with setting the flags variable globally but not when using target\_compile\_op…

[Previous page](https://discourse.cmake.org/latest.md?page=185)

[Next page](https://discourse.cmake.org/latest.md?page=187)
