# Latest

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

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

**Page:** 204

---

## [build issue with libmetal package](https://discourse.cmake.org/t/build-issue-with-libmetal-package/700)

<div class="topic-metadata">

**Author:** [@biswajit](https://discourse.cmake.org/u/biswajit)\
**Replies:** 1\
**Last updated:** [February 28, 2020, 8:33pm UTC](https://discourse.cmake.org/t/build-issue-with-libmetal-package/700 "2020-02-28T20:33:25Z")

</div>

Hi , I am trying to cross compile the libmetal\_v2\_0 package using cmake on linux. while building i am getting error like : error: ‘METAL\_MUTEX\_INIT’ undeclared (first use in this function); did you mean ‘METAL\_LOG\_IN…

---

## [how to remove substring/suffix using generator expressions](https://discourse.cmake.org/t/how-to-remove-substring-suffix-using-generator-expressions/701)

<div class="topic-metadata">

**Author:** [@mmoelle1](https://discourse.cmake.org/u/mmoelle1)\
**Replies:** 6\
**Last updated:** [February 28, 2020, 8:32pm UTC](https://discourse.cmake.org/t/how-to-remove-substring-suffix-using-generator-expressions/701 "2020-02-28T20:32:25Z")

</div>

Assume that I have the expression “/home/user/foo.bar” as the result of a generator-expression and I would like to remove the suffix “.bar”. In practice, the first expression is the full path to an object file and the se…

---

## [Pull a custom target to earlier in the parallel build](https://discourse.cmake.org/t/pull-a-custom-target-to-earlier-in-the-parallel-build/703)

<div class="topic-metadata">

**Author:** [@Lance\_E\_T\_Compte](https://discourse.cmake.org/u/Lance_E_T_Compte)\
**Replies:** 3\
**Last updated:** [February 28, 2020, 8:31pm UTC](https://discourse.cmake.org/t/pull-a-custom-target-to-earlier-in-the-parallel-build/703 "2020-02-28T20:31:02Z")

</div>

I’ve a project with about 3500 targets, building with ninja in parallel on machines with between 4 and 8 cores. One of these targets takes quite a long time, and that slows the entire build, since, for whatever reason, …

---

## [warnings in the configure process](https://discourse.cmake.org/t/warnings-in-the-configure-process/705)

<div class="topic-metadata">

**Author:** [@ORI\_HECHT](https://discourse.cmake.org/u/ORI_HECHT)\
**Replies:** 1\
**Last updated:** [February 28, 2020, 8:18pm UTC](https://discourse.cmake.org/t/warnings-in-the-configure-process/705 "2020-02-28T20:18:42Z")

</div>

I am getting the following warning when configuring a project that compiles C++ files from different directories - source directory … has no common path with … What importance is there in this warning? How can I su…

---

## [\`install()\`-ing a static library also requires installing an internal object library?](https://discourse.cmake.org/t/install-ing-a-static-library-also-requires-installing-an-internal-object-library/683)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 5\
**Last updated:** [February 28, 2020, 8:17pm UTC](https://discourse.cmake.org/t/install-ing-a-static-library-also-requires-installing-an-internal-object-library/683 "2020-02-28T20:17:58Z")

</div>

I have two directories, src and src/runtime, which each contain their own CMakeLists.txt. src contains my main target. runtime contains a large number of files which are (in a series of steps) transformed into .cpp files…

---

## [compile\_commands, great, why is there no link\_commands](https://discourse.cmake.org/t/compile-commands-great-why-is-there-no-link-commands/698)

<div class="topic-metadata">

**Author:** [@Lieven](https://discourse.cmake.org/u/Lieven)\
**Replies:** 2\
**Last updated:** [February 28, 2020, 8:16pm UTC](https://discourse.cmake.org/t/compile-commands-great-why-is-there-no-link-commands/698 "2020-02-28T20:16:43Z")

</div>

by specifying “CMAKE\_EXPORT\_COMPILE\_COMMANDS” one can obtain the json compilation database, which can be used for many aspects (tools, but also manual inspection to check with which options a certain file got compiled). …

---

## [Question about internal headers and idiomatic CMake use](https://discourse.cmake.org/t/question-about-internal-headers-and-idiomatic-cmake-use/668)

<div class="topic-metadata">

**Author:** [@Michael\_K](https://discourse.cmake.org/u/Michael_K)\
**Replies:** 1\
**Last updated:** [February 28, 2020, 7:44pm UTC](https://discourse.cmake.org/t/question-about-internal-headers-and-idiomatic-cmake-use/668 "2020-02-28T19:44:44Z")

</div>

Hey, I’m quite new to CMake and try make a project with CMake. I need some hints / suggestions on how to make this as easy and as idiomatic as possible (so not to burden possible future users with bad CMake code). My pr…

---

## [CMAKE\_CONFIGURE\_DEPENDS with newly created file](https://discourse.cmake.org/t/cmake-configure-depends-with-newly-created-file/663)

<div class="topic-metadata">

**Author:** [@Leherenn](https://discourse.cmake.org/u/Leherenn)\
**Replies:** 1\
**Last updated:** [February 28, 2020, 7:40pm UTC](https://discourse.cmake.org/t/cmake-configure-depends-with-newly-created-file/663 "2020-02-28T19:40:51Z")

</div>

I have some code that is auto generated externally using another script. Let’s say this generated in resources. In there, there is a “README.TXT” file with the generation timestamp, so the file changes every time the ge…

---

## [Assembler errors: unrecognized opcode:func\_export / unsupported relocation against r3](https://discourse.cmake.org/t/assembler-errors-unrecognized-opcode-func-export-unsupported-relocation-against-r3/722)

<div class="topic-metadata">

**Author:** [@Mike432](https://discourse.cmake.org/u/Mike432)\
**Replies:** 0\
**Last updated:** [February 27, 2020, 7:45pm UTC](https://discourse.cmake.org/t/assembler-errors-unrecognized-opcode-func-export-unsupported-relocation-against-r3/722 "2020-02-27T19:45:28Z")

</div>

I’m getting CMake assembler errors such as: testing.s:137: Error: unrecognized opcode: ‘func\_export(testing)’ testing.s:146: Error: unrecognized opcode: ‘func\_begin(testing)’ testing.s:217: Error: unrecognized opcode…

---

## [alternative commands for windows](https://discourse.cmake.org/t/alternative-commands-for-windows/666)

<div class="topic-metadata">

**Author:** [@forbi\_11342](https://discourse.cmake.org/u/forbi_11342)\
**Replies:** 1\
**Last updated:** [February 28, 2020, 7:11pm UTC](https://discourse.cmake.org/t/alternative-commands-for-windows/666 "2020-02-28T19:11:42Z")

</div>

Hi, what would be the alternative of these commands $ cmake . $ make $ sudo make install for x86 Native Tools Command Prompt for VS 2019 ? cmake . works fine, but from the next I get the error that the command is …

---

## [Why can't I call an assembly program from C++? I'm getting errors.](https://discourse.cmake.org/t/why-cant-i-call-an-assembly-program-from-c-im-getting-errors/709)

<div class="topic-metadata">

**Author:** [@Mike432](https://discourse.cmake.org/u/Mike432)\
**Replies:** 1\
**Last updated:** [February 26, 2020, 9:08pm UTC](https://discourse.cmake.org/t/why-cant-i-call-an-assembly-program-from-c-im-getting-errors/709 "2020-02-26T21:08:38Z")

</div>

Can anyone give me a simple C++ program that calls a simple (but practical) assembly program (I don’t pass parameters)? What I’m currently trying to use is below. I definitely have to have the options required to do thi…

---

## [CMakeTestCXXCompiler fail on GCC 9.2 under Ubuntu 18.04](https://discourse.cmake.org/t/cmaketestcxxcompiler-fail-on-gcc-9-2-under-ubuntu-18-04/725)

<div class="topic-metadata">

**Author:** [@MatthieuHernandez](https://discourse.cmake.org/u/MatthieuHernandez)\
**Replies:** 5\
**Last updated:** [February 28, 2020, 9:49am UTC](https://discourse.cmake.org/t/cmaketestcxxcompiler-fail-on-gcc-9-2-under-ubuntu-18-04/725 "2020-02-28T09:49:11Z")

</div>

I use wsl with Ubuntu 18.04. I upgraded my GCC from version 7 to version 9.2 and now I can no longer compile my project. I have this error message. I also upgraded my cmake version from 3.10 to 3.16.4 cmake -G"Unix Mak…

---

## [How to build a universal 32-bit cmake, like the pre-built one they provide for 64-bit?](https://discourse.cmake.org/t/how-to-build-a-universal-32-bit-cmake-like-the-pre-built-one-they-provide-for-64-bit/390)

<div class="topic-metadata">

**Author:** [@ztarem](https://discourse.cmake.org/u/ztarem)\
**Replies:** 9\
**Last updated:** [February 26, 2020, 4:45am UTC](https://discourse.cmake.org/t/how-to-build-a-universal-32-bit-cmake-like-the-pre-built-one-they-provide-for-64-bit/390 "2020-02-26T04:45:31Z")

</div>

Kitware provides cmake-XXX-Linux-x86\_64.sh, but no 32-bit equivalent. The cmake binary in their archive can run on any combination of 64-bit Linux OS and kernel that I am aware of. I need the same capability for 32-bit …

---

## [Ninja multi-config is overly complex](https://discourse.cmake.org/t/ninja-multi-config-is-overly-complex/684)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 9\
**Last updated:** [February 25, 2020, 12:15pm UTC](https://discourse.cmake.org/t/ninja-multi-config-is-overly-complex/684 "2020-02-25T12:15:46Z")

</div>

After giving the new Ninja Multi-Config generator a spin and trying to wrap my head around its associated documentation, I’m concerned that things are currently more confusing than they should be and that the defaults ar…

---

## [Tool for up-grading CMAKE files from Old to New?](https://discourse.cmake.org/t/tool-for-up-grading-cmake-files-from-old-to-new/696)

<div class="topic-metadata">

**Author:** [@Glen\_Langston](https://discourse.cmake.org/u/Glen_Langston)\
**Replies:** 3\
**Last updated:** [February 24, 2020, 9:59pm UTC](https://discourse.cmake.org/t/tool-for-up-grading-cmake-files-from-old-to-new/696 "2020-02-24T21:59:13Z")

</div>

Hello I very much appreciate using the previous version of CMAKE (in 2019) to build my custom software integrated into GNURADIO. However I’m struggling with the conversion to use the newest version of CMAKE. I feel …

---

## [Re: Tool for up-grading CMAKE files from Old to New?](https://discourse.cmake.org/t/re-tool-for-up-grading-cmake-files-from-old-to-new/697)

<div class="topic-metadata">

**Author:** [@Glen\_Langston](https://discourse.cmake.org/u/Glen_Langston)\
**Replies:** 0\
**Last updated:** [February 24, 2020, 9:47pm UTC](https://discourse.cmake.org/t/re-tool-for-up-grading-cmake-files-from-old-to-new/697 "2020-02-24T21:47:25Z")

</div>

Thank you very much for looking at this issue. Several others working on Gnuradio are reporting similar issues. I will relay your answers the them. Very sorry about my typo. This is the link: https://github.com/WVUR…

---

## [Possible issue with BUILD\_INTERFACE](https://discourse.cmake.org/t/possible-issue-with-build-interface/659)

<div class="topic-metadata">

**Author:** [@apaolillo](https://discourse.cmake.org/u/apaolillo)\
**Replies:** 4\
**Last updated:** [February 24, 2020, 8:48pm UTC](https://discourse.cmake.org/t/possible-issue-with-build-interface/659 "2020-02-24T20:48:42Z")

</div>

Hello dear CMake community, I’m very new to this forum, so I don’t really know if this is the right place to post such a message. I may have accidentally found an issue in CMake, so I’ll post it here in order to discus…

---

## [how to get the temporary install directory used by CPackDeb ?](https://discourse.cmake.org/t/how-to-get-the-temporary-install-directory-used-by-cpackdeb/692)

<div class="topic-metadata">

**Author:** [@Ubiquite](https://discourse.cmake.org/u/Ubiquite)\
**Replies:** 1\
**Last updated:** [February 24, 2020, 4:15pm UTC](https://discourse.cmake.org/t/how-to-get-the-temporary-install-directory-used-by-cpackdeb/692 "2020-02-24T16:15:06Z")

</div>

Hi all I need to run a command with install(CODE “…”) when generating my .deb with make package. For this command I need to know the path of the temporary install made by cpack. It seems to be in \_CPack\_Packages/Linux…

---

## [CMake Error at cmake/include/tools.cmake:420 (MESSAGE):](https://discourse.cmake.org/t/cmake-error-at-cmake-include-tools-cmake-420-message/690)

<div class="topic-metadata">

**Author:** [@Konstantin](https://discourse.cmake.org/u/Konstantin)\
**Replies:** 1\
**Last updated:** [February 24, 2020, 2:29pm UTC](https://discourse.cmake.org/t/cmake-error-at-cmake-include-tools-cmake-420-message/690 "2020-02-24T14:29:44Z")

</div>

Hello, Let me describe my problem briefly. I’m trying to build a project according to the instructions from here: I use these tools \[root@dr-npdexp01 ~\]# cmake --version cmake version 3.16.4 CMake suite maintain…

---

## [MSVC Flag /TP is set on a C target when added as a subdirectory](https://discourse.cmake.org/t/msvc-flag-tp-is-set-on-a-c-target-when-added-as-a-subdirectory/680)

<div class="topic-metadata">

**Author:** [@Cojosh](https://discourse.cmake.org/u/Cojosh)\
**Replies:** 2\
**Last updated:** [February 24, 2020, 2:28pm UTC](https://discourse.cmake.org/t/msvc-flag-tp-is-set-on-a-c-target-when-added-as-a-subdirectory/680 "2020-02-24T14:28:27Z")

</div>

Hi, I am currently unable to add a static c library (among other c++ targets) with add\_subdirectory as cmake seems to set /TP (c++ mode) causing the compile to fail, even when explicitly setting LANGUAGE and LINKER\_LANG…

---

## [How to add \*.dll or \*.lib into project C++ for Cmake of visual studio IDE ?](https://discourse.cmake.org/t/how-to-add-dll-or-lib-into-project-c-for-cmake-of-visual-studio-ide/654)

<div class="topic-metadata">

**Author:** [@Dung\_Le\_Quang](https://discourse.cmake.org/u/Dung_Le_Quang)\
**Replies:** 2\
**Last updated:** [February 24, 2020, 2:11pm UTC](https://discourse.cmake.org/t/how-to-add-dll-or-lib-into-project-c-for-cmake-of-visual-studio-ide/654 "2020-02-24T14:11:35Z")

</div>

---

## [Problem with findpackage(CURL REQUIRED) and precompiled curl 7.68.0 for Windows](https://discourse.cmake.org/t/problem-with-findpackage-curl-required-and-precompiled-curl-7-68-0-for-windows/686)

<div class="topic-metadata">

**Author:** [@Kerstin\_Keller](https://discourse.cmake.org/u/Kerstin_Keller)\
**Replies:** 3\
**Last updated:** [February 24, 2020, 10:41am UTC](https://discourse.cmake.org/t/problem-with-findpackage-curl-required-and-precompiled-curl-7-68-0-for-windows/686 "2020-02-24T10:41:43Z")

</div>

Hi, I am using CMake 3.16.3 and having problems with the provided FindCurl.cmake script. I have unzipped the precompiled version downloaded from the curl website in a given location and set both CMAKE\_PREFIX\_PATH and C…

---

## [use or build](https://discourse.cmake.org/t/use-or-build/675)

<div class="topic-metadata">

**Author:** [@Tomasz](https://discourse.cmake.org/u/Tomasz)\
**Replies:** 2\
**Last updated:** [February 23, 2020, 2:39pm UTC](https://discourse.cmake.org/t/use-or-build/675 "2020-02-23T14:39:02Z")

</div>

Hi I have lib installed in /usr/local/lib. I try to use it as package in other project. I create .cmake file and i put it in appropriate directory. Package was found by cmake but linker error occurred. Is a way in cmake…

---

## [Best way to create multiple binaries](https://discourse.cmake.org/t/best-way-to-create-multiple-binaries/665)

<div class="topic-metadata">

**Author:** [@satrapes](https://discourse.cmake.org/u/satrapes)\
**Replies:** 2\
**Last updated:** [February 22, 2020, 1:27am UTC](https://discourse.cmake.org/t/best-way-to-create-multiple-binaries/665 "2020-02-22T01:27:29Z")

</div>

Hello cmake noob here. I have a project where I would like to build an executable for various products that have different settings. Folder looks a bit like bin (folder where final binaries are stored) e.g. main.0.deb…

---

## [Best practice for exporting libraries my project uses for dependent projects to use when building](https://discourse.cmake.org/t/best-practice-for-exporting-libraries-my-project-uses-for-dependent-projects-to-use-when-building/631)

<div class="topic-metadata">

**Author:** [@cryos](https://discourse.cmake.org/u/cryos)\
**Replies:** 3\
**Last updated:** [February 21, 2020, 8:54pm UTC](https://discourse.cmake.org/t/best-practice-for-exporting-libraries-my-project-uses-for-dependent-projects-to-use-when-building/631 "2020-02-21T20:54:05Z")

</div>

This has come up in the context of Tomviz as a consumer of ParaView/VTK, and as a producer in the context of Avogadro in the past. When we export libraries they often depend on/build upon other libraries. In the case of …

---

## [Are the commands "cmake -build . --target package" and "cpack ." equivalent?](https://discourse.cmake.org/t/are-the-commands-cmake-build-target-package-and-cpack-equivalent/612)

<div class="topic-metadata">

**Author:** [@jwuttke](https://discourse.cmake.org/u/jwuttke)\
**Replies:** 6\
**Last updated:** [February 21, 2020, 3:08pm UTC](https://discourse.cmake.org/t/are-the-commands-cmake-build-target-package-and-cpack-equivalent/612 "2020-02-21T15:08:58Z")

</div>

Are the commands “cmake -build . --target package” and “cpack .” fully equivalent? If yes, why would one ever use the former? (One possible reason I know: Under Windows, cpack is ambiguous, as Chocolatey has an obsolet…

---

## [How to avoid OpenMP RTL mismatch if MKL and OpenMP are used](https://discourse.cmake.org/t/how-to-avoid-openmp-rtl-mismatch-if-mkl-and-openmp-are-used/678)

<div class="topic-metadata">

**Author:** [@ttz](https://discourse.cmake.org/u/ttz)\
**Replies:** 0\
**Last updated:** [February 21, 2020, 11:05am UTC](https://discourse.cmake.org/t/how-to-avoid-openmp-rtl-mismatch-if-mkl-and-openmp-are-used/678 "2020-02-21T11:05:28Z")

</div>

Hello everybody, I stumbled upon a problem which I couldn’t immediately solve by reading the documentation of FindBLAS and FindOpenMP. Maybe someone here has a hint for me. Let’s say I have project which imports an int…

---

## [Definition of "main file" as used in cmake-generator-expressions(7)](https://discourse.cmake.org/t/definition-of-main-file-as-used-in-cmake-generator-expressions-7/649)

<div class="topic-metadata">

**Author:** [@jwuttke](https://discourse.cmake.org/u/jwuttke)\
**Replies:** 4\
**Last updated:** [February 20, 2020, 6:51am UTC](https://discourse.cmake.org/t/definition-of-main-file-as-used-in-cmake-generator-expressions-7/649 "2020-02-20T06:51:18Z")

</div>

Help page cmake-generator-expresions(7), section Target-Dependent Queries, depends heavily on the notion of a “main file”. What is meant by this?

---

## [ModuleNotFound skbuild](https://discourse.cmake.org/t/modulenotfound-skbuild/573)

<div class="topic-metadata">

**Author:** [@lll](https://discourse.cmake.org/u/lll)\
**Replies:** 5\
**Last updated:** [February 19, 2020, 4:30pm UTC](https://discourse.cmake.org/t/modulenotfound-skbuild/573 "2020-02-19T16:30:56Z")

</div>

I have the following error while doing this command on Linux : pip3 install cmake --upgrade. Collecting cmake Using cached https://files.pythonhosted.org/packages/a5/7c/6525cadf99abbabbcb29676f53de0441e8d2f8d0114ab52a…

---

## [Problem using CMake with a NTFS share](https://discourse.cmake.org/t/problem-using-cmake-with-a-ntfs-share/608)

<div class="topic-metadata">

**Author:** [@DavidA](https://discourse.cmake.org/u/DavidA)\
**Replies:** 3\
**Last updated:** [February 18, 2020, 3:28pm UTC](https://discourse.cmake.org/t/problem-using-cmake-with-a-ntfs-share/608 "2020-02-18T15:28:01Z")

</div>

We have a CMake project that builds a C++ executable using Ninja on Linux (using gnu g++). It works fine when running entirely on the build machine’s local filesystem. However, some of our users want to store their pro…

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

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