# Latest

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

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

**Page:** 193

---

## [Short-circuit evaluation in if?](https://discourse.cmake.org/t/short-circuit-evaluation-in-if/1608)

<div class="topic-metadata">

**Author:** [@Leherenn](https://discourse.cmake.org/u/Leherenn)\
**Replies:** 3\
**Last updated:** [July 22, 2020, 3:15pm UTC](https://discourse.cmake.org/t/short-circuit-evaluation-in-if/1608 "2020-07-22T15:15:59Z")

</div>

I could not find it in the documentation (https://cmake.org/cmake/help/latest/command/if.html), but it would seem that conditions do not short-circuit. Is that correct? if(DEFINED MY\_VAR AND ${MY\_VAR} STREQUAL "true") …

---

## [Why does cmake have no file selection button after Find\*\*\*.cmake sets the PTHREADS\_INCLUDE\_DIR variable?](https://discourse.cmake.org/t/why-does-cmake-have-no-file-selection-button-after-find-cmake-sets-the-pthreads-include-dir-variable/1607)

<div class="topic-metadata">

**Author:** [@mirro187](https://discourse.cmake.org/u/mirro187)\
**Replies:** 1\
**Last updated:** [July 22, 2020, 12:14pm UTC](https://discourse.cmake.org/t/why-does-cmake-have-no-file-selection-button-after-find-cmake-sets-the-pthreads-include-dir-variable/1607 "2020-07-22T12:14:13Z")

</div>

---

## [install with EXPORT and multiple CONFIGURATIONS](https://discourse.cmake.org/t/install-with-export-and-multiple-configurations/1292)

<div class="topic-metadata">

**Author:** [@alex](https://discourse.cmake.org/u/alex)\
**Replies:** 4\
**Last updated:** [July 22, 2020, 1:02am UTC](https://discourse.cmake.org/t/install-with-export-and-multiple-configurations/1292 "2020-07-22T01:02:04Z")

</div>

I want to make a multi configuration package using cpack -C and the Visual Studio multi-generator. So, knowing that each of RUNTIME, LIBRARY, and ARCHIVE can appear only once in a call to install(), I tried writing the c…

---

## [CTest slower than Test Explorer or command line](https://discourse.cmake.org/t/ctest-slower-than-test-explorer-or-command-line/1600)

<div class="topic-metadata">

**Author:** [@EosPengwern](https://discourse.cmake.org/u/EosPengwern)\
**Replies:** 2\
**Last updated:** [July 21, 2020, 12:03pm UTC](https://discourse.cmake.org/t/ctest-slower-than-test-explorer-or-command-line/1600 "2020-07-21T12:03:42Z")

</div>

Is there a reason why I should expect CTest to run tests from within a Google Test executable much more slowly than the command line or Visual Studio Test Explorer? Give an test suite with 744 tests inside a single exec…

---

## [Using asset catalogs for macOS/iOS projects](https://discourse.cmake.org/t/using-asset-catalogs-for-macos-ios-projects/1588)

<div class="topic-metadata">

**Author:** [@kaworu1986](https://discourse.cmake.org/u/kaworu1986)\
**Replies:** 3\
**Last updated:** [July 21, 2020, 11:14am UTC](https://discourse.cmake.org/t/using-asset-catalogs-for-macos-ios-projects/1588 "2020-07-21T11:14:02Z")

</div>

Is it possible to get CMake to generate a macOS/iOS Xcode project that uses asset catalogs to set the application icon? I’ve been trying to get it to work for days now without success, and I currently have the below cod…

---

## [OneAPI support with Custom Toolchain](https://discourse.cmake.org/t/oneapi-support-with-custom-toolchain/1593)

<div class="topic-metadata">

**Author:** [@jyoung](https://discourse.cmake.org/u/jyoung)\
**Replies:** 1\
**Last updated:** [July 20, 2020, 9:26pm UTC](https://discourse.cmake.org/t/oneapi-support-with-custom-toolchain/1593 "2020-07-20T21:26:23Z")

</div>

I’m trying to write a custom toolchain file to support compiling a simple OneAPI project with the DPCPP compiler. It was suggested in a recent workshop that I write a custom toolchain file, which I have done (see attache…

---

## [Finding a writable directory location for installing Python modules](https://discourse.cmake.org/t/finding-a-writable-directory-location-for-installing-python-modules/1590)

<div class="topic-metadata">

**Author:** [@EosPengwern](https://discourse.cmake.org/u/EosPengwern)\
**Replies:** 2\
**Last updated:** [July 20, 2020, 3:13pm UTC](https://discourse.cmake.org/t/finding-a-writable-directory-location-for-installing-python-modules/1590 "2020-07-20T15:13:28Z")

</div>

Does CMake / CPack provide a generic way of identifying the %APPDATA% library on a user’s machine during installation? I ask because I’m trying to install a large scriptable application which provides various standard P…

---

## [How to skip test](https://discourse.cmake.org/t/how-to-skip-test/1582)

<div class="topic-metadata">

**Author:** [@matzeri](https://discourse.cmake.org/u/matzeri)\
**Replies:** 1\
**Last updated:** [July 20, 2020, 12:47pm UTC](https://discourse.cmake.org/t/how-to-skip-test/1582 "2020-07-20T12:47:18Z")

</div>

I am packaging 3.17.3 for Cygwin. as during the tests one of them stacks and never completes Start 149: ExternalProject how I can skip it to continue with the next ones ? Thanks Marco

---

## [Depending on Package Config file as External Project](https://discourse.cmake.org/t/depending-on-package-config-file-as-external-project/1501)

<div class="topic-metadata">

**Author:** [@MathiasMagnus](https://discourse.cmake.org/u/MathiasMagnus)\
**Replies:** 11\
**Last updated:** [July 20, 2020, 10:47am UTC](https://discourse.cmake.org/t/depending-on-package-config-file-as-external-project/1501 "2020-07-20T10:47:59Z")

</div>

I’m looking to provide sample code to a library built using CMake. The sample is hosted alongside the sources of the library in a folder called \<project\_root\>/example and I would like it to show how downstreams would use…

---

## [CTest Dynamic Analysis](https://discourse.cmake.org/t/ctest-dynamic-analysis/1560)

<div class="topic-metadata">

**Author:** [@Leon0402](https://discourse.cmake.org/u/Leon0402)\
**Replies:** 9\
**Last updated:** [July 19, 2020, 5:18pm UTC](https://discourse.cmake.org/t/ctest-dynamic-analysis/1560 "2020-07-19T17:18:38Z")

</div>

Hi everyone, I currently explore the possibilities of cmake scripting to run sanitizers and tests. But it seems to be not working. # This file is supposed to run in ctest script mode: # ctest -S \<path-to-this-file\>/CTe…

---

## [How to change build flag for just a few source files in a project for debugging](https://discourse.cmake.org/t/how-to-change-build-flag-for-just-a-few-source-files-in-a-project-for-debugging/1585)

<div class="topic-metadata">

**Author:** [@butette](https://discourse.cmake.org/u/butette)\
**Replies:** 3\
**Last updated:** [July 19, 2020, 3:37pm UTC](https://discourse.cmake.org/t/how-to-change-build-flag-for-just-a-few-source-files-in-a-project-for-debugging/1585 "2020-07-19T15:37:11Z")

</div>

If I already have a project set up with a standard set of compile/link options for that build type and need to debug by changing the compile and or link options for just one or two source files and leave the existing com…

---

## [Making Improvements to a Find Module which isn't under Test](https://discourse.cmake.org/t/making-improvements-to-a-find-module-which-isnt-under-test/1586)

<div class="topic-metadata">

**Author:** [@David\_McCabe](https://discourse.cmake.org/u/David_McCabe)\
**Replies:** 1\
**Last updated:** [July 18, 2020, 11:27pm UTC](https://discourse.cmake.org/t/making-improvements-to-a-find-module-which-isnt-under-test/1586 "2020-07-18T23:27:55Z")

</div>

Newbie questions here… Situation/Background Our office insist on using an outdated library for new developments (FLTK 1.3.3 for Windows) and it took a bit of time to get things up and running. I don’t want to delve too…

---

## [Including resources with add\_jar](https://discourse.cmake.org/t/including-resources-with-add-jar/1583)

<div class="topic-metadata">

**Author:** [@Jacob\_Varghese](https://discourse.cmake.org/u/Jacob_Varghese)\
**Replies:** 1\
**Last updated:** [July 18, 2020, 9:00am UTC](https://discourse.cmake.org/t/including-resources-with-add-jar/1583 "2020-07-18T09:00:41Z")

</div>

Hi I’m trying to include some resources (jni library files) inside my jar but I’m facing issues to get exactly what I want. I use add\_jar(target SOURCES ${javasources} OUTPUT\_DIR ${BUILD\_ROOT}/jar) to generate the Jar a…

---

## ["CheckIPOSupported" inside subdirectory says that it's not supported](https://discourse.cmake.org/t/checkiposupported-inside-subdirectory-says-that-its-not-supported/1581)

<div class="topic-metadata">

**Author:** [@Foot](https://discourse.cmake.org/u/Foot)\
**Replies:** 2\
**Last updated:** [July 18, 2020, 2:08am UTC](https://discourse.cmake.org/t/checkiposupported-inside-subdirectory-says-that-its-not-supported/1581 "2020-07-18T02:08:56Z")

</div>

Hi there, I’m having some problems when I try to check/enable IPO only for my application! This is the project structure: project CMakeLists.txt \<-- works for all modules including the externals - external CMa…

---

## [How to disable '-pedantic' compiler option for a specific library?](https://discourse.cmake.org/t/how-to-disable-pedantic-compiler-option-for-a-specific-library/1575)

<div class="topic-metadata">

**Author:** [@DavidA](https://discourse.cmake.org/u/DavidA)\
**Replies:** 5\
**Last updated:** [July 17, 2020, 3:04pm UTC](https://discourse.cmake.org/t/how-to-disable-pedantic-compiler-option-for-a-specific-library/1575 "2020-07-17T15:04:51Z")

</div>

For my gcc C++ project, my top-level CMakeLists.txt contains: add\_compile\_options(-Wall -pedantic) and it builds multiple libraries using add\_subdirectory() calls. How can I disable the ‘-pedantic’ flag for one of tho…

---

## [Use of -isystem](https://discourse.cmake.org/t/use-of-isystem/1574)

<div class="topic-metadata">

**Author:** [@yann](https://discourse.cmake.org/u/yann)\
**Replies:** 3\
**Last updated:** [July 16, 2020, 4:54pm UTC](https://discourse.cmake.org/t/use-of-isystem/1574 "2020-07-16T16:54:12Z")

</div>

We had a problem when cross-compiling software against sentry, which is linked to sentry-targets.cmake causing usage of $sysroot/usr/include, which causes -isystem to appear early in the commandline. “gcc -v” shows t…

---

## [If-test within ExternalProject\_Add/FetchContent\_Declare?](https://discourse.cmake.org/t/if-test-within-externalproject-add-fetchcontent-declare/1556)

<div class="topic-metadata">

**Author:** [@mathomp4](https://discourse.cmake.org/u/mathomp4)\
**Replies:** 2\
**Last updated:** [July 16, 2020, 2:40pm UTC](https://discourse.cmake.org/t/if-test-within-externalproject-add-fetchcontent-declare/1556 "2020-07-16T14:40:10Z")

</div>

A query for the experts. Namely, I have a patch I’d like to apply to either a FetchContent\_Declare or ExternalProject\_Add command. And reading the doc I see there is a PATCH\_COMMAND that can be used. Nice. (Note I’m not …

---

## [Multiple definition of main](https://discourse.cmake.org/t/multiple-definition-of-main/1573)

<div class="topic-metadata">

**Author:** [@ELNS](https://discourse.cmake.org/u/ELNS)\
**Replies:** 6\
**Last updated:** [July 16, 2020, 2:39pm UTC](https://discourse.cmake.org/t/multiple-definition-of-main/1573 "2020-07-16T14:39:21Z")

</div>

Hi all, I have created a new cpp repository a day ago to re-implement my fortran code snippets in c plus plus language and this is default generated cmake file by clion IDE: cmake\_minimum\_required(VERSION 3.16) project…

---

## [CMake 3.18.0 available for download](https://discourse.cmake.org/t/cmake-3-18-0-available-for-download/1562)

<div class="topic-metadata">

**Author:** [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)\
**Replies:** 1\
**Last updated:** [July 15, 2020, 9:50pm UTC](https://discourse.cmake.org/t/cmake-3-18-0-available-for-download/1562 "2020-07-15T21:50:04Z")

</div>

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

---

## [CMake 3.18.0-rc4 is ready for testing](https://discourse.cmake.org/t/cmake-3-18-0-rc4-is-ready-for-testing/1537)

<div class="topic-metadata">

**Author:** [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)\
**Replies:** 3\
**Last updated:** [July 15, 2020, 1:51pm UTC](https://discourse.cmake.org/t/cmake-3-18-0-rc4-is-ready-for-testing/1537 "2020-07-15T13:51:32Z")

</div>

I am proud to announce the fourth CMake 3.18 release candidate. https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.18 Release notes appear below and are also published at http…

---

## [How to assign a list of values to a variable in ctest's --build-options from within an add\_test() command](https://discourse.cmake.org/t/how-to-assign-a-list-of-values-to-a-variable-in-ctests-build-options-from-within-an-add-test-command/1552)

<div class="topic-metadata">

**Author:** [@alcroito](https://discourse.cmake.org/u/alcroito)\
**Replies:** 3\
**Last updated:** [July 15, 2020, 8:24am UTC](https://discourse.cmake.org/t/how-to-assign-a-list-of-values-to-a-variable-in-ctests-build-options-from-within-an-add-test-command/1552 "2020-07-15T08:24:58Z")

</div>

Sample project with what I’ve tried cmake\_minimum\_required(VERSION 3.14) project(ctest\_multiple\_prefixes CXX) file(WRITE "${CMAKE\_CURRENT\_BINARY\_DIR}/subdir/lib.cpp" "void func(){}") file(WRITE "${CMAKE\_CURRENT\_BINARY\_…

---

## [Im following the cmake tutorial and i have some questions.](https://discourse.cmake.org/t/im-following-the-cmake-tutorial-and-i-have-some-questions/1559)

<div class="topic-metadata">

**Author:** [@Rundogie\_Rundogie](https://discourse.cmake.org/u/Rundogie_Rundogie)\
**Replies:** 0\
**Last updated:** [July 15, 2020, 4:58am UTC](https://discourse.cmake.org/t/im-following-the-cmake-tutorial-and-i-have-some-questions/1559 "2020-07-15T04:58:38Z")

</div>

Im using Cmake in visual studio and i m stucked on step 2. How can i change MY\_MATH in visual studio environment?

---

## [Unresolved symbols in dynamic library](https://discourse.cmake.org/t/unresolved-symbols-in-dynamic-library/1546)

<div class="topic-metadata">

**Author:** [@DavidA](https://discourse.cmake.org/u/DavidA)\
**Replies:** 1\
**Last updated:** [July 14, 2020, 5:12pm UTC](https://discourse.cmake.org/t/unresolved-symbols-in-dynamic-library/1546 "2020-07-14T17:12:03Z")

</div>

I explained in my previous question that I am trying to build a dynamic library ‘libdpdk.so’ of my own functions linked to the 3rd party DPDK libraries. I would then link ‘libdpdk.so’ to my own main.cpp test program. Th…

---

## [overwriting CMAKE\_CXX\_FLAGS](https://discourse.cmake.org/t/overwriting-cmake-cxx-flags/1548)

<div class="topic-metadata">

**Author:** [@flashburn](https://discourse.cmake.org/u/flashburn)\
**Replies:** 2\
**Last updated:** [July 13, 2020, 7:59pm UTC](https://discourse.cmake.org/t/overwriting-cmake-cxx-flags/1548 "2020-07-13T19:59:39Z")

</div>

My environment has CXXFLAGS=-O2 -pipe -g -feliminate-unused-debug-types. For debugging purposes I don’t want to use these settings. In my CMakeLists.txt I tried set(CMAKE\_CXX\_FLAGS ""). However when I rebuild my makefil…

---

## [Linking to a library of my own code that requires 3rd party library](https://discourse.cmake.org/t/linking-to-a-library-of-my-own-code-that-requires-3rd-party-library/1526)

<div class="topic-metadata">

**Author:** [@DavidA](https://discourse.cmake.org/u/DavidA)\
**Replies:** 8\
**Last updated:** [July 13, 2020, 2:01pm UTC](https://discourse.cmake.org/t/linking-to-a-library-of-my-own-code-that-requires-3rd-party-library/1526 "2020-07-13T14:01:21Z")

</div>

I have a working CMake test project that consists of my C++ code linked to a 3rd party library called DPDK, targeting Linux. I now want to separate my code into a main.cpp and my own library of my functions that require …

---

## [Setting custom include path for FetchContent?](https://discourse.cmake.org/t/setting-custom-include-path-for-fetchcontent/1539)

<div class="topic-metadata">

**Author:** [@steven-johnson](https://discourse.cmake.org/u/steven-johnson)\
**Replies:** 2\
**Last updated:** [July 10, 2020, 10:44pm UTC](https://discourse.cmake.org/t/setting-custom-include-path-for-fetchcontent/1539 "2020-07-10T22:44:19Z")

</div>

By default, FetchContent seems to add the toplevel directory of the fetched code to the include path. Is there any way to customize this, so that fetched source that is out of your control can be segregated to avoid poss…

---

## [Question about failure result of get\_target\_property](https://discourse.cmake.org/t/question-about-failure-result-of-get-target-property/1384)

<div class="topic-metadata">

**Author:** [@christetreault](https://discourse.cmake.org/u/christetreault)\
**Replies:** 2\
**Last updated:** [July 10, 2020, 4:23pm UTC](https://discourse.cmake.org/t/question-about-failure-result-of-get-target-property/1384 "2020-07-10T16:23:50Z")

</div>

I’m trying to troubleshoot an issue with a VS project generated by CMake. The relevant section of the cmake file is: get\_target\_property(test\_suite\_folder ${test\_suite} FOLDER) if (NOT ${test\_suite\_folder} STREQUAL …

---

## [Installing versioned Qt libraries with namelinks on Linux](https://discourse.cmake.org/t/installing-versioned-qt-libraries-with-namelinks-on-linux/1499)

<div class="topic-metadata">

**Author:** [@EosPengwern](https://discourse.cmake.org/u/EosPengwern)\
**Replies:** 1\
**Last updated:** [July 10, 2020, 2:38pm UTC](https://discourse.cmake.org/t/installing-versioned-qt-libraries-with-namelinks-on-linux/1499 "2020-07-10T14:38:17Z")

</div>

I have a Linux build of Qt where each library has a fully-versioned name with symlinks representing shorter version numbers: lrwxrwxrwx 1 username username 20 Sep 20 2019 libQt5Core.so -\> libQt5Core.so.5.12.5 l…

---

## [Linking to installed Qt libraries on Linux](https://discourse.cmake.org/t/linking-to-installed-qt-libraries-on-linux/1535)

<div class="topic-metadata">

**Author:** [@EosPengwern](https://discourse.cmake.org/u/EosPengwern)\
**Replies:** 2\
**Last updated:** [July 10, 2020, 2:37pm UTC](https://discourse.cmake.org/t/linking-to-installed-qt-libraries-on-linux/1535 "2020-07-10T14:37:20Z")

</div>

I’m having persistent difficulties installing and linking to Qt libraries on Linux. In previous questions here and here, I asked about how to install Qt libraries along with their namelinks, since the library name searc…

---

## [LLVM linker not working?](https://discourse.cmake.org/t/llvm-linker-not-working/1532)

<div class="topic-metadata">

**Author:** [@\_0.z](https://discourse.cmake.org/u/_0.z)\
**Replies:** 1\
**Last updated:** [July 10, 2020, 12:20pm UTC](https://discourse.cmake.org/t/llvm-linker-not-working/1532 "2020-07-10T12:20:13Z")

</div>

ccmake 3.16.3 LLVM | CLANG | LLD 10 Ninja 1.10.0 My assumption is that http://lld.llvm.org would be the correct linker to be utilised with LLVM | CLANG and therefore tried CMAKE\_LINKER = /usr/bin/llvm-link-10 CMAKE\_…

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

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