# \#os:macos

**URL:** https://discourse.cmake.org/tag/os-macos/3.md?match_all_tags=true&page=1&tags%5B%5D=os%3Amacos

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

**Page:** 2

---

## [CMakeDetermineCompilerId.cmake: very strange failure to open file](https://discourse.cmake.org/t/cmakedeterminecompilerid-cmake-very-strange-failure-to-open-file/14177)

<div class="topic-metadata">

**Author:** [@Joymaker](https://discourse.cmake.org/u/Joymaker)\
**Replies:** 0\
**Last updated:** [May 29, 2025, 8:38pm UTC](https://discourse.cmake.org/t/cmakedeterminecompilerid-cmake-very-strange-failure-to-open-file/14177 "2025-05-29T20:38:09Z")

</div>

C:\\msys64\\mingw64\\bin\\cmake.exe -DCMAKE\_BUILD\_TYPE:STRING=Debug -DCMAKE\_EXPORT\_COMPILE\_COMMANDS:BOOL=TRUE -DCMAKE\_C\_COMPILER:FILEPATH=C:\\msys64\\mingw64\\bin\\gcc.exe -DCMAKE\_CXX\_COMPILER:FILEPATH=C:\\msys64\\mingw64\\bin\\g…

---

## [Generated Xcode project APP packaging problem in XCode 16.3](https://discourse.cmake.org/t/generated-xcode-project-app-packaging-problem-in-xcode-16-3/14149)

<div class="topic-metadata">

**Author:** [@SFENCE](https://discourse.cmake.org/u/SFENCE)\
**Replies:** 0\
**Last updated:** [May 24, 2025, 2:48pm UTC](https://discourse.cmake.org/t/generated-xcode-project-app-packaging-problem-in-xcode-16-3/14149 "2025-05-24T14:48:19Z")

</div>

Cmake generated Xcode project produces macos app as appname.app/Contexts/APPFILES in XCode 16.2 and lower. Starts with XCode 16.3, same project produces macos app as appname.app/APPFILES. Looks like iOS app format. Wha…

---

## [Random bug when building makefile project by using ExternalProject\_Add()](https://discourse.cmake.org/t/random-bug-when-building-makefile-project-by-using-externalproject-add/13998)

<div class="topic-metadata">

**Author:** [@acraft](https://discourse.cmake.org/u/acraft)\
**Replies:** 1\
**Last updated:** [April 28, 2025, 1:43pm UTC](https://discourse.cmake.org/t/random-bug-when-building-makefile-project-by-using-externalproject-add/13998 "2025-04-28T13:43:11Z")

</div>

Hello, I use ExternalProject\_Add() to build Open MPI project which uses make file project. When I build the project from command line there is no issue. When I use ExternalProject\_Add(), it fails randomly. Sometime it b…

---

## [Help with "Generate Debug Symbols" - build setting in Xcode project generated by CMake](https://discourse.cmake.org/t/help-with-generate-debug-symbols-build-setting-in-xcode-project-generated-by-cmake/11141)

<div class="topic-metadata">

**Author:** [@johnwick](https://discourse.cmake.org/u/johnwick)\
**Replies:** 1\
**Last updated:** [April 15, 2025, 1:14pm UTC](https://discourse.cmake.org/t/help-with-generate-debug-symbols-build-setting-in-xcode-project-generated-by-cmake/11141 "2025-04-15T13:14:40Z")

</div>

I’m trying to generate Xcode project file of some libraries with CMake. I want to generate dSYM file in all build config type. I set values in all my CMakelists.txt as below: set(CMAKE\_CXX\_FLAGS "${CMAKE\_CXX\_FLAGS}…

---

## [Adding two macOS .app directories to a bundle](https://discourse.cmake.org/t/adding-two-macos-app-directories-to-a-bundle/13878)

<div class="topic-metadata">

**Author:** [@Gonzalo\_Garramuno](https://discourse.cmake.org/u/Gonzalo_Garramuno)\
**Replies:** 0\
**Last updated:** [April 3, 2025, 8:06pm UTC](https://discourse.cmake.org/t/adding-two-macos-app-directories-to-a-bundle/13878 "2025-04-03T20:06:30Z")

</div>

I am using CMake’s Bundle to install my single application. However, I have now developed a new one. For Linux and Windows it is no issue as they can both live in the bin folder. However, for macOS, I would like, for …

---

## [Linking C shared library - Undefined symbols](https://discourse.cmake.org/t/linking-c-shared-library-undefined-symbols/13864)

<div class="topic-metadata">

**Author:** [@ghenry](https://discourse.cmake.org/u/ghenry)\
**Replies:** 3\
**Last updated:** [April 2, 2025, 8:58pm UTC](https://discourse.cmake.org/t/linking-c-shared-library-undefined-symbols/13864 "2025-04-02T20:58:40Z")

</div>

Hi all, Looking for a second pair of eyes. My CI is failing on macOS for my shared lib. I’m not sure why linking is failing. My CMakeLists.txt High level: C binary project builds a lib of itself Rust library uses an…

---

## [Fetch Content EXCLUDE\_FROM\_ALL still adds targets to Xcode IDE](https://discourse.cmake.org/t/fetch-content-exclude-from-all-still-adds-targets-to-xcode-ide/13841)

<div class="topic-metadata">

**Author:** [@K20shores](https://discourse.cmake.org/u/K20shores)\
**Replies:** 4\
**Last updated:** [March 28, 2025, 11:23pm UTC](https://discourse.cmake.org/t/fetch-content-exclude-from-all-still-adds-targets-to-xcode-ide/13841 "2025-03-28T23:23:06Z")

</div>

Below is a minimal cmake file that includes eigen with fetch content. cmake\_minimum\_required(VERSION 3.28) project(EigenFetchExample LANGUAGES CXX) include(FetchContent) FetchContent\_Declare( eigen GIT\_REPOSIT…

---

## [Adding openssl.xcframework to XCode using CMake](https://discourse.cmake.org/t/adding-openssl-xcframework-to-xcode-using-cmake/11035)

<div class="topic-metadata">

**Author:** [@puneet\_gurtoo](https://discourse.cmake.org/u/puneet_gurtoo)\
**Replies:** 1\
**Last updated:** [March 13, 2025, 10:11pm UTC](https://discourse.cmake.org/t/adding-openssl-xcframework-to-xcode-using-cmake/11035 "2025-03-13T22:11:02Z")

</div>

I have created a static xcframework for openssl to use in one of my iOS projects. Have attached the screenshot with structure of xcframework. Can we link this to XCode project using CMake ? Is this supported by CMake no…

---

## [cmake-gui doesn't allow preset configurations to be selected](https://discourse.cmake.org/t/cmake-gui-doesnt-allow-preset-configurations-to-be-selected/13734)

<div class="topic-metadata">

**Author:** [@Ravenwater](https://discourse.cmake.org/u/Ravenwater)\
**Replies:** 1\
**Last updated:** [March 13, 2025, 2:23pm UTC](https://discourse.cmake.org/t/cmake-gui-doesnt-allow-preset-configurations-to-be-selected/13734 "2025-03-13T14:23:15Z")

</div>

Running into a problem that cmake-gui doesn’t seem to honor presets: How do we select presets via the GUI workflow?

---

## [Linking shared library fails on MacOS](https://discourse.cmake.org/t/linking-shared-library-fails-on-macos/13706)

<div class="topic-metadata">

**Author:** [@shmuel](https://discourse.cmake.org/u/shmuel)\
**Replies:** 0\
**Last updated:** [March 9, 2025, 9:09pm UTC](https://discourse.cmake.org/t/linking-shared-library-fails-on-macos/13706 "2025-03-09T21:09:45Z")

</div>

There are 2 targets (the code is simplified): far2m - an executable that also exports symbols, e.g. if(${CMAKE\_SYSTEM\_NAME} MATCHES "Darwin") add\_executable(far2m MACOSX\_BUNDLE ${SOURCES} "DE/Far.icns") else() …

---

## [cmake ctest bash completion issue](https://discourse.cmake.org/t/cmake-ctest-bash-completion-issue/13573)

<div class="topic-metadata">

**Author:** [@pjaol](https://discourse.cmake.org/u/pjaol)\
**Replies:** 0\
**Last updated:** [February 13, 2025, 5:02pm UTC](https://discourse.cmake.org/t/cmake-ctest-bash-completion-issue/13573 "2025-02-13T17:02:38Z")

</div>

Howdy Ran into an issue with the bash autocompletion file for ctest on bash version BASH\_VERSION 3.2.57(1)-release Which comes with Sonoma Gromgit from the homebrew folks has a fix for it Could I get someone to tak…

---

## [Looking for clarity on using find\_package with a dylib and xcframework in same directory.](https://discourse.cmake.org/t/looking-for-clarity-on-using-find-package-with-a-dylib-and-xcframework-in-same-directory/13545)

<div class="topic-metadata">

**Author:** [@externl](https://discourse.cmake.org/u/externl)\
**Replies:** 2\
**Last updated:** [February 7, 2025, 3:04pm UTC](https://discourse.cmake.org/t/looking-for-clarity-on-using-find-package-with-a-dylib-and-xcframework-in-same-directory/13545 "2025-02-07T15:04:21Z")

</div>

Hello, Sorry if this should be obvious but I’m relatively new to cmake and haven’t been able to find a clean solution to my issue. I’m trying to create some imported targets for an installation of a library on my syste…

---

## [Proper post\_build script in xcode for Firebase Crashlytics?](https://discourse.cmake.org/t/proper-post-build-script-in-xcode-for-firebase-crashlytics/13465)

<div class="topic-metadata">

**Author:** [@shokarta](https://discourse.cmake.org/u/shokarta)\
**Replies:** 0\
**Last updated:** [January 23, 2025, 11:55am UTC](https://discourse.cmake.org/t/proper-post-build-script-in-xcode-for-firebase-crashlytics/13465 "2025-01-23T11:55:09Z")

</div>

Hello Guys… I am trying to properly automatizate Get started with Firebase Crashlytics step 4C and 4D. when it set manualy, it shall look like this: so, what I tried is: set(DWARF\_DSYM\_FOLDER\_PATH "${DWARF\_DSYM\_F…

---

## [Multiple compiler link problems](https://discourse.cmake.org/t/multiple-compiler-link-problems/13346)

<div class="topic-metadata">

**Author:** [@ramcdona](https://discourse.cmake.org/u/ramcdona)\
**Replies:** 1\
**Last updated:** [January 11, 2025, 6:57pm UTC](https://discourse.cmake.org/t/multiple-compiler-link-problems/13346 "2025-01-11T18:57:01Z")

</div>

For $reasons$, I need to build my project as libraries using different compilers and then link them together. I am on MacOS and am trying to blend XCode and GCC. I’ve set up a MWE on GitHub here with a longer explanati…

---

## [Customize the behavior of "ctest -T test" and "ctest -T coverage"](https://discourse.cmake.org/t/customize-the-behavior-of-ctest-t-test-and-ctest-t-coverage/13369)

<div class="topic-metadata">

**Author:** [@RichS](https://discourse.cmake.org/u/RichS)\
**Replies:** 0\
**Last updated:** [January 10, 2025, 5:33pm UTC](https://discourse.cmake.org/t/customize-the-behavior-of-ctest-t-test-and-ctest-t-coverage/13369 "2025-01-10T17:33:23Z")

</div>

Is there a way to customize what ctest does when using the “-T test” and “-T coverage” arguments? I have a project where I would like to easily limit which tests run and normally I use labels for that as in “ctest -L ni…

---

## [How to set dyld path via FindPackage(Boost)?](https://discourse.cmake.org/t/how-to-set-dyld-path-via-findpackage-boost/13323)

<div class="topic-metadata">

**Author:** [@Vdaleke](https://discourse.cmake.org/u/Vdaleke)\
**Replies:** 1\
**Last updated:** [January 8, 2025, 10:10am UTC](https://discourse.cmake.org/t/how-to-set-dyld-path-via-findpackage-boost/13323 "2025-01-08T10:10:07Z")

</div>

I encountered a problem: I have myself-built boost libraries which FindBoost module finds perfectly, but when I look built binary with otool -L I see not full paths of boost libraries, but only their names: (venv) ➜ t…

---

## [Swift/C++ interop.](https://discourse.cmake.org/t/swift-c-interop/13296)

<div class="topic-metadata">

**Author:** [@eyalamir](https://discourse.cmake.org/u/eyalamir)\
**Replies:** 8\
**Last updated:** [January 7, 2025, 11:53pm UTC](https://discourse.cmake.org/t/swift-c-interop/13296 "2025-01-07T23:53:56Z")

</div>

I’m trying to use the relatively-new interop feature of Swift and C++. Apple provides this example repo: But their interop example only compiles using the Ninja generator, and fails with the Xcode generator. Is there…

---

## [opencv2/opencv.hpp' file not found](https://discourse.cmake.org/t/opencv2-opencv-hpp-file-not-found/13274)

<div class="topic-metadata">

**Author:** [@omersmsr](https://discourse.cmake.org/u/omersmsr)\
**Replies:** 2\
**Last updated:** [December 29, 2024, 8:59pm UTC](https://discourse.cmake.org/t/opencv2-opencv-hpp-file-not-found/13274 "2024-12-29T20:59:36Z")

</div>

I have been trying to solve this problem for hours. How do ı solve the problem?

---

## [file(GET\_RUNTIME\_DEPENDENCIES) gives error "Resolved path is not absolute" on OS X](https://discourse.cmake.org/t/file-get-runtime-dependencies-gives-error-resolved-path-is-not-absolute-on-os-x/13242)

<div class="topic-metadata">

**Author:** [@KKhanhH](https://discourse.cmake.org/u/KKhanhH)\
**Replies:** 7\
**Last updated:** [December 27, 2024, 10:28am UTC](https://discourse.cmake.org/t/file-get-runtime-dependencies-gives-error-resolved-path-is-not-absolute-on-os-x/13242 "2024-12-27T10:28:21Z")

</div>

I’m using CMake on OS X and I’m trying to build an executable with linked shared libraries. I’d like to have the install step copy the shared libraries next to the executable file, so I’m using the RUNTIME\_DEPENDENCIES o…

---

## [How to cross compile from linux to all desktop OSes and architectures](https://discourse.cmake.org/t/how-to-cross-compile-from-linux-to-all-desktop-oses-and-architectures/13191)

<div class="topic-metadata">

**Author:** [@Paradox84](https://discourse.cmake.org/u/Paradox84)\
**Replies:** 0\
**Last updated:** [December 12, 2024, 8:46pm UTC](https://discourse.cmake.org/t/how-to-cross-compile-from-linux-to-all-desktop-oses-and-architectures/13191 "2024-12-12T20:46:21Z")

</div>

I’m trying to cross compile from github actions for all the desktop OSes and architectures. Github actions part is only relevant to always starting from a fresh install of ubuntu 24.04 Host is always ubuntu 24.04 x86\_64…

---

## [Cmake not seeing project or cmake\_minimum\_required](https://discourse.cmake.org/t/cmake-not-seeing-project-or-cmake-minimum-required/13091)

<div class="topic-metadata">

**Author:** [@algebravic](https://discourse.cmake.org/u/algebravic)\
**Replies:** 1\
**Last updated:** [November 28, 2024, 9:18pm UTC](https://discourse.cmake.org/t/cmake-not-seeing-project-or-cmake-minimum-required/13091 "2024-11-28T21:18:38Z")

</div>

I’m trying to install a package called libsnark on a mac (OS 15.1.1, M3). I’m using cmake 3.31 available from homebrew. Its CMakeLists.txt file starts with cmake\_minimum\_required(VERSION 2.8) project (libsnark) Never…

---

## [CMAKE\_OSX\_SYSROOT does not guide compiler selection](https://discourse.cmake.org/t/cmake-osx-sysroot-does-not-guide-compiler-selection/4872)

<div class="topic-metadata">

**Author:** [@JoeM](https://discourse.cmake.org/u/JoeM)\
**Replies:** 6\
**Last updated:** [October 29, 2024, 5:08am UTC](https://discourse.cmake.org/t/cmake-osx-sysroot-does-not-guide-compiler-selection/4872 "2024-10-29T05:08:20Z")

</div>

The documentation for this variable explains: Specify the location or name of the macOS platform SDK to be used. CMake uses this value to compute the value of the -isysroot flag or equivalent and to help the find\_\* com…

---

## [Error with paths containing spaces in generated Ninja for C++/Swift interop](https://discourse.cmake.org/t/error-with-paths-containing-spaces-in-generated-ninja-for-c-swift-interop/12830)

<div class="topic-metadata">

**Author:** [@wAuner](https://discourse.cmake.org/u/wAuner)\
**Replies:** 2\
**Last updated:** [October 25, 2024, 6:26am UTC](https://discourse.cmake.org/t/error-with-paths-containing-spaces-in-generated-ninja-for-c-swift-interop/12830 "2024-10-25T06:26:58Z")

</div>

It looks like there is a bug in the CMake/Ninja generated swiftc invocation if a path contains spaces. The error message looks like \[build\] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/…

---

## [\-mllvm and -bitcode\_bundle (Xcode setting ENABLE\_BITCODE=YES) cannot be used together](https://discourse.cmake.org/t/mllvm-and-bitcode-bundle-xcode-setting-enable-bitcode-yes-cannot-be-used-together/11741)

<div class="topic-metadata">

**Author:** [@wander](https://discourse.cmake.org/u/wander)\
**Replies:** 2\
**Last updated:** [October 11, 2024, 6:29pm UTC](https://discourse.cmake.org/t/mllvm-and-bitcode-bundle-xcode-setting-enable-bitcode-yes-cannot-be-used-together/11741 "2024-10-11T18:29:25Z")

</div>

Hi, I am getting the following error while building my project: -mllvm and -bitcode\_bundle (Xcode setting ENABLE\_BITCODE=YES) cannot be used together Even though I do not set (manually) the -mllvm option anywhere in my…

---

## [Import C++ Standard Library Headers on CMake 3.30](https://discourse.cmake.org/t/import-c-standard-library-headers-on-cmake-3-30/11354)

<div class="topic-metadata">

**Author:** [@04a](https://discourse.cmake.org/u/04a)\
**Replies:** 3\
**Last updated:** [September 29, 2024, 9:49pm UTC](https://discourse.cmake.org/t/import-c-standard-library-headers-on-cmake-3-30/11354 "2024-09-29T21:49:50Z")

</div>

Hi, I’m trying to write a CMakeLists to compile C++ code with import \<...\>;, like: // main.cpp import \<iostream\>; int main() { std::cout \<\< "Hello World" \<\< std::endl; return 0; } It can be compiled by a simple co…

---

## [Xcode problem with files which has vary configuration](https://discourse.cmake.org/t/xcode-problem-with-files-which-has-vary-configuration/11754)

<div class="topic-metadata">

**Author:** [@Gregor\_Smith](https://discourse.cmake.org/u/Gregor_Smith)\
**Replies:** 5\
**Last updated:** [September 24, 2024, 1:04pm UTC](https://discourse.cmake.org/t/xcode-problem-with-files-which-has-vary-configuration/11754 "2024-09-24T13:04:26Z")

</div>

Hi everyone Below I present a example source code that I hav borrow from other topic but it is a good example of my problem. I do not know if it is a cmake problem or what but I cannot belive that this simple approach …

---

## [xcodebuild build -quiet](https://discourse.cmake.org/t/xcodebuild-build-quiet/11742)

<div class="topic-metadata">

**Author:** [@jasonaylward](https://discourse.cmake.org/u/jasonaylward)\
**Replies:** 2\
**Last updated:** [September 22, 2024, 12:51pm UTC](https://discourse.cmake.org/t/xcodebuild-build-quiet/11742 "2024-09-22T12:51:15Z")

</div>

Does anyone know of a way to pass the -quiet flag into xcodebuild build via CMake? Thanks!

---

## [Best way to consum a binary XCFramework (zip)](https://discourse.cmake.org/t/best-way-to-consum-a-binary-xcframework-zip/11721)

<div class="topic-metadata">

**Author:** [@a4z](https://discourse.cmake.org/u/a4z)\
**Replies:** 8\
**Last updated:** [September 21, 2024, 7:30am UTC](https://discourse.cmake.org/t/best-way-to-consum-a-binary-xcframework-zip/11721 "2024-09-21T07:30:54Z")

</div>

Hi, I have a download url to a CoolLib.xcframwork.zip, the zip contains CoolLib.xcframwork, a folder with the xcframewrok content, what is the CMake way to download and extract and have the path added to the search, so…

---

## [Increased count of compilation steps since CMake 3.30.3 update](https://discourse.cmake.org/t/increased-count-of-compilation-steps-since-cmake-3-30-3-update/11683)

<div class="topic-metadata">

**Author:** [@saschasc](https://discourse.cmake.org/u/saschasc)\
**Replies:** 1\
**Last updated:** [September 14, 2024, 2:39pm UTC](https://discourse.cmake.org/t/increased-count-of-compilation-steps-since-cmake-3-30-3-update/11683 "2024-09-14T14:39:57Z")

</div>

I was using CMake 3.26.4 before on several platforms (macOS, Linux, Windows). Since updating to the newest 3.30.3 the total number of steps to compile increased a lot (from 2k to almost 3.5k). The strange thing is that t…

---

## [Avoid duplicate linking to avoid Xcode 15 warnings](https://discourse.cmake.org/t/avoid-duplicate-linking-to-avoid-xcode-15-warnings/9084)

<div class="topic-metadata">

**Author:** [@szhorvat](https://discourse.cmake.org/u/szhorvat)\
**Replies:** 11\
**Last updated:** [September 6, 2024, 5:04pm UTC](https://discourse.cmake.org/t/avoid-duplicate-linking-to-avoid-xcode-15-warnings/9084 "2024-09-06T17:04:47Z")

</div>

Xcode 15 includes a new linker which complains when passing a static library more than once to the linker. What do we need to pay attention to to prevent CMake from duplicating libraries? What is a convenient way to det…

[Previous page](https://discourse.cmake.org/tag/os-macos/3.md?match_all_tags=true&tags%5B%5D=os%3Amacos)

[Next page](https://discourse.cmake.org/tag/os-macos/3.md?match_all_tags=true&page=2&tags%5B%5D=os%3Amacos)
