# Latest

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

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

**Page:** 210

---

## [How to take advantage of INTERFACE\_INCLUDE\_DIRECTORIES when building static or OBJECT libraries?](https://discourse.cmake.org/t/how-to-take-advantage-of-interface-include-directories-when-building-static-or-object-libraries/207)

<div class="topic-metadata">

**Author:** [@oscarh](https://discourse.cmake.org/u/oscarh)\
**Replies:** 1\
**Last updated:** [November 15, 2019, 9:11am UTC](https://discourse.cmake.org/t/how-to-take-advantage-of-interface-include-directories-when-building-static-or-object-libraries/207 "2019-11-15T09:11:04Z")

</div>

It seems that INTERFACE\_INCLUDE\_DIRECTORIES is only read and used to populate the include search paths by target\_link\_libraries. When building a static or OBJECT library, there is no linking step, so it does not make sen…

---

## [Custom Build Type](https://discourse.cmake.org/t/custom-build-type/201)

<div class="topic-metadata">

**Author:** [@David\_Dixon](https://discourse.cmake.org/u/David_Dixon)\
**Replies:** 2\
**Last updated:** [November 14, 2019, 3:13pm UTC](https://discourse.cmake.org/t/custom-build-type/201 "2019-11-14T15:13:30Z")

</div>

Is there a idiomatic way to provide a custom build type? For example, if I want to have Release flags plus march=native and mtune=native how should I go about doing this? Certainly, I could add them to CMAKE\_CXX\_FLAGS wh…

---

## [How to specify build output directory path?](https://discourse.cmake.org/t/how-to-specify-build-output-directory-path/202)

<div class="topic-metadata">

**Author:** [@DavidA](https://discourse.cmake.org/u/DavidA)\
**Replies:** 2\
**Last updated:** [November 14, 2019, 11:28am UTC](https://discourse.cmake.org/t/how-to-specify-build-output-directory-path/202 "2019-11-14T11:28:34Z")

</div>

(Copied from mail list where it is currently unanswered) Hi I am rather confused about how to specify the output directory. I am working on Windows with the Ninja generator and Microsoft toolset. My default build type …

---

## [Mapping CMAKE\_BUILD\_TYPE and CMAKE\_CONFIGURATION\_TYPES between project subdirectories](https://discourse.cmake.org/t/mapping-cmake-build-type-and-cmake-configuration-types-between-project-subdirectories/192)

<div class="topic-metadata">

**Author:** [@phcerdan](https://discourse.cmake.org/u/phcerdan)\
**Replies:** 6\
**Last updated:** [November 14, 2019, 10:53am UTC](https://discourse.cmake.org/t/mapping-cmake-build-type-and-cmake-configuration-types-between-project-subdirectories/192 "2019-11-14T10:53:58Z")

</div>

Better to explain with a use case: ProjectThird uses non-standard CMAKE\_CONFIGURATION\_TYPES, ie: checked, release I want to include ProjectThird into my ProjectOwn, however ProjectOwn has the standard CMAKE\_CONFIGURATI…

---

## [Using generator expression with add\_library](https://discourse.cmake.org/t/using-generator-expression-with-add-library/156)

<div class="topic-metadata">

**Author:** [@DavidA](https://discourse.cmake.org/u/DavidA)\
**Replies:** 2\
**Last updated:** [November 14, 2019, 8:57am UTC](https://discourse.cmake.org/t/using-generator-expression-with-add-library/156 "2019-11-14T08:57:17Z")

</div>

I want to build a shared library for Linux and a static library for Windows. So I have tried: set (\_star\_lib\_name "StdStars") add\_library(${\_star\_lib\_name} $\<$\<CXX\_COMPILER\_ID:GNU\>:SHARED\> …

---

## [Cmake not detecting the CXX compiler](https://discourse.cmake.org/t/cmake-not-detecting-the-cxx-compiler/190)

<div class="topic-metadata">

**Author:** [@rmadhuraj](https://discourse.cmake.org/u/rmadhuraj)\
**Replies:** 2\
**Last updated:** [November 14, 2019, 4:26am UTC](https://discourse.cmake.org/t/cmake-not-detecting-the-cxx-compiler/190 "2019-11-14T04:26:35Z")

</div>

HI My Cmake by default not taking the CXX compiler, taking only C for the compilation. So the cpp files in the project were not being compiled. My tool chain file is like this set(CMAKE\_SYSTEM\_PROCESSOR aarch64) To…

---

## [Passing escaped strings from macros to functions](https://discourse.cmake.org/t/passing-escaped-strings-from-macros-to-functions/196)

<div class="topic-metadata">

**Author:** [@alcroito](https://discourse.cmake.org/u/alcroito)\
**Replies:** 4\
**Last updated:** [November 13, 2019, 6:46pm UTC](https://discourse.cmake.org/t/passing-escaped-strings-from-macros-to-functions/196 "2019-11-13T18:46:37Z")

</div>

Hi, The following project: cmake\_minimum\_required(VERSION 3.15) project(test\_quoting\_macro\_and\_function) function(my\_func) message("func ARGV: ${ARGV}") endfunction() macro(my\_macro) message("macro ARGV: ${…

---

## [Overwriting option flags CMAKE\_RUNTIME\_OUTPUT\_DIRECTORY, CMAKE\_LIBRARY\_OUTPUT\_DIRECTORY and CMAKE\_ARCHIVE\_OUTPUT\_DIRECTORY](https://discourse.cmake.org/t/overwriting-option-flags-cmake-runtime-output-directory-cmake-library-output-directory-and-cmake-archive-output-directory/194)

<div class="topic-metadata">

**Author:** [@danbr](https://discourse.cmake.org/u/danbr)\
**Replies:** 2\
**Last updated:** [November 13, 2019, 3:33pm UTC](https://discourse.cmake.org/t/overwriting-option-flags-cmake-runtime-output-directory-cmake-library-output-directory-and-cmake-archive-output-directory/194 "2019-11-13T15:33:47Z")

</div>

Hello! I have the following use case: Lets say the project’s top-level CMakeLists.txt file contains the following lines: set(CMAKE\_RUNTIME\_OUTPUT\_DIRECTORY, \[some-path\]) set(CMAKE\_RUNTIME\_LIBRARY\_DIRECTORY, \[some-pat…

---

## [Possible bugs with armclang toolchain](https://discourse.cmake.org/t/possible-bugs-with-armclang-toolchain/168)

<div class="topic-metadata">

**Author:** [@oscarh](https://discourse.cmake.org/u/oscarh)\
**Replies:** 8\
**Last updated:** [November 12, 2019, 3:46pm UTC](https://discourse.cmake.org/t/possible-bugs-with-armclang-toolchain/168 "2019-11-12T15:46:08Z")

</div>

I have a project to cross compile firmware for ARM Cortex A53 platform. At the very beginning of my CMakeLists.txt, I defined armclang toolchain by: cmake\_minimum\_required(VERSION 3.10) set(CMAKE\_SYSTEM\_NAME Generic) …

---

## [Wrong CMake version being applied for cmake-gui](https://discourse.cmake.org/t/wrong-cmake-version-being-applied-for-cmake-gui/181)

<div class="topic-metadata">

**Author:** [@abdekker](https://discourse.cmake.org/u/abdekker)\
**Replies:** 8\
**Last updated:** [November 12, 2019, 3:39pm UTC](https://discourse.cmake.org/t/wrong-cmake-version-being-applied-for-cmake-gui/181 "2019-11-12T15:39:45Z")

</div>

On Ubuntu 18.04, I had CMake 3.10.2 installed (in /usr/bin). Following instructions on the kitware.com website, I was able to update CMake to 3.13.5. The 3.13.5 binaries are installed in /usr/local/bin/cmake. The origina…

---

## [How is target name propogated to external projects?](https://discourse.cmake.org/t/how-is-target-name-propogated-to-external-projects/186)

<div class="topic-metadata">

**Author:** [@oscarh](https://discourse.cmake.org/u/oscarh)\
**Replies:** 1\
**Last updated:** [November 12, 2019, 1:06pm UTC](https://discourse.cmake.org/t/how-is-target-name-propogated-to-external-projects/186 "2019-11-12T13:06:28Z")

</div>

I don’t see a way to specify the target to build when calling ExternalProject\_Add (Correct me if I’ve missed it). So how does the external project know what target to build when I run “cmake --build” on the top-most proj…

---

## [Linking tests for an INTERFACE library](https://discourse.cmake.org/t/linking-tests-for-an-interface-library/185)

<div class="topic-metadata">

**Author:** [@martijntje](https://discourse.cmake.org/u/martijntje)\
**Replies:** 2\
**Last updated:** [November 12, 2019, 8:59am UTC](https://discourse.cmake.org/t/linking-tests-for-an-interface-library/185 "2019-11-12T08:59:21Z")

</div>

I am writing a header-only library - which I believe is best done using an INTERFACE target (there is nothing to be built after all). The library does have some dependencies, however, which I’d like to be visible from th…

---

## [Generate dependency on external projects](https://discourse.cmake.org/t/generate-dependency-on-external-projects/139)

<div class="topic-metadata">

**Author:** [@oscarh](https://discourse.cmake.org/u/oscarh)\
**Replies:** 3\
**Last updated:** [November 10, 2019, 8:08pm UTC](https://discourse.cmake.org/t/generate-dependency-on-external-projects/139 "2019-11-10T20:08:40Z")

</div>

I’m trying to use cmake for cross-compiling. My project also needs a home-made tool to compile target code. So building target code depends on the external tool. I know we can use “export” command to generate a file for…

---

## [Best practices on finding third party libraries for a project?](https://discourse.cmake.org/t/best-practices-on-finding-third-party-libraries-for-a-project/170)

<div class="topic-metadata">

**Author:** [@thomthom](https://discourse.cmake.org/u/thomthom)\
**Replies:** 6\
**Last updated:** [November 8, 2019, 7:45pm UTC](https://discourse.cmake.org/t/best-practices-on-finding-third-party-libraries-for-a-project/170 "2019-11-08T19:45:43Z")

</div>

I’m new to CMake. Trying to read up on best practices and common concepts. One thing which eludes me is how to be able to provide CMake with paths for external libraries such that find\_library finds them. The documentat…

---

## [How to add additional commands in target recipes](https://discourse.cmake.org/t/how-to-add-additional-commands-in-target-recipes/138)

<div class="topic-metadata">

**Author:** [@oscarh](https://discourse.cmake.org/u/oscarh)\
**Replies:** 4\
**Last updated:** [November 7, 2019, 2:11pm UTC](https://discourse.cmake.org/t/how-to-add-additional-commands-in-target-recipes/138 "2019-11-07T14:11:08Z")

</div>

I’m investigating if we can move from linux make to cmake. One of the issues I’m facing is, in our current makefile, on compiling each source file, we run a home-made tool to inspect the source code for some information: …

---

## [Hunter C/C++ CMake package manager gained an easy setup mechanism via CMake's FetchContent](https://discourse.cmake.org/t/hunter-c-c-cmake-package-manager-gained-an-easy-setup-mechanism-via-cmakes-fetchcontent/145)

<div class="topic-metadata">

**Author:** [@cristianadam](https://discourse.cmake.org/u/cristianadam)\
**Replies:** 0\
**Last updated:** [November 6, 2019, 3:55pm UTC](https://discourse.cmake.org/t/hunter-c-c-cmake-package-manager-gained-an-easy-setup-mechanism-via-cmakes-fetchcontent/145 "2019-11-06T15:55:04Z")

</div>

Hunter C/C++ CMake package manager gained an easy setup mechanism via CMake’s FetchContent . For Qt6’s Core dependencies one needs only to do: cmake\_minimum\_required(VERSION 3.14) set(HUNTER\_PACKAGES freetype ZLIB PN…

---

## [CMake 3.16-rc3 with the Xcode generator generates invalid entry for CMakeLists.txt](https://discourse.cmake.org/t/cmake-3-16-rc3-with-the-xcode-generator-generates-invalid-entry-for-cmakelists-txt/115)

<div class="topic-metadata">

**Author:** [@remyjette](https://discourse.cmake.org/u/remyjette)\
**Replies:** 2\
**Last updated:** [November 5, 2019, 6:58pm UTC](https://discourse.cmake.org/t/cmake-3-16-rc3-with-the-xcode-generator-generates-invalid-entry-for-cmakelists-txt/115 "2019-11-05T18:58:36Z")

</div>

Hopefully this is the right location to post this. I gave a try with CMake 3.16-rc3 on one of our projects, and noticed that when I viewed the generated .xcodeproj in the Xcode IDE each target had a weird empty entry th…

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