# Latest

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

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

**Page:** 188

---

## [CMake 3.15.5 bootstrap fail with g++ 9.3.0](https://discourse.cmake.org/t/cmake-3-15-5-bootstrap-fail-with-g-9-3-0/2115)

<div class="topic-metadata">

**Author:** [@Massimiliano\_Cialdi](https://discourse.cmake.org/u/Massimiliano_Cialdi)\
**Replies:** 1\
**Last updated:** [November 4, 2020, 12:53pm UTC](https://discourse.cmake.org/t/cmake-3-15-5-bootstrap-fail-with-g-9-3-0/2115 "2020-11-04T12:53:11Z")

</div>

I’m trying to build CMake 3.15.5 on a 20.04 xubuntu machine (but I also tried 18.04 and 20.10 with the same results). (actually I want to build host-cmake in buildroot 2020.02.1) The error is as follows: loading initi…

---

## [CPACK\_PRE\_BUILD\_SCRIPTS duplicates CPACK\_INSTALL\_SCRIPTS](https://discourse.cmake.org/t/cpack-pre-build-scripts-duplicates-cpack-install-scripts/2105)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 2\
**Last updated:** [November 4, 2020, 11:33am UTC](https://discourse.cmake.org/t/cpack-pre-build-scripts-duplicates-cpack-install-scripts/2105 "2020-11-04T11:33:31Z")

</div>

While cleaning up the docs for the new CPACK\_PRE\_BUILD\_SCRIPTS, CPACK\_POST\_BUILD\_SCRIPTS and CPACK\_PACKAGE\_FILES variables added by !4846, I noticed that we already have CPACK\_INSTALL\_SCRIPTS. This seems to already provi…

---

## [Boost::process target doesn't exist (for thread linking)](https://discourse.cmake.org/t/boost-process-target-doesnt-exist-for-thread-linking/2113)

<div class="topic-metadata">

**Author:** [@syyyr](https://discourse.cmake.org/u/syyyr)\
**Replies:** 6\
**Last updated:** [November 4, 2020, 10:48am UTC](https://discourse.cmake.org/t/boost-process-target-doesnt-exist-for-thread-linking/2113 "2020-11-04T10:48:13Z")

</div>

Hi, I had some problems with linking Boost.Process. Linking with the Boost::boost target after using find\_package(Boost) gave me linking errors about threads. After some discussion on IRC, the problem is that Boost being…

---

## [Short target names and exports](https://discourse.cmake.org/t/short-target-names-and-exports/2107)

<div class="topic-metadata">

**Author:** [@eiband](https://discourse.cmake.org/u/eiband)\
**Replies:** 2\
**Last updated:** [November 2, 2020, 7:45pm UTC](https://discourse.cmake.org/t/short-target-names-and-exports/2107 "2020-11-02T19:45:11Z")

</div>

Is it okay to use short target names such as “base” in libraries as long as they are unique to the library? The imported targets are made unique with a namespace prefix, e.g. Prefix::base. Background: Target names could…

---

## [CPACK\_INSTALL\_SCRIPTS executed without the files being present](https://discourse.cmake.org/t/cpack-install-scripts-executed-without-the-files-being-present/1822)

<div class="topic-metadata">

**Author:** [@mistaZ](https://discourse.cmake.org/u/mistaZ)\
**Replies:** 1\
**Last updated:** [November 2, 2020, 3:55am UTC](https://discourse.cmake.org/t/cpack-install-scripts-executed-without-the-files-being-present/1822 "2020-11-02T03:55:39Z")

</div>

I’m trying to make a .msi installation package using CMake, CPack, and Wix. The issue is I’m trying to sign the executables and DLLs that are going to be installed. SET( CPACK\_INSTALL\_SCRIPTS "${CMAKE\_CURRENT\_LIST\_DIR}/…

---

## [Inconsistent behavior of cmake\_path() subcommands taking a variable name instead of a string](https://discourse.cmake.org/t/inconsistent-behavior-of-cmake-path-subcommands-taking-a-variable-name-instead-of-a-string/2062)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 3\
**Last updated:** [November 1, 2020, 11:52am UTC](https://discourse.cmake.org/t/inconsistent-behavior-of-cmake-path-subcommands-taking-a-variable-name-instead-of-a-string/2062 "2020-11-01T11:52:28Z")

</div>

@marc.chevrier First up, sorry I didn’t get a chance to look at the original merge request for this feature when it was up for review. I should have caught this earlier, but am only just now getting to take a close look …

---

## [Append variable to \<BUILD\_DIR\> in ExternalProject\_Add command](https://discourse.cmake.org/t/append-variable-to-build-dir-in-externalproject-add-command/2098)

<div class="topic-metadata">

**Author:** [@tomhh](https://discourse.cmake.org/u/tomhh)\
**Replies:** 3\
**Last updated:** [October 31, 2020, 10:45pm UTC](https://discourse.cmake.org/t/append-variable-to-build-dir-in-externalproject-add-command/2098 "2020-10-31T22:45:52Z")

</div>

I have an ExternalProject\_Add call that looks like this… ExternalProject\_Add( SDL2 URL https://www.libsdl.org/release/SDL2-2.0.12.tar.gz URL\_HASH MD5=783b6f2df8ff02b19bb5ce492b99c8ff INSTALL\_DIR ${CMAKE…

---

## [How to set target's compiler preprocessor flags?](https://discourse.cmake.org/t/how-to-set-targets-compiler-preprocessor-flags/2094)

<div class="topic-metadata">

**Author:** [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)\
**Replies:** 3\
**Last updated:** [October 30, 2020, 11:47pm UTC](https://discourse.cmake.org/t/how-to-set-targets-compiler-preprocessor-flags/2094 "2020-10-30T23:47:49Z")

</div>

I want to compile ‘C’ source file, defining HAVE\_CONFIG\_H to the C preprocessor. E.g. if gcc is the compiler, I want to pass -DHAVE\_CONFIG\_H to the compiler. What is the correct portable way to do this, using target\_comp…

---

## [target\_link\_libraries() requires full path for some but not all project libraries?](https://discourse.cmake.org/t/target-link-libraries-requires-full-path-for-some-but-not-all-project-libraries/2097)

<div class="topic-metadata">

**Author:** [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)\
**Replies:** 3\
**Last updated:** [October 30, 2020, 11:47pm UTC](https://discourse.cmake.org/t/target-link-libraries-requires-full-path-for-some-but-not-all-project-libraries/2097 "2020-10-30T23:47:15Z")

</div>

My project builds several libraries, then links them to generate an executable. When calling target\_link\_libraries() for the executable, some - but not all - of the project libraries must be specified with full path ${CM…

---

## [target\_sources() and header visibility](https://discourse.cmake.org/t/target-sources-and-header-visibility/2096)

<div class="topic-metadata">

**Author:** [@DreamCaptain](https://discourse.cmake.org/u/DreamCaptain)\
**Replies:** 5\
**Last updated:** [October 30, 2020, 12:46pm UTC](https://discourse.cmake.org/t/target-sources-and-header-visibility/2096 "2020-10-30T12:46:56Z")

</div>

Hi, I’m trying modern cmake approach, but seems like my understanding of how target\_sources() command works is wrong. Consider following hierarchy: foo\_project/ ├── CMakeLists.txt ├── headers │ └── foo.h ├── interfa…

---

## [Skipping CMake compiler checks](https://discourse.cmake.org/t/skipping-cmake-compiler-checks/2079)

<div class="topic-metadata">

**Author:** [@mensinda](https://discourse.cmake.org/u/mensinda)\
**Replies:** 10\
**Last updated:** [October 29, 2020, 6:01pm UTC](https://discourse.cmake.org/t/skipping-cmake-compiler-checks/2079 "2020-10-29T18:01:26Z")

</div>

The use case I am interested in is improving the CMake dependency lookup mechanism in meson (not CMake subprojects but the CMake dependency / find\_package() backend). What we are currently doing for using the \*-config.cm…

---

## [Adding GLES Support to FindOpenGL](https://discourse.cmake.org/t/adding-gles-support-to-findopengl/2087)

<div class="topic-metadata">

**Author:** [@warisb](https://discourse.cmake.org/u/warisb)\
**Replies:** 1\
**Last updated:** [October 29, 2020, 1:48pm UTC](https://discourse.cmake.org/t/adding-gles-support-to-findopengl/2087 "2020-10-29T13:48:38Z")

</div>

Hi there, please bear with me as this is my first post. I would like to discuss this particular comment in the FindOpenGL.cmake file For EGL targets the client must rely on GLVND support on the user’s system. Linking …

---

## [Using get\_target\_property (or just get\_property) with generator expressions](https://discourse.cmake.org/t/using-get-target-property-or-just-get-property-with-generator-expressions/2090)

<div class="topic-metadata">

**Author:** [@EosPengwern](https://discourse.cmake.org/u/EosPengwern)\
**Replies:** 6\
**Last updated:** [October 29, 2020, 1:34pm UTC](https://discourse.cmake.org/t/using-get-target-property-or-just-get-property-with-generator-expressions/2090 "2020-10-29T13:34:20Z")

</div>

I’ve been trying to obtain either IMPORTED\_LOCATION\_DEBUG, IMPORTED\_LOCATION\_RELEASE, IMPORTED\_LOCATION\_RELWITHDEBINFO, or IMPORTED\_LOCATION\_MINSIZEREL for a target, depending upon the configuration that I’m currently bu…

---

## [Cmake configuration and generate is extremely slow for VS 2017](https://discourse.cmake.org/t/cmake-configuration-and-generate-is-extremely-slow-for-vs-2017/2036)

<div class="topic-metadata">

**Author:** [@satya\_ranjan\_Rout](https://discourse.cmake.org/u/satya_ranjan_Rout)\
**Replies:** 7\
**Last updated:** [October 29, 2020, 1:25pm UTC](https://discourse.cmake.org/t/cmake-configuration-and-generate-is-extremely-slow-for-vs-2017/2036 "2020-10-29T13:25:50Z")

</div>

We update our visual studio verion from VS 2012 to VS 2017. We are using Cmake3.18.2. It looks the configuration and generation time in cmake extremely high in VS 2017. In VS 2012 same code its taking around 15 mins, now…

---

## [Why is TARGET\_LINK\_LIBRARIES unable to link to third-party libraries when configuring static libraries?](https://discourse.cmake.org/t/why-is-target-link-libraries-unable-to-link-to-third-party-libraries-when-configuring-static-libraries/1855)

<div class="topic-metadata">

**Author:** [@mirro187](https://discourse.cmake.org/u/mirro187)\
**Replies:** 3\
**Last updated:** [October 29, 2020, 1:50am UTC](https://discourse.cmake.org/t/why-is-target-link-libraries-unable-to-link-to-third-party-libraries-when-configuring-static-libraries/1855 "2020-10-29T01:50:25Z")

</div>

---

## [Using cmake/ninja to batch cl invocations](https://discourse.cmake.org/t/using-cmake-ninja-to-batch-cl-invocations/1853)

<div class="topic-metadata">

**Author:** [@shuffle2](https://discourse.cmake.org/u/shuffle2)\
**Replies:** 8\
**Last updated:** [October 28, 2020, 7:21pm UTC](https://discourse.cmake.org/t/using-cmake-ninja-to-batch-cl-invocations/1853 "2020-10-28T19:21:26Z")

</div>

I’m trying to port a msbuild based project to cmake/ninja, and it seems like the ability to invoke the compiler with multiple source files is missing(?) Is there a way to have cmake generate ninja build files which will…

---

## [support for cuDNN NVIDIA CUDA® Deep Neural Network library](https://discourse.cmake.org/t/support-for-cudnn-nvidia-cuda-deep-neural-network-library/2082)

<div class="topic-metadata">

**Author:** [@Morteza\_Kianian](https://discourse.cmake.org/u/Morteza_Kianian)\
**Replies:** 2\
**Last updated:** [October 28, 2020, 6:17pm UTC](https://discourse.cmake.org/t/support-for-cudnn-nvidia-cuda-deep-neural-network-library/2082 "2020-10-28T18:17:00Z")

</div>

Currently for adding cuDNN libraries a module created by Stefano Sinigardi called FindCUDNN.cmake is used in many projects such as Darknet. I see the FindCUDA.cmake module is replaced by FindCUDAToolkit but still there’s…

---

## [NOT TARGET meaning?](https://discourse.cmake.org/t/not-target-meaning/2085)

<div class="topic-metadata">

**Author:** [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)\
**Replies:** 1\
**Last updated:** [October 28, 2020, 6:01pm UTC](https://discourse.cmake.org/t/not-target-meaning/2085 "2020-10-28T18:01:38Z")

</div>

I see expressions like this in cmake files: if(NOT TARGET JSONUtils::JSONUtils) include("${JSONUtils\_CMAKE\_DIR}/JSONUtilsTargets.cmake") endif() What exactly does this mean? By itself I think “NOT TARGET” means var…

---

## [add\_custom\_command fails when OUTPUT is generated into a subdirectory](https://discourse.cmake.org/t/add-custom-command-fails-when-output-is-generated-into-a-subdirectory/2074)

<div class="topic-metadata">

**Author:** [@jjELT](https://discourse.cmake.org/u/jjELT)\
**Replies:** 15\
**Last updated:** [October 28, 2020, 1:46pm UTC](https://discourse.cmake.org/t/add-custom-command-fails-when-output-is-generated-into-a-subdirectory/2074 "2020-10-28T13:46:44Z")

</div>

Find attached a minimal example, where I am generating sources for a library my-lib using add\_custom\_command, an executable my-app depends on: (I cannot actually upload anything yet as a new user, so find the sample pro…

---

## [Any way to log message() outputs to a log file?](https://discourse.cmake.org/t/any-way-to-log-message-outputs-to-a-log-file/2021)

<div class="topic-metadata">

**Author:** [@starseeker](https://discourse.cmake.org/u/starseeker)\
**Replies:** 3\
**Last updated:** [October 27, 2020, 12:02pm UTC](https://discourse.cmake.org/t/any-way-to-log-message-outputs-to-a-log-file/2021 "2020-10-27T12:02:14Z")

</div>

Some years ago, there was some discussion about introducing a way in CMake to specify a file to use to log a copy of the message() function’s outputs: https://cmake.org/pipermail/cmake-developers/2015-July/025681.html D…

---

## [How to link an imported shared library to an executable without hard-coding the path and file name?](https://discourse.cmake.org/t/how-to-link-an-imported-shared-library-to-an-executable-without-hard-coding-the-path-and-file-name/2067)

<div class="topic-metadata">

**Author:** [@Shane\_Dev](https://discourse.cmake.org/u/Shane_Dev)\
**Replies:** 6\
**Last updated:** [October 26, 2020, 8:05am UTC](https://discourse.cmake.org/t/how-to-link-an-imported-shared-library-to-an-executable-without-hard-coding-the-path-and-file-name/2067 "2020-10-26T08:05:50Z")

</div>

Hello, My CMake project uses some third party libraries which I declared as IMPORTED then I set the IMPORTED\_IMPLIB or IMPORTED\_LOCATION properties (depending on compiler and type of library) to the full path and file n…

---

## [Initialize empty list](https://discourse.cmake.org/t/initialize-empty-list/2068)

<div class="topic-metadata">

**Author:** [@johan556](https://discourse.cmake.org/u/johan556)\
**Replies:** 2\
**Last updated:** [October 25, 2020, 9:38pm UTC](https://discourse.cmake.org/t/initialize-empty-list/2068 "2020-10-25T21:38:14Z")

</div>

What is the most idiomatic way to initialize an empty list? I have earlier used set(mylist) This works, when I later starts to append items to the list. But I recently understood that this actually “unset” the variable…

---

## [On Windows CHECK\_CXX\_SOURCE\_RUNS is calling check\_source\_runs](https://discourse.cmake.org/t/on-windows-check-cxx-source-runs-is-calling-check-source-runs/2065)

<div class="topic-metadata">

**Author:** [@bradbell](https://discourse.cmake.org/u/bradbell)\
**Replies:** 12\
**Last updated:** [October 25, 2020, 8:09pm UTC](https://discourse.cmake.org/t/on-windows-check-cxx-source-runs-is-calling-check-source-runs/2065 "2020-10-25T20:09:59Z")

</div>

I have a very simple project that indicate that when in Windows (Linux) CMAKE\_CXX\_SOURCE\_RUNS is calling (is not calling) my macro check\_source\_runs. The commands mkdir build cd build cmake .. run fine on Linux and exi…

---

## [What is the use of property IMPORTED\_LOCATION on DLL platforms?](https://discourse.cmake.org/t/what-is-the-use-of-property-imported-location-on-dll-platforms/2069)

<div class="topic-metadata">

**Author:** [@Shane\_Dev](https://discourse.cmake.org/u/Shane_Dev)\
**Replies:** 2\
**Last updated:** [October 25, 2020, 7:12pm UTC](https://discourse.cmake.org/t/what-is-the-use-of-property-imported-location-on-dll-platforms/2069 "2020-10-25T19:12:55Z")

</div>

Hello, According to the docs, IMPORTED\_LOCATION should be set to the .dll part of the library. I have found that it is not necessary. However the DLL does need to be in an appropriate location such as ${CMAKE\_BINARY\_DIR…

---

## [Finding program (really, build target) to be run by a CTest test?](https://discourse.cmake.org/t/finding-program-really-build-target-to-be-run-by-a-ctest-test/2047)

<div class="topic-metadata">

**Author:** [@starseeker](https://discourse.cmake.org/u/starseeker)\
**Replies:** 1\
**Last updated:** [October 25, 2020, 12:48pm UTC](https://discourse.cmake.org/t/finding-program-really-build-target-to-be-run-by-a-ctest-test/2047 "2020-10-25T12:48:24Z")

</div>

Is there any way to use get\_test\_property to report the program to be run to execute the test? Background: I’m using one of the standard workarounds for the current inability to make Ctest tests depend on the building …

---

## [Cleaning up Check\<Lang\>SourceCompiles module docs](https://discourse.cmake.org/t/cleaning-up-check-lang-sourcecompiles-module-docs/2063)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 2\
**Last updated:** [October 24, 2020, 11:09am UTC](https://discourse.cmake.org/t/cleaning-up-check-lang-sourcecompiles-module-docs/2063 "2020-10-24T11:09:23Z")

</div>

The CMake 3.19 release includes a new CheckSourceCompiles module which replaces the individual Check\<Lang\>SourceCompiles modules. Indeed, those modules now simply forward to the new one. The old modules still have all th…

---

## [GENERATE\_NATIVE\_HEADERS target is not recognized as INTERFACE type](https://discourse.cmake.org/t/generate-native-headers-target-is-not-recognized-as-interface-type/2048)

<div class="topic-metadata">

**Author:** [@yisseamake](https://discourse.cmake.org/u/yisseamake)\
**Replies:** 7\
**Last updated:** [October 23, 2020, 10:22pm UTC](https://discourse.cmake.org/t/generate-native-headers-target-is-not-recognized-as-interface-type/2048 "2020-10-23T22:22:10Z")

</div>

target\_include\_directories failed when target (myprojJNI below) is a target that was created by add\_jar GENERATE\_NATIVE\_HEADERS option. ERROR: CMake Error at …CMakeLists.txt:… (target\_include\_directories): target\_inc…

---

## [How to run script in install phase from install directory](https://discourse.cmake.org/t/how-to-run-script-in-install-phase-from-install-directory/2043)

<div class="topic-metadata">

**Author:** [@mathomp4](https://discourse.cmake.org/u/mathomp4)\
**Replies:** 4\
**Last updated:** [October 23, 2020, 10:11pm UTC](https://discourse.cmake.org/t/how-to-run-script-in-install-phase-from-install-directory/2043 "2020-10-23T22:11:32Z")

</div>

Dear CMake Gurus, This is a little convoluted and long, but I’m hoping it’s possible in CMake…with as little change to source code as possible! To wit, I work on a earth science model and one of the goals with our rece…

---

## [CMake 3.19.0-rc1 is ready for testing](https://discourse.cmake.org/t/cmake-3-19-0-rc1-is-ready-for-testing/1996)

<div class="topic-metadata">

**Author:** [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)\
**Replies:** 10\
**Last updated:** [October 23, 2020, 1:40pm UTC](https://discourse.cmake.org/t/cmake-3-19-0-rc1-is-ready-for-testing/1996 "2020-10-23T13:40:24Z")

</div>

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

---

## [Continuing wisdom of disabling individual cmake generators on a platform-by-platform basis?](https://discourse.cmake.org/t/continuing-wisdom-of-disabling-individual-cmake-generators-on-a-platform-by-platform-basis/2044)

<div class="topic-metadata">

**Author:** [@stephene](https://discourse.cmake.org/u/stephene)\
**Replies:** 4\
**Last updated:** [October 22, 2020, 3:24pm UTC](https://discourse.cmake.org/t/continuing-wisdom-of-disabling-individual-cmake-generators-on-a-platform-by-platform-basis/2044 "2020-10-22T15:24:41Z")

</div>

Hi everyone, I would just like to raise awareness of a technical issue I have being having recently and start a discussion about this. I have the standard Windows GUI build of cmake 3.19 installed on my PC here and it s…

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

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