# Latest

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

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

**Page:** 202

---

## [How to make a visual studio solution with x64/x86 support?](https://discourse.cmake.org/t/how-to-make-a-visual-studio-solution-with-x64-x86-support/880)

<div class="topic-metadata">

**Author:** [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)\
**Replies:** 8\
**Last updated:** [March 29, 2020, 7:35pm UTC](https://discourse.cmake.org/t/how-to-make-a-visual-studio-solution-with-x64-x86-support/880 "2020-03-29T19:35:34Z")

</div>

Just like the question says I want to create a visual studio solution that supports both x64/x86. Is this possible? Also is it possible to make a singular visual studio solution that supports 2 toolchains?

---

## [How to generate portable rules (add\_custom\_command)?](https://discourse.cmake.org/t/how-to-generate-portable-rules-add-custom-command/876)

<div class="topic-metadata">

**Author:** [@CarloWood](https://discourse.cmake.org/u/CarloWood)\
**Replies:** 2\
**Last updated:** [March 29, 2020, 1:26am UTC](https://discourse.cmake.org/t/how-to-generate-portable-rules-add-custom-command/876 "2020-03-29T01:26:41Z")

</div>

Hi was using the mailinglist before, but was told that is kinda dead and I should be asking here. I’m writing a patch for cmake to address https://gitlab.kitware.com/cmake/cmake/issues/19703 For this I need to generate…

---

## [Custom location for not found library libmpfr.so.4](https://discourse.cmake.org/t/custom-location-for-not-found-library-libmpfr-so-4/877)

<div class="topic-metadata">

**Author:** [@eriols](https://discourse.cmake.org/u/eriols)\
**Replies:** 0\
**Last updated:** [March 27, 2020, 10:01pm UTC](https://discourse.cmake.org/t/custom-location-for-not-found-library-libmpfr-so-4/877 "2020-03-27T22:01:35Z")

</div>

I’m trying to solve the “classic” issue of compiling with gnu 4.4 on Bionic, which means that libmpfr.so.4 is not found and the build fails immediately on the compiler check. However libmpfr is available in a custom loca…

---

## [Can't find fltk library with cmake (ERROR)](https://discourse.cmake.org/t/cant-find-fltk-library-with-cmake-error/867)

<div class="topic-metadata">

**Author:** [@Mrityunjay\_Jha](https://discourse.cmake.org/u/Mrityunjay_Jha)\
**Replies:** 2\
**Last updated:** [March 27, 2020, 11:49am UTC](https://discourse.cmake.org/t/cant-find-fltk-library-with-cmake-error/867 "2020-03-27T11:49:46Z")

</div>

I am not able to link fltk library using cmake script.Here is my CMakeLists.txt file: cmake\_minimum\_required(VERSION 3.16.5) SET(CMake\_C\_Compiler\_Works 1) SET(CMake\_CXX\_Compiler\_Works 1) project(Windows) find\_package( …

---

## [Dynamically generating add\_custom\_command dependencies during build time](https://discourse.cmake.org/t/dynamically-generating-add-custom-command-dependencies-during-build-time/865)

<div class="topic-metadata">

**Author:** [@davis291](https://discourse.cmake.org/u/davis291)\
**Replies:** 2\
**Last updated:** [March 27, 2020, 10:59am UTC](https://discourse.cmake.org/t/dynamically-generating-add-custom-command-dependencies-during-build-time/865 "2020-03-27T10:59:26Z")

</div>

We have a code base that we are trying to convert from autotools to cmake. This project builds both c++ libraries and a python interface. The python interface/module is generated by python scripts during the build using …

---

## [feature request for syntax sugar](https://discourse.cmake.org/t/feature-request-for-syntax-sugar/841)

<div class="topic-metadata">

**Author:** [@Ben\_M](https://discourse.cmake.org/u/Ben_M)\
**Replies:** 4\
**Last updated:** [March 26, 2020, 8:39pm UTC](https://discourse.cmake.org/t/feature-request-for-syntax-sugar/841 "2020-03-26T20:39:14Z")

</div>

Can we get more syntax sugar in cmake? instead of set(x y) allow x = y. For parent scope &x = y for each function that has 1 output parameter, allow it to be specified like so: x = string(REGEX REPLACE ...) when decl…

---

## [RPATH not set, but necessary](https://discourse.cmake.org/t/rpath-not-set-but-necessary/861)

<div class="topic-metadata">

**Author:** [@CodingNickNick](https://discourse.cmake.org/u/CodingNickNick)\
**Replies:** 8\
**Last updated:** [March 26, 2020, 2:44pm UTC](https://discourse.cmake.org/t/rpath-not-set-but-necessary/861 "2020-03-26T14:44:53Z")

</div>

I am linking an imported target against an executable, but the RPATH of the resulting executable is not set up correctly: when I run it, I get the ‘image not found’ error for this library. When I manually set the BUILD\_R…

---

## [Feature request: REQUIRED for all find\_\* functions](https://discourse.cmake.org/t/feature-request-required-for-all-find-functions/862)

<div class="topic-metadata">

**Author:** [@KUGA2](https://discourse.cmake.org/u/KUGA2)\
**Replies:** 2\
**Last updated:** [March 26, 2020, 11:27am UTC](https://discourse.cmake.org/t/feature-request-required-for-all-find-functions/862 "2020-03-26T11:27:17Z")

</div>

find\_package() has the flag REQUIRED. If it is set, the configuration fails when the package cannot be found. I think this flag should be available for all find\_\* functions. This reduces duplicate code like find\_progra…

---

## [CMake cannot find MPI in standard installation path](https://discourse.cmake.org/t/cmake-cannot-find-mpi-in-standard-installation-path/850)

<div class="topic-metadata">

**Author:** [@Crownk](https://discourse.cmake.org/u/Crownk)\
**Replies:** 6\
**Last updated:** [March 25, 2020, 1:07pm UTC](https://discourse.cmake.org/t/cmake-cannot-find-mpi-in-standard-installation-path/850 "2020-03-25T13:07:55Z")

</div>

The following is my CMakeLists.txt file and actually it works well on my server4. However, I tried to configure it on my server3 and then it could not find the MPI package. project(CUDA\_MPI LANGUAGES CXX CUDA) set(CMAK…

---

## [FindBoost difference between Boost\_INCLUDE\_DIR and Boost\_INCLUDE\_DIRS](https://discourse.cmake.org/t/findboost-difference-between-boost-include-dir-and-boost-include-dirs/855)

<div class="topic-metadata">

**Author:** [@MonkeyBreaker](https://discourse.cmake.org/u/MonkeyBreaker)\
**Replies:** 3\
**Last updated:** [March 25, 2020, 12:56pm UTC](https://discourse.cmake.org/t/findboost-difference-between-boost-include-dir-and-boost-include-dirs/855 "2020-03-25T12:56:00Z")

</div>

Hi everyone, Question is about the difference of using Boost\_INCLUDE\_DIR and Boost\_INCLUDE\_DIRS to indicate where boost header files are in the system. As I understood so far from the documentation and from different p…

---

## [How to create reliable command-line configured argument dependencies for custom commands?](https://discourse.cmake.org/t/how-to-create-reliable-command-line-configured-argument-dependencies-for-custom-commands/842)

<div class="topic-metadata">

**Author:** [@airwin](https://discourse.cmake.org/u/airwin)\
**Replies:** 3\
**Last updated:** [March 25, 2020, 11:49am UTC](https://discourse.cmake.org/t/how-to-create-reliable-command-line-configured-argument-dependencies-for-custom-commands/842 "2020-03-25T11:49:24Z")

</div>

I have a build system use case (building the 5 papers that currently describe FreeEOS) where the custom commands that are run to generate plots for the papers have a configurable argument (the name of the PLplot devic…

---

## [Installing CMake package config files for MacOS frameworks](https://discourse.cmake.org/t/installing-cmake-package-config-files-for-macos-frameworks/849)

<div class="topic-metadata">

**Author:** [@vre](https://discourse.cmake.org/u/vre)\
**Replies:** 5\
**Last updated:** [March 24, 2020, 10:26pm UTC](https://discourse.cmake.org/t/installing-cmake-package-config-files-for-macos-frameworks/849 "2020-03-24T22:26:56Z")

</div>

I created a versioned MacOS framework with CMake and stumbled over the question where to install the package config files sample-config.cmake, sample-config-version.cmake, sample-exports.cmake, sample-exports-release.cma…

---

## [How to limit C\_FLAGS to certain libraries](https://discourse.cmake.org/t/how-to-limit-c-flags-to-certain-libraries/853)

<div class="topic-metadata">

**Author:** [@Allen](https://discourse.cmake.org/u/Allen)\
**Replies:** 1\
**Last updated:** [March 24, 2020, 3:27pm UTC](https://discourse.cmake.org/t/how-to-limit-c-flags-to-certain-libraries/853 "2020-03-24T15:27:14Z")

</div>

We are trying to reduce warnings in our code base by promoting some warnings to errors. We build the list of warnings during configure time and add them to CMAKE\_C\_FLAGS. This was fine until we started implementing the…

---

## [arm-none-eabi-gcc won't pass compiler tests](https://discourse.cmake.org/t/arm-none-eabi-gcc-wont-pass-compiler-tests/801)

<div class="topic-metadata">

**Author:** [@Acsor](https://discourse.cmake.org/u/Acsor)\
**Replies:** 3\
**Last updated:** [March 24, 2020, 11:53am UTC](https://discourse.cmake.org/t/arm-none-eabi-gcc-wont-pass-compiler-tests/801 "2020-03-24T11:53:54Z")

</div>

I’m running an arm-none-eabi-gcc cross-compiler, version 5.4.1 20160919, on two different systems and, on setting up my CMake configuration, the compiler checks fail. The workaround I’m currently resorting to is manuall…

---

## [Replacing std::map with std::unordered\_map](https://discourse.cmake.org/t/replacing-std-map-with-std-unordered-map/843)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 3\
**Last updated:** [March 23, 2020, 5:17pm UTC](https://discourse.cmake.org/t/replacing-std-map-with-std-unordered-map/843 "2020-03-23T17:17:57Z")

</div>

I noticed that we use std::map quite a bit throughout the CMake source code. No doubt this stems from before the C++11 days, but now that we require C++11, I’m wondering if at least some of these uses might be more effic…

---

## [Espressif SoC toolchains](https://discourse.cmake.org/t/espressif-soc-toolchains/822)

<div class="topic-metadata">

**Author:** [@cplusplus](https://discourse.cmake.org/u/cplusplus)\
**Replies:** 6\
**Last updated:** [March 23, 2020, 4:07pm UTC](https://discourse.cmake.org/t/espressif-soc-toolchains/822 "2020-03-23T16:07:09Z")

</div>

Hello, I am writing here to suggest the addition of the Espressif ESP8266, ESP32 and ESP32S2 SoC to the list ot toolchains known to CMake. I know that the toolchain offered by Espressif is a customized version of GCC …

---

## [ARM64 doesn't work with ExternalProject\_Add command](https://discourse.cmake.org/t/arm64-doesnt-work-with-externalproject-add-command/846)

<div class="topic-metadata">

**Author:** [@ugurkanates](https://discourse.cmake.org/u/ugurkanates)\
**Replies:** 1\
**Last updated:** [March 23, 2020, 12:23pm UTC](https://discourse.cmake.org/t/arm64-doesnt-work-with-externalproject-add-command/846 "2020-03-23T12:23:53Z")

</div>

cmake\_minimum\_required(VERSION 3.0) project(TestMe) set(CMAKE\_CXX\_STANDARD 11) find\_package(Boost REQUIRED COMPONENTS system thread filesystem) set(EXTERNAL\_INSTALL\_LOCATION ${CMAKE\_BINARY\_DIR}/external) include(Externa…

---

## [Why toplevel Cmake can't clean custom project add by ExternProject\_add](https://discourse.cmake.org/t/why-toplevel-cmake-cant-clean-custom-project-add-by-externproject-add/824)

<div class="topic-metadata">

**Author:** [@lijianzhong](https://discourse.cmake.org/u/lijianzhong)\
**Replies:** 3\
**Last updated:** [March 23, 2020, 11:31am UTC](https://discourse.cmake.org/t/why-toplevel-cmake-cant-clean-custom-project-add-by-externproject-add/824 "2020-03-23T11:31:23Z")

</div>

\[Cmake 3.16.4\] I use ExternalProject\_Add command to add a custom project. The generate make file can build and link correctly. But when I use make clean to clean the project , the custom project cant not be cleaned. The…

---

## [NSIS PATH too long, how to use EnVar plugin?](https://discourse.cmake.org/t/nsis-path-too-long-how-to-use-envar-plugin/839)

<div class="topic-metadata">

**Author:** [@JanWielemaker](https://discourse.cmake.org/u/JanWielemaker)\
**Replies:** 5\
**Last updated:** [March 22, 2020, 3:40pm UTC](https://discourse.cmake.org/t/nsis-path-too-long-how-to-use-envar-plugin/839 "2020-03-22T15:40:44Z")

</div>

I’ve built a Windows installer using NSIS, cross compiling from Linux using MinGW and the Linux nsis package (Ubuntu 19.10). This works great, but if the user’s PATH exceeds 1024 characters the application cannot be add…

---

## [Make generator: Enter and Leave directory message](https://discourse.cmake.org/t/make-generator-enter-and-leave-directory-message/676)

<div class="topic-metadata">

**Author:** [@Charles\_Gueunet](https://discourse.cmake.org/u/Charles_Gueunet)\
**Replies:** 7\
**Last updated:** [March 21, 2020, 9:38pm UTC](https://discourse.cmake.org/t/make-generator-enter-and-leave-directory-message/676 "2020-03-21T21:38:10Z")

</div>

Hello, Using the current CMake master on linux, I have noticed a lot of make\[2\]: Entering directory '...' make\[2\]: Leaving directory '...' in the make output. These message are usual when using make but where hidden b…

---

## [how to write '@' in configure\_file( "" @ONLY )](https://discourse.cmake.org/t/how-to-write-in-configure-file-only/829)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 1\
**Last updated:** [March 20, 2020, 3:20pm UTC](https://discourse.cmake.org/t/how-to-write-in-configure-file-only/829 "2020-03-20T15:20:48Z")

</div>

how to write ‘@’ in configure\_file( "@" @ONLY ) ? input\_file has the following content: @ I tried configure\_file( "input\_file" @ONLY ) but am receiving \\@.

---

## [CMake 3.17.0 available for download](https://discourse.cmake.org/t/cmake-3-17-0-available-for-download/828)

<div class="topic-metadata">

**Author:** [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)\
**Replies:** 0\
**Last updated:** [March 20, 2020, 12:42pm UTC](https://discourse.cmake.org/t/cmake-3-17-0-available-for-download/828 "2020-03-20T12:42:30Z")

</div>

I am happy to announce that CMake 3.17.0 is now available for download at: https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.17 Release notes appear below and are also publish…

---

## [bind projects](https://discourse.cmake.org/t/bind-projects/820)

<div class="topic-metadata">

**Author:** [@Tomasz](https://discourse.cmake.org/u/Tomasz)\
**Replies:** 0\
**Last updated:** [March 18, 2020, 8:11pm UTC](https://discourse.cmake.org/t/bind-projects/820 "2020-03-18T20:11:32Z")

</div>

Hi I have few projects which are dependent to each other, in this sense that, next project, require and using packages that was builded and installed before. What are the best way to do that in cmake. I really need Yo…

---

## [Problem in Setting up QT to Integrate with OpenCV and C++ in Ubuntu 18.04 using CMake](https://discourse.cmake.org/t/problem-in-setting-up-qt-to-integrate-with-opencv-and-c-in-ubuntu-18-04-using-cmake/786)

<div class="topic-metadata">

**Author:** [@raisa](https://discourse.cmake.org/u/raisa)\
**Replies:** 4\
**Last updated:** [March 18, 2020, 1:29am UTC](https://discourse.cmake.org/t/problem-in-setting-up-qt-to-integrate-with-opencv-and-c-in-ubuntu-18-04-using-cmake/786 "2020-03-18T01:29:06Z")

</div>

Greetings ! It’s my first post in this forum. I’ve been following an OpenCV tutorial from a book. Prior to it, I have OpenCV already installed on my machine. I’m working with OpenCV & C++ on terminal Ubuntu and compile …

---

## [try\_compile with /WX or -Werror](https://discourse.cmake.org/t/try-compile-with-wx-or-werror/811)

<div class="topic-metadata">

**Author:** [@jpboivin](https://discourse.cmake.org/u/jpboivin)\
**Replies:** 1\
**Last updated:** [March 17, 2020, 7:18pm UTC](https://discourse.cmake.org/t/try-compile-with-wx-or-werror/811 "2020-03-17T19:18:54Z")

</div>

Hello, When defining global CMAKE\_C\_FLAGS/CMAKE\_CXX\_FLAGS variables for a platform, most of the time we’ll set /WX and -Werror, but also enable extra warnings (or MSVC also has some undocumented ones for C++/CX). I just…

---

## [CMake Qt5Gui build error](https://discourse.cmake.org/t/cmake-qt5gui-build-error/599)

<div class="topic-metadata">

**Author:** [@Kulagin](https://discourse.cmake.org/u/Kulagin)\
**Replies:** 1\
**Last updated:** [March 17, 2020, 7:09pm UTC](https://discourse.cmake.org/t/cmake-qt5gui-build-error/599 "2020-03-17T19:09:52Z")

</div>

I am following this quick start guide on the opentrack project and I get an error when I try to build it: Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.16299. The C compiler identification is MSVC 19…

---

## [When does CMAKE\_CURRENT\_BINARY\_DIR resolve symlinks?](https://discourse.cmake.org/t/when-does-cmake-current-binary-dir-resolve-symlinks/809)

<div class="topic-metadata">

**Author:** [@sdettmer](https://discourse.cmake.org/u/sdettmer)\
**Replies:** 2\
**Last updated:** [March 17, 2020, 5:52pm UTC](https://discourse.cmake.org/t/when-does-cmake-current-binary-dir-resolve-symlinks/809 "2020-03-17T17:52:27Z")

</div>

Hi, I have a project in a directory where two directory components are symbolic links (to directories). Normally I’m use to see CMAKE\_\* paths to be “logical” (i.e. what “pwd -L” shows). However, under circumstances some…

---

## [execute\_command and arguments that contain with blank spaces](https://discourse.cmake.org/t/execute-command-and-arguments-that-contain-with-blank-spaces/807)

<div class="topic-metadata">

**Author:** [@sdettmer](https://discourse.cmake.org/u/sdettmer)\
**Replies:** 2\
**Last updated:** [March 17, 2020, 10:24am UTC](https://discourse.cmake.org/t/execute-command-and-arguments-that-contain-with-blank-spaces/807 "2020-03-17T10:24:33Z")

</div>

Hi, I tried two hours to pass an argument with a space to execute\_process, but I didn’t find out how to do it. Cmake performs some magic quoting (“VERBATIM”). I tried using variables, various escaping, but I could not g…

---

## [cmake, ccache, CCACHE\_BASEDIR: wrong paths in compiler error messages](https://discourse.cmake.org/t/cmake-ccache-ccache-basedir-wrong-paths-in-compiler-error-messages/748)

<div class="topic-metadata">

**Author:** [@sdettmer](https://discourse.cmake.org/u/sdettmer)\
**Replies:** 5\
**Last updated:** [March 16, 2020, 6:43pm UTC](https://discourse.cmake.org/t/cmake-ccache-ccache-basedir-wrong-paths-in-compiler-error-messages/748 "2020-03-16T18:43:16Z")

</div>

Hi, Please let me summarize what we have here. We have projects with some hunderds CMakeLists.txt. The “main” one typically use several add\_subdirectory directives for the use libraries in form of: add\_subdirectory($…

---

## [ExternalProject, superbuilds and Visual Studio](https://discourse.cmake.org/t/externalproject-superbuilds-and-visual-studio/794)

<div class="topic-metadata">

**Author:** [@Zomgrolf](https://discourse.cmake.org/u/Zomgrolf)\
**Replies:** 3\
**Last updated:** [March 16, 2020, 6:33pm UTC](https://discourse.cmake.org/t/externalproject-superbuilds-and-visual-studio/794 "2020-03-16T18:33:54Z")

</div>

I could use some help with properly setting up my project in CMake. The main platform is Visual Studio on Windows (but it would be nice to have something portable that works on other systems, esp. Linux + Ninja + gcc). W…

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

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