# Latest

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

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

**Page:** 176

---

## [Cmake re-run with cuda code](https://discourse.cmake.org/t/cmake-re-run-with-cuda-code/2698)

<div class="topic-metadata">

**Author:** [@Xin\_Chen](https://discourse.cmake.org/u/Xin_Chen)\
**Replies:** 1\
**Last updated:** [February 4, 2021, 2:56pm UTC](https://discourse.cmake.org/t/cmake-re-run-with-cuda-code/2698 "2021-02-04T14:56:17Z")

</div>

I face an issue about cmake on windows. When I build a c++ library, if it has cuda code, then cmake will multiple time on windows (depend on how many cuda\_add\_library used) some code snippet: https://paste.ubuntu.com/p…

---

## [Unit tests failing only when run via CTest](https://discourse.cmake.org/t/unit-tests-failing-only-when-run-via-ctest/2694)

<div class="topic-metadata">

**Author:** [@devmake](https://discourse.cmake.org/u/devmake)\
**Replies:** 1\
**Last updated:** [February 4, 2021, 2:51pm UTC](https://discourse.cmake.org/t/unit-tests-failing-only-when-run-via-ctest/2694 "2021-02-04T14:51:10Z")

</div>

Have the following situation: C++ codebase Unit test suite based on the Boot.Test When run directly all the tests pass no issues When run via ctest eg: ctest -j 1 or ctest -j 5 tests fail It is the same test every time …

---

## [compiling .s files](https://discourse.cmake.org/t/compiling-s-files/2681)

<div class="topic-metadata">

**Author:** [@deepan](https://discourse.cmake.org/u/deepan)\
**Replies:** 7\
**Last updated:** [February 4, 2021, 12:57pm UTC](https://discourse.cmake.org/t/compiling-s-files/2681 "2021-02-04T12:57:05Z")

</div>

I am working on an embedded project with windriver compiler The obj file(crt0.o) has the starting point(contains “main”) as per compiler design. In my project, we have written our own assemlbly file(crt0.s). now i wan…

---

## [Undefined third-party library symbols when building dylib on MacOS](https://discourse.cmake.org/t/undefined-third-party-library-symbols-when-building-dylib-on-macos/2671)

<div class="topic-metadata">

**Author:** [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)\
**Replies:** 4\
**Last updated:** [February 3, 2021, 11:00pm UTC](https://discourse.cmake.org/t/undefined-third-party-library-symbols-when-building-dylib-on-macos/2671 "2021-02-03T23:00:20Z")

</div>

The following command generates a Makefile on linux that properly builds a .so library: # Shared library add\_library(mbauxShared SHARED mb\_cheb.c mb\_delaun.c mb\_intersectgrid.c mb\_readwritegrd.c …

---

## [CMAKE\_PREFIX\_PATH absent from locations considered for Config module](https://discourse.cmake.org/t/cmake-prefix-path-absent-from-locations-considered-for-config-module/2685)

<div class="topic-metadata">

**Author:** [@MathiasMagnus](https://discourse.cmake.org/u/MathiasMagnus)\
**Replies:** 4\
**Last updated:** [February 3, 2021, 8:53pm UTC](https://discourse.cmake.org/t/cmake-prefix-path-absent-from-locations-considered-for-config-module/2685 "2021-02-03T20:53:22Z")

</div>

While maintaining the OpenCL repository CMake and CI scripts I came across an issue I can’t untangle. When building one of the components (OpenCL-ICD-Loader) that relies on another (OpenCL-Headers) I first build the dep…

---

## [IDEs and header files](https://discourse.cmake.org/t/ides-and-header-files/2665)

<div class="topic-metadata">

**Author:** [@Andrew](https://discourse.cmake.org/u/Andrew)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 6:41pm UTC](https://discourse.cmake.org/t/ides-and-header-files/2665 "2021-02-03T18:41:04Z")

</div>

Sample project: add\_library( a ) target\_sources( a PRIVATE a.c PUBLIC a.h ) add\_library( b ) target\_sources( b PRIVATE b.c PUBLIC b.h ) target\_link\_libraries( b PUBLIC a ) When I bring this up in my IDE, target a has…

---

## [cmake -E env much slower than plain env](https://discourse.cmake.org/t/cmake-e-env-much-slower-than-plain-env/2676)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 3:37pm UTC](https://discourse.cmake.org/t/cmake-e-env-much-slower-than-plain-env/2676 "2021-02-03T15:37:39Z")

</div>

I was made aware of the following commit by the ccache maintainer. Apparently the raw env command is way faster than cmake -E env, which I guess is understandable. If you use cmake -E env a lot in a project, I guess mayb…

---

## [Are square brackets universally supported by file(GLOB)?](https://discourse.cmake.org/t/are-square-brackets-universally-supported-by-file-glob/2674)

<div class="topic-metadata">

**Author:** [@arclight](https://discourse.cmake.org/u/arclight)\
**Replies:** 5\
**Last updated:** [February 3, 2021, 2:00pm UTC](https://discourse.cmake.org/t/are-square-brackets-universally-supported-by-file-glob/2674 "2021-02-03T14:00:07Z")

</div>

Hi, I have a situation where an application adds timestamp information to output file names and I’m trying to strip that out so I can automate regression testing. File names are of the format EXzzhhmm.nnn where zz is a…

---

## [How to avoid linking to system libraries](https://discourse.cmake.org/t/how-to-avoid-linking-to-system-libraries/2581)

<div class="topic-metadata">

**Author:** [@nabw](https://discourse.cmake.org/u/nabw)\
**Replies:** 7\
**Last updated:** [February 2, 2021, 11:12pm UTC](https://discourse.cmake.org/t/how-to-avoid-linking-to-system-libraries/2581 "2021-02-02T23:12:23Z")

</div>

Hello everyone, first post! Anyway, I am configuring the deal.II library on a server, and there is a nasty linking issue (https://github.com/dealii/dealii/issues/11245). We have two Boost libraries, one in /lib64 and th…

---

## [Generate idential binaries with CMake and IAR workspace](https://discourse.cmake.org/t/generate-idential-binaries-with-cmake-and-iar-workspace/2603)

<div class="topic-metadata">

**Author:** [@mstejskal](https://discourse.cmake.org/u/mstejskal)\
**Replies:** 8\
**Last updated:** [February 2, 2021, 1:38pm UTC](https://discourse.cmake.org/t/generate-idential-binaries-with-cmake-and-iar-workspace/2603 "2021-02-02T13:38:28Z")

</div>

Hi all, bit background what I’m trying to achieve. We want migrate from IAR workspace build system to CMake build system to make our builds more flexible. We have to stick with IAR compiler, at least for now. Target is …

---

## [Copy data files to build dir and avoid Debug/Release folder when using MSVC](https://discourse.cmake.org/t/copy-data-files-to-build-dir-and-avoid-debug-release-folder-when-using-msvc/2632)

<div class="topic-metadata">

**Author:** [@kerim](https://discourse.cmake.org/u/kerim)\
**Replies:** 3\
**Last updated:** [February 2, 2021, 12:50pm UTC](https://discourse.cmake.org/t/copy-data-files-to-build-dir-and-avoid-debug-release-folder-when-using-msvc/2632 "2021-02-02T12:50:42Z")

</div>

Hi, In my tests (I use google test) I use some external my\_file.txt. Thus I need to put this my\_file.txt to the build dir. It is known that MSVC creates additional config (Debug/Release) folder and other compilers don’…

---

## [CMake cannot find ifconsol.lib](https://discourse.cmake.org/t/cmake-cannot-find-ifconsol-lib/2668)

<div class="topic-metadata">

**Author:** [@dariomangoni](https://discourse.cmake.org/u/dariomangoni)\
**Replies:** 8\
**Last updated:** [February 1, 2021, 10:16pm UTC](https://discourse.cmake.org/t/cmake-cannot-find-ifconsol-lib/2668 "2021-02-01T22:16:18Z")

</div>

Hi all, I’ve been trying for days in any possible way, but after the install of the new Intel oneApi HPC I’m not able to compile any Fortran (mixed C/Fortran) code from CMake. I’m launching CMake by command prompt afte…

---

## [\[solved\] How to include library](https://discourse.cmake.org/t/solved-how-to-include-library/2670)

<div class="topic-metadata">

**Author:** [@start\_something](https://discourse.cmake.org/u/start_something)\
**Replies:** 1\
**Last updated:** [February 1, 2021, 8:56pm UTC](https://discourse.cmake.org/t/solved-how-to-include-library/2670 "2021-02-01T20:56:20Z")

</div>

Hi! I’m just starting out with cmake, so I expect that this might be a beginner question. When I wrote my own make file, I could just add -lncurses to my CXXFLAGS variable and it would automatically pick up my ncurses …

---

## [Need help using CMake with double8scan software](https://discourse.cmake.org/t/need-help-using-cmake-with-double8scan-software/2664)

<div class="topic-metadata">

**Author:** [@lmpatzer](https://discourse.cmake.org/u/lmpatzer)\
**Replies:** 4\
**Last updated:** [February 1, 2021, 6:46pm UTC](https://discourse.cmake.org/t/need-help-using-cmake-with-double8scan-software/2664 "2021-02-01T18:46:07Z")

</div>

Hello, I am looking to hire someone to help me use Bjorn Roth’s double8scan software. https://github.com/bjornroth/double8scan His instructions say: Build using CMake, for instance: mkdir build ; cd build ; cmake … ;…

---

## [Need to find/replace all #include with new path which doesn't fit with old path](https://discourse.cmake.org/t/need-to-find-replace-all-include-with-new-path-which-doesnt-fit-with-old-path/2661)

<div class="topic-metadata">

**Author:** [@al-sabr](https://discourse.cmake.org/u/al-sabr)\
**Replies:** 8\
**Last updated:** [February 1, 2021, 5:22pm UTC](https://discourse.cmake.org/t/need-to-find-replace-all-include-with-new-path-which-doesnt-fit-with-old-path/2661 "2021-02-01T17:22:20Z")

</div>

Hi I am having a problem… I took 2 external projects in another project which compile without any problem. The only problem in my code is that the old #include which are in thousands are not working anymore. I give an ex…

---

## [Cmake does not find "gio-2.0'"](https://discourse.cmake.org/t/cmake-does-not-find-gio-2-0/2551)

<div class="topic-metadata">

**Author:** [@colt](https://discourse.cmake.org/u/colt)\
**Replies:** 5\
**Last updated:** [January 30, 2021, 11:58pm UTC](https://discourse.cmake.org/t/cmake-does-not-find-gio-2-0/2551 "2021-01-30T23:58:54Z")

</div>

Hello. This time I am using cmake in another program and it cannot find three other packages. One of them it is: gio-2.0 I executed cmake . and it returned: – valac 0.30.0 found – Checking for modules ‘sqlite3\>=3.6.1…

---

## [when to use find modules?](https://discourse.cmake.org/t/when-to-use-find-modules/2655)

<div class="topic-metadata">

**Author:** [@hex](https://discourse.cmake.org/u/hex)\
**Replies:** 3\
**Last updated:** [January 29, 2021, 5:04pm UTC](https://discourse.cmake.org/t/when-to-use-find-modules/2655 "2021-01-29T17:04:09Z")

</div>

the responsibility for package modules and packages with configuration details are basically the same. Professional CMake has an additional chapter which describes the use of config files for Non-CMake projects. Doesn’t …

---

## [ExternalProject\_Add and setting/appending to CMAKE\_CXX\_FLAGS](https://discourse.cmake.org/t/externalproject-add-and-setting-appending-to-cmake-cxx-flags/1275)

<div class="topic-metadata">

**Author:** [@KrisThielemans](https://discourse.cmake.org/u/KrisThielemans)\
**Replies:** 5\
**Last updated:** [January 29, 2021, 2:16pm UTC](https://discourse.cmake.org/t/externalproject-add-and-setting-appending-to-cmake-cxx-flags/1275 "2021-01-29T14:16:32Z")

</div>

We use a SuperBuild and need to pass extra compiler flags on Windows with Visual Studio to the (CMake-based) external project. We have no control over the project. My strategy was to do something like ExternalProject\_A…

---

## [ExternalProject: Use of cygwin's make tool in non-cygwin builds](https://discourse.cmake.org/t/externalproject-use-of-cygwins-make-tool-in-non-cygwin-builds/2652)

<div class="topic-metadata">

**Author:** [@craig.scott](https://discourse.cmake.org/u/craig.scott)\
**Replies:** 2\
**Last updated:** [January 29, 2021, 12:55pm UTC](https://discourse.cmake.org/t/externalproject-use-of-cygwins-make-tool-in-non-cygwin-builds/2652 "2021-01-29T12:55:12Z")

</div>

@brad.king I’m trying to understand the rationale behind this quite old commit which handles the use of $(MAKE) in an ExternalProject step command. It seems to be invoking cygpath for a non-cygwin build and is forcing th…

---

## [Passing UTF-16 strings from CPack to NSIS](https://discourse.cmake.org/t/passing-utf-16-strings-from-cpack-to-nsis/2646)

<div class="topic-metadata">

**Author:** [@baleboy](https://discourse.cmake.org/u/baleboy)\
**Replies:** 11\
**Last updated:** [January 29, 2021, 4:06am UTC](https://discourse.cmake.org/t/passing-utf-16-strings-from-cpack-to-nsis/2646 "2021-01-29T04:06:21Z")

</div>

Hello, I’m working with a project that uses the CPack NSIS generator. I would like to display the “registered trademark” (®) symbol in the installer text, but I haven’t been able to make it work. I added the character d…

---

## [Documentation issue : Policy CMP0077](https://discourse.cmake.org/t/documentation-issue-policy-cmp0077/2644)

<div class="topic-metadata">

**Author:** [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)\
**Replies:** 3\
**Last updated:** [January 28, 2021, 9:51pm UTC](https://discourse.cmake.org/t/documentation-issue-policy-cmp0077/2644 "2021-01-28T21:51:33Z")

</div>

When I read this policy I thought: “Does this policy of honoring normal variables only apply if the cache variable was created with option()? What if the variable is created using set like this?” set(FOOBAR 1 CACHE ST…

---

## [automated testing of CMakelists.txt file before generation](https://discourse.cmake.org/t/automated-testing-of-cmakelists-txt-file-before-generation/2651)

<div class="topic-metadata">

**Author:** [@Rich\_Cole](https://discourse.cmake.org/u/Rich_Cole)\
**Replies:** 0\
**Last updated:** [January 28, 2021, 7:11pm UTC](https://discourse.cmake.org/t/automated-testing-of-cmakelists-txt-file-before-generation/2651 "2021-01-28T19:11:51Z")

</div>

has anyone developed a test or script to automate testing of CMakelists.txt file before generation. I need to test the CMakeList files to make sure the “developers” don’t mess up the defined variables before specific bui…

---

## [CMake 3.19.4 available for download](https://discourse.cmake.org/t/cmake-3-19-4-available-for-download/2649)

<div class="topic-metadata">

**Author:** [@Tom\_Osika](https://discourse.cmake.org/u/Tom_Osika)\
**Replies:** 0\
**Last updated:** [January 28, 2021, 5:23pm UTC](https://discourse.cmake.org/t/cmake-3-19-4-available-for-download/2649 "2021-01-28T17:23:06Z")

</div>

We are pleased to announce that CMake 3.19.4 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! Changes made since CMake 3.19.3: …

---

## [error: pathspec did not match any file(s) known to git](https://discourse.cmake.org/t/error-pathspec-did-not-match-any-file-s-known-to-git/2641)

<div class="topic-metadata">

**Author:** [@Gilfoyle](https://discourse.cmake.org/u/Gilfoyle)\
**Replies:** 2\
**Last updated:** [January 27, 2021, 8:27pm UTC](https://discourse.cmake.org/t/error-pathspec-did-not-match-any-file-s-known-to-git/2641 "2021-01-27T20:27:50Z")

</div>

I am receiving this error after changing SOURCE\_DIR in FetchContent\_Declare: error: pathspec did not match any file(s) known to git a minimal example: cmake\_minimum\_required( VERSION 3.16 ) project(MyProj VERSION 0 LA…

---

## [How to portably specify header search paths to target\_include\_directories()?](https://discourse.cmake.org/t/how-to-portably-specify-header-search-paths-to-target-include-directories/2638)

<div class="topic-metadata">

**Author:** [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)\
**Replies:** 4\
**Last updated:** [January 27, 2021, 5:56pm UTC](https://discourse.cmake.org/t/how-to-portably-specify-header-search-paths-to-target-include-directories/2638 "2021-01-27T17:56:15Z")

</div>

Library mylib contains file foo.c which includes: #include \<Xm/Xm.h\> On my linux system, file /usr/include/Xm/Xm.h exists and /usr/include is treated as a “system” header directory by the compiler, and so there’s no ne…

---

## [CMAKE\_INSTALL\_PREFIX in CPACK\_PRE\_BUILD\_SCRIPTS](https://discourse.cmake.org/t/cmake-install-prefix-in-cpack-pre-build-scripts/2631)

<div class="topic-metadata">

**Author:** [@floofy\_kh](https://discourse.cmake.org/u/floofy_kh)\
**Replies:** 4\
**Last updated:** [January 27, 2021, 8:42am UTC](https://discourse.cmake.org/t/cmake-install-prefix-in-cpack-pre-build-scripts/2631 "2021-01-27T08:42:59Z")

</div>

Hello, I’m trying to use CPACK\_PRE\_BUILD\_SCRIPTS to filter out certain files from the staging directory before CPack begins packaging. The use case for this is that we call on an external package manager executable to c…

---

## [libgcc\_s\_dw2-1.dll required even with the -static option (MinGW64\_9\_3 compiler)](https://discourse.cmake.org/t/libgcc-s-dw2-1-dll-required-even-with-the-static-option-mingw64-9-3-compiler/2640)

<div class="topic-metadata">

**Author:** [@grimgort](https://discourse.cmake.org/u/grimgort)\
**Replies:** 0\
**Last updated:** [January 27, 2021, 8:38am UTC](https://discourse.cmake.org/t/libgcc-s-dw2-1-dll-required-even-with-the-static-option-mingw64-9-3-compiler/2640 "2021-01-27T08:38:36Z")

</div>

Hello, I have a problem that I can’t solve. My executable still depends on the libgcc\_s\_dw2-1.dll dll whereas I want to have it static in the executable. I have 2 libs A and B in c, one lib C in fortran and I create an…

---

## [.lst file generation in cmake](https://discourse.cmake.org/t/lst-file-generation-in-cmake/2600)

<div class="topic-metadata">

**Author:** [@deepan](https://discourse.cmake.org/u/deepan)\
**Replies:** 2\
**Last updated:** [January 27, 2021, 4:09am UTC](https://discourse.cmake.org/t/lst-file-generation-in-cmake/2600 "2021-01-27T04:09:34Z")

</div>

i want to generate .lst files for my source file. I am successfully able to generate the executable. But i dont know how to generate .lst files for my source files. get\_property(allsrcfiles TARGET myExe PROPERTY SOURCE…

---

## [How to use Resource Files (.rc) in CMake?](https://discourse.cmake.org/t/how-to-use-resource-files-rc-in-cmake/2628)

<div class="topic-metadata">

**Author:** [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)\
**Replies:** 2\
**Last updated:** [January 26, 2021, 7:58pm UTC](https://discourse.cmake.org/t/how-to-use-resource-files-rc-in-cmake/2628 "2021-01-26T19:58:24Z")

</div>

I have added a resource file to my project like so: target\_sources(foobar PRIVATE foobar.rc) I’m able to successfully compile my project with Visual Studio. However, my Ninja build fails.

---

## [Help with try\_run() and CMAKE\_FLAGS](https://discourse.cmake.org/t/help-with-try-run-and-cmake-flags/2636)

<div class="topic-metadata">

**Author:** [@mathomp4](https://discourse.cmake.org/u/mathomp4)\
**Replies:** 3\
**Last updated:** [January 26, 2021, 3:07pm UTC](https://discourse.cmake.org/t/help-with-try-run-and-cmake-flags/2636 "2021-01-26T15:07:23Z")

</div>

All, I’m trying to figure out how to test if a compiler flag runs on a processor. The issue is that I’m porting some code from Intel chips to AMD Rome chips and I’ve found that if I compile (using Intel Fortran) with -x…

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

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