# Latest

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

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

**Page:** 198

---

## [MKL 64lp versus 64ilp difficulties](https://discourse.cmake.org/t/mkl-64lp-versus-64ilp-difficulties/1223)

<div class="topic-metadata">

**Author:** [@spinicist](https://discourse.cmake.org/u/spinicist)\
**Replies:** 0\
**Last updated:** [May 15, 2020, 10:01am UTC](https://discourse.cmake.org/t/mkl-64lp-versus-64ilp-difficulties/1223 "2020-05-15T10:01:47Z")

</div>

Hello, I’ve been having difficulty with using Eigen and the Intel MKL backend in my project. My CMake version is 3.15.2. For the full details, see here: https://gitlab.com/libeigen/eigen/-/issues/1890 The summary versi…

---

## [Making set(CMAKE\_C\_COMPILER) understand alt sysroot path](https://discourse.cmake.org/t/making-set-cmake-c-compiler-understand-alt-sysroot-path/1219)

<div class="topic-metadata">

**Author:** [@eriols](https://discourse.cmake.org/u/eriols)\
**Replies:** 0\
**Last updated:** [May 14, 2020, 8:23pm UTC](https://discourse.cmake.org/t/making-set-cmake-c-compiler-understand-alt-sysroot-path/1219 "2020-05-14T20:23:08Z")

</div>

Just setting the above fails in my case as it can’t find things like crti.o, which in this particular cross-compilation case are in an unorthodox location. I’m setting the --sysroot path as a manually added flag for the …

---

## [How to use LLVM's IR files as sources](https://discourse.cmake.org/t/how-to-use-llvms-ir-files-as-sources/1202)

<div class="topic-metadata">

**Author:** [@irinayat](https://discourse.cmake.org/u/irinayat)\
**Replies:** 1\
**Last updated:** [May 14, 2020, 7:49pm UTC](https://discourse.cmake.org/t/how-to-use-llvms-ir-files-as-sources/1202 "2020-05-14T19:49:09Z")

</div>

Hello! I need to include a few manually authored LLVM’s IR files into my CMake project. Clang supports mixing bc, ll and cpp files when compiling a binary, however, when I list the bitcode files in add\_executable/add\_lib…

---

## [Functions with sub-options](https://discourse.cmake.org/t/functions-with-sub-options/1206)

<div class="topic-metadata">

**Author:** [@Mellon](https://discourse.cmake.org/u/Mellon)\
**Replies:** 4\
**Last updated:** [May 14, 2020, 7:46pm UTC](https://discourse.cmake.org/t/functions-with-sub-options/1206 "2020-05-14T19:46:15Z")

</div>

Hi all, I’m would like to have a function that works as follows: foo(\<name\> SCHEMA \<path\> \[DEPENDS \<dependency\> ...\] \[SCHEMA \<path\> \[DEPENDS ...\] ...\]) that means, needs at least one SCHEMA with associated optional DE…

---

## [add\_custom\_command at the top level directory](https://discourse.cmake.org/t/add-custom-command-at-the-top-level-directory/1210)

<div class="topic-metadata">

**Author:** [@developer](https://discourse.cmake.org/u/developer)\
**Replies:** 1\
**Last updated:** [May 14, 2020, 10:53am UTC](https://discourse.cmake.org/t/add-custom-command-at-the-top-level-directory/1210 "2020-05-14T10:53:03Z")

</div>

I would like to iterate all my project targets with top level scripts. Then, I would like to add pre-build steps for all of them using add\_custom\_command. I realize that by default in newer versions of cmake this does no…

---

## [Unknown CMake command "SWIG\_ADD\_LIBRARY"](https://discourse.cmake.org/t/unknown-cmake-command-swig-add-library/1208)

<div class="topic-metadata">

**Author:** [@pmchozas](https://discourse.cmake.org/u/pmchozas)\
**Replies:** 2\
**Last updated:** [May 13, 2020, 2:47pm UTC](https://discourse.cmake.org/t/unknown-cmake-command-swig-add-library/1208 "2020-05-13T14:47:31Z")

</div>

Hi, I’m trying to install a python3 library with cmake 3.17 and I get this error all the time. CMake Error at CMakeLists.txt:12 (SWIG\_ADD\_LIBRARY): Unknown CMake command “SWIG\_ADD\_LIBRARY”. I’ve seen that was a common…

---

## [Is there a way to implement a feature similar to CMAKE\_MY\_VAR for setting properties?](https://discourse.cmake.org/t/is-there-a-way-to-implement-a-feature-similar-to-cmake-my-var-for-setting-properties/1196)

<div class="topic-metadata">

**Author:** [@alcroito](https://discourse.cmake.org/u/alcroito)\
**Replies:** 6\
**Last updated:** [May 13, 2020, 12:38pm UTC](https://discourse.cmake.org/t/is-there-a-way-to-implement-a-feature-similar-to-cmake-my-var-for-setting-properties/1196 "2020-05-13T12:38:11Z")

</div>

To disable some compile flags based on a target property, consumers of my library have to do something like the following: find\_package(Mylib) add\_executable(app\_target) target\_link\_libraries(app\_target INTERFACE mylib:…

---

## [CMake not find some QT5 packages](https://discourse.cmake.org/t/cmake-not-find-some-qt5-packages/1167)

<div class="topic-metadata">

**Author:** [@FredMontteiro](https://discourse.cmake.org/u/FredMontteiro)\
**Replies:** 8\
**Last updated:** [May 13, 2020, 11:20am UTC](https://discourse.cmake.org/t/cmake-not-find-some-qt5-packages/1167 "2020-05-13T11:20:38Z")

</div>

Hi friends, I’m using the translator, my English is medium. I am trying to install the Otter browser on Lubuntu via CMake / QT5. I have QT5 installed on /opt/Qt5.14.2 and CMake installed on /home/“user”/cmake-3.17.2-Li…

---

## [Feature Request: New option for file transfer to obtain credentials](https://discourse.cmake.org/t/feature-request-new-option-for-file-transfer-to-obtain-credentials/908)

<div class="topic-metadata">

**Author:** [@oryandunn](https://discourse.cmake.org/u/oryandunn)\
**Replies:** 4\
**Last updated:** [May 13, 2020, 3:53am UTC](https://discourse.cmake.org/t/feature-request-new-option-for-file-transfer-to-obtain-credentials/908 "2020-05-13T03:53:40Z")

</div>

I’m currently using the file command to download dependencies from a server that does not allow anonymous access. On Jenkins, I was able to add credentials and access via environment variables to set them in the command…

---

## [find\_package doesn't look in default suffixes until enabling a language](https://discourse.cmake.org/t/find-package-doesnt-look-in-default-suffixes-until-enabling-a-language/1198)

<div class="topic-metadata">

**Author:** [@AndrewGaspar](https://discourse.cmake.org/u/AndrewGaspar)\
**Replies:** 6\
**Last updated:** [May 12, 2020, 5:35pm UTC](https://discourse.cmake.org/t/find-package-doesnt-look-in-default-suffixes-until-enabling-a-language/1198 "2020-05-12T17:35:51Z")

</div>

Hi, I’ve got a bit of an unusual problem. I have a package that ships a C++ compiler wrapper. And it’s not one of those cheesy compiler wrappers that is just used because nobody knows how packaging works. It’s actually …

---

## [The FindGLEW.cmake module does not set GLEW\_LIBRARIES in some cases](https://discourse.cmake.org/t/the-findglew-cmake-module-does-not-set-glew-libraries-in-some-cases/989)

<div class="topic-metadata">

**Author:** [@geoffmcl](https://discourse.cmake.org/u/geoffmcl)\
**Replies:** 13\
**Last updated:** [May 12, 2020, 3:42pm UTC](https://discourse.cmake.org/t/the-findglew-cmake-module-does-not-set-glew-libraries-in-some-cases/989 "2020-05-12T15:42:04Z")

</div>

This is my first post here, and maybe this problem should be posted elsewhere… If the cmake find\_package(GLEW) finds lib/cmake/glew/glew-config.cmake, etc, it FAILS to set GLEW\_LIBRARIES… It does however set GLEW\_LIBRA…

---

## [VS generator and toolchain files](https://discourse.cmake.org/t/vs-generator-and-toolchain-files/1177)

<div class="topic-metadata">

**Author:** [@Lectem](https://discourse.cmake.org/u/Lectem)\
**Replies:** 2\
**Last updated:** [May 11, 2020, 5:54pm UTC](https://discourse.cmake.org/t/vs-generator-and-toolchain-files/1177 "2020-05-11T17:54:54Z")

</div>

I was trying to use the Emscripten.cmake toolchain file with the Visual Studio generator, but it seems it still tries to use CL.exe and LINK.exe. Is this a limitation of the generator? It works fine with make and ninja. …

---

## [Pass argument directly to the compiler](https://discourse.cmake.org/t/pass-argument-directly-to-the-compiler/1181)

<div class="topic-metadata">

**Author:** [@developer](https://discourse.cmake.org/u/developer)\
**Replies:** 3\
**Last updated:** [May 11, 2020, 5:24pm UTC](https://discourse.cmake.org/t/pass-argument-directly-to-the-compiler/1181 "2020-05-11T17:24:58Z")

</div>

Effectively, I want to pass the actual compiler as an argument to my stub compiler. Having the CMAKE\_CXX\_COMPILER variable set by a toolchain file previously, I would like to do set(CMAKE\_CXX\_COMPILER "/usr/bin/imposte…

---

## [CMake Duplicating Debug Library and not including normal library](https://discourse.cmake.org/t/cmake-duplicating-debug-library-and-not-including-normal-library/1174)

<div class="topic-metadata">

**Author:** [@jasperswallen](https://discourse.cmake.org/u/jasperswallen)\
**Replies:** 7\
**Last updated:** [May 11, 2020, 4:41pm UTC](https://discourse.cmake.org/t/cmake-duplicating-debug-library-and-not-including-normal-library/1174 "2020-05-11T16:41:48Z")

</div>

Hi! I’m experiencing some strange behavior with CMake’s Visual Studio makefile generator. I have a project that includes Python3’s libraries through the normal methods, and it successfully finds both the debug and norma…

---

## [Static libraries and loadable modules](https://discourse.cmake.org/t/static-libraries-and-loadable-modules/1176)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 1\
**Last updated:** [May 11, 2020, 4:39pm UTC](https://discourse.cmake.org/t/static-libraries-and-loadable-modules/1176 "2020-05-11T16:39:10Z")

</div>

I am working on a library with a plugin system that currently works by having a plugin register itself on load. An app links with this library, as does the plugin. When BUILD\_SHARED\_LIBS=ON, the plugin loads correctly, b…

---

## [Extra HTTP headers for \`file(UPLOAD|DOWNLOAD)\`](https://discourse.cmake.org/t/extra-http-headers-for-file-upload-download/1152)

<div class="topic-metadata">

**Author:** [@zaufi](https://discourse.cmake.org/u/zaufi)\
**Replies:** 7\
**Last updated:** [May 11, 2020, 1:04pm UTC](https://discourse.cmake.org/t/extra-http-headers-for-file-upload-download/1152 "2020-05-11T13:04:48Z")

</div>

Hi, Sometimes doing HTTP operations it’s required to provide some extra headers. For example, talking to JFrog Artifactory requires the X-JFrog-Art-Api header w/ API key. I propose to add EXTRA\_HEADERS \<string\>... name…

---

## [Install CMake on Mint](https://discourse.cmake.org/t/install-cmake-on-mint/997)

<div class="topic-metadata">

**Author:** [@Wilmar](https://discourse.cmake.org/u/Wilmar)\
**Replies:** 23\
**Last updated:** [May 11, 2020, 3:09am UTC](https://discourse.cmake.org/t/install-cmake-on-mint/997 "2020-05-11T03:09:18Z")

</div>

I had installed CMake on Mint, I guess. When I execute it notthing happens! Even a negative message appear! Someone could help me?

---

## [What is the proper way of using IMPORTED\_TARGET](https://discourse.cmake.org/t/what-is-the-proper-way-of-using-imported-target/1156)

<div class="topic-metadata">

**Author:** [@yisseamake](https://discourse.cmake.org/u/yisseamake)\
**Replies:** 3\
**Last updated:** [May 10, 2020, 2:10pm UTC](https://discourse.cmake.org/t/what-is-the-proper-way-of-using-imported-target/1156 "2020-05-10T14:10:57Z")

</div>

Following up on the What is the proper way to use FindPkgConfig and FindPkgConfighttps://cmake.org/cmake/help/v3.17/module/FindPkgConfig.html?highlight=pkg\_search\_module#command:pkg\_search\_module Could you please advis…

---

## [CMAKE\_FIND\_DEBUG\_MODE is not enabling debug output of find\_ command](https://discourse.cmake.org/t/cmake-find-debug-mode-is-not-enabling-debug-output-of-find-command/1157)

<div class="topic-metadata">

**Author:** [@yisseamake](https://discourse.cmake.org/u/yisseamake)\
**Replies:** 3\
**Last updated:** [May 10, 2020, 6:21am UTC](https://discourse.cmake.org/t/cmake-find-debug-mode-is-not-enabling-debug-output-of-find-command/1157 "2020-05-10T06:21:39Z")

</div>

I tried to use set(CMAKE\_FIND\_DEBUG\_MODE TRUE) find\_xxx set(CMAKE\_FIND\_DEBUG\_MODE FALSE) and it was working for several runs with find\_path, find\_package, find\_jar. However after several runs I see no effect on find\_…

---

## [Encapsulating Link Arguments](https://discourse.cmake.org/t/encapsulating-link-arguments/1171)

<div class="topic-metadata">

**Author:** [@stefansjs](https://discourse.cmake.org/u/stefansjs)\
**Replies:** 1\
**Last updated:** [May 9, 2020, 1:23pm UTC](https://discourse.cmake.org/t/encapsulating-link-arguments/1171 "2020-05-09T13:23:03Z")

</div>

Hey CMake community, I’m trying to figure out how to encapsulate linker flags in one of the subdirectories of my cmake project. Is there a way for be to set link flags on a target so that when it is linked against, thos…

---

## [CMAKE\_DL\_LIBS](https://discourse.cmake.org/t/cmake-dl-libs/1159)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 4\
**Last updated:** [May 8, 2020, 8:16am UTC](https://discourse.cmake.org/t/cmake-dl-libs/1159 "2020-05-08T08:16:27Z")

</div>

What is the intended way of using CMAKE\_DL\_LIBS? Unlike most libraries in CMake, there doesn’t seem to be an imported target for it. In particular, if I have a library that has an interface dependency on CMAKE\_DL\_LIBS o…

---

## [how to find\_jar for external .jar file](https://discourse.cmake.org/t/how-to-find-jar-for-external-jar-file/1137)

<div class="topic-metadata">

**Author:** [@yisseamake](https://discourse.cmake.org/u/yisseamake)\
**Replies:** 12\
**Last updated:** [May 7, 2020, 3:58pm UTC](https://discourse.cmake.org/t/how-to-find-jar-for-external-jar-file/1137 "2020-05-07T15:58:36Z")

</div>

Could you please advise why the following is not working. find\_package(Java COMPONENTS Development) include(UseJava) set(MY\_JAR\_PACKAGE\_INCLUDE\_DIR “${CMAKE\_SOURCE\_DIR}/mvngened”) find\_jar(myJavaJar, ext.jar NAMES …

---

## [Tutorial Step 5: log and exp not found](https://discourse.cmake.org/t/tutorial-step-5-log-and-exp-not-found/636)

<div class="topic-metadata">

**Author:** [@IronMoose](https://discourse.cmake.org/u/IronMoose)\
**Replies:** 7\
**Last updated:** [May 7, 2020, 7:10pm UTC](https://discourse.cmake.org/t/tutorial-step-5-log-and-exp-not-found/636 "2020-05-07T19:10:59Z")

</div>

Hello. I’m a bit stuck on step 5 of the CMake tutorial. Specifically, when I build the project I get: Looking for log Looking for log - not found Looking for exp Looking for exp - not found Configuring done Generat…

---

## [cmake -D \<var\>:\<type\>=\<value\>](https://discourse.cmake.org/t/cmake-d-var-type-value/1135)

<div class="topic-metadata">

**Author:** [@David\_Dixon](https://discourse.cmake.org/u/David_Dixon)\
**Replies:** 2\
**Last updated:** [May 7, 2020, 5:00pm UTC](https://discourse.cmake.org/t/cmake-d-var-type-value/1135 "2020-05-07T17:00:07Z")

</div>

As far as I can recall, I have only passed command line arguments to cmake with cmake -D \<var\>=\<value\>. However, I just discovered that people on my team do the following cmake -D \<var\>:\<type\>=\<value\>. I knew that this f…

---

## [Can't export top level lib with dependency on subdir lib](https://discourse.cmake.org/t/cant-export-top-level-lib-with-dependency-on-subdir-lib/1084)

<div class="topic-metadata">

**Author:** [@yisseamake](https://discourse.cmake.org/u/yisseamake)\
**Replies:** 22\
**Last updated:** [May 7, 2020, 3:25pm UTC](https://discourse.cmake.org/t/cant-export-top-level-lib-with-dependency-on-subdir-lib/1084 "2020-05-07T15:25:34Z")

</div>

Could you please advise on this issue. I found similar issue to one that has been posted as “Cannot build sub-directory library if top-level CMakeLists.txt call install(EXPORT …)” but was not answered at https://cmake.or…

---

## [CMake 3.17.2 available for download](https://discourse.cmake.org/t/cmake-3-17-2-available-for-download/1162)

<div class="topic-metadata">

**Author:** [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)\
**Replies:** 0\
**Last updated:** [May 7, 2020, 1:15pm UTC](https://discourse.cmake.org/t/cmake-3-17-2-available-for-download/1162 "2020-05-07T13:15:43Z")

</div>

We are pleased to announce that CMake 3.17.2 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! Changes made since 3.17.1: Ale…

---

## [RelWithDebInfo default MSVC flags are pessimising](https://discourse.cmake.org/t/relwithdebinfo-default-msvc-flags-are-pessimising/1160)

<div class="topic-metadata">

**Author:** [@zakalawe](https://discourse.cmake.org/u/zakalawe)\
**Replies:** 0\
**Last updated:** [May 7, 2020, 11:25am UTC](https://discourse.cmake.org/t/relwithdebinfo-default-msvc-flags-are-pessimising/1160 "2020-05-07T11:25:05Z")

</div>

Have discovered a performance regression with Windows builds after switching to RelWithDebInfo (to enable crash reporting) RelWithDebInfo uses /Ob1 whereas Release uses /Ob2 : and for modern C++ code, this is a large pe…

---

## [How to defer to to package's config file when it exists](https://discourse.cmake.org/t/how-to-defer-to-to-packages-config-file-when-it-exists/1154)

<div class="topic-metadata">

**Author:** [@AndrewGaspar](https://discourse.cmake.org/u/AndrewGaspar)\
**Replies:** 1\
**Last updated:** [May 6, 2020, 4:58pm UTC](https://discourse.cmake.org/t/how-to-defer-to-to-packages-config-file-when-it-exists/1154 "2020-05-06T16:58:28Z")

</div>

I have a dependency that now installs a FooConfig.cmake package configuration, but previously I had to provide my own FindFoo.cmake file to find the dependency. I’d like to support older versions of the dependency, too. …

---

## [Gathering transitive shared libraries](https://discourse.cmake.org/t/gathering-transitive-shared-libraries/1100)

<div class="topic-metadata">

**Author:** [@UebelAndre](https://discourse.cmake.org/u/UebelAndre)\
**Replies:** 2\
**Last updated:** [April 25, 2020, 1:45pm UTC](https://discourse.cmake.org/t/gathering-transitive-shared-libraries/1100 "2020-04-25T13:45:46Z")

</div>

How would one go about gathering all the shared libraries (.dll's) for a given target and making sure they’re copied into its runtime/output directory? As an example, see the diagram below. executable ├── shared\_lib ├─…

---

## [CMake Generator Expression IN\_LIST](https://discourse.cmake.org/t/cmake-generator-expression-in-list/1145)

<div class="topic-metadata">

**Author:** [@developer](https://discourse.cmake.org/u/developer)\
**Replies:** 4\
**Last updated:** [May 5, 2020, 3:36pm UTC](https://discourse.cmake.org/t/cmake-generator-expression-in-list/1145 "2020-05-05T15:36:59Z")

</div>

I have the following CMake setup which is not including the sources as expected. (PLATFORM is set to by a toolchain file, note I’m not using CMAKE\_SYSTEM\_NAME because one of my platforms (not listed below) isn’t supporte…

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

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