# \#os:macos

**URL:** https://discourse.cmake.org/tag/os-macos/3.md

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

---

## [Problem building v4.4.0 on MacOS](https://discourse.cmake.org/t/problem-building-v4-4-0-on-macos/15750)

<div class="topic-metadata">

**Author:** [@arnstein](https://discourse.cmake.org/u/arnstein)\
**Replies:** 2\
**Last updated:** [July 17, 2026, 6:06pm UTC](https://discourse.cmake.org/t/problem-building-v4-4-0-on-macos/15750 "2026-07-17T18:06:55Z")

</div>

I have the latest MacOS for ARM 26.5.2 and the latest version of Xcode. I have a spot of trouble building CMake from git tag v4.4.0. In the past, I have found Apple’s provided libiconv files to be inadequate, so I built …

---

## [Why is -isystem include path not used while CXX\_MODULE dependencies scan?](https://discourse.cmake.org/t/why-is-isystem-include-path-not-used-while-cxx-module-dependencies-scan/15729)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 4\
**Last updated:** [July 6, 2026, 7:23am UTC](https://discourse.cmake.org/t/why-is-isystem-include-path-not-used-while-cxx-module-dependencies-scan/15729 "2026-07-06T07:23:11Z")

</div>

same problem with clang-22 and gcc-16 on OSX bash-5.3$ ninja -C build/ -j 1 -k 1 -v ninja: Entering directory \`build/' \[1/183\] "/usr/local/Cellar/llvm/22.1.8/bin/clang-scan-deps" -format=p1689 -- /usr/local/Cellar/llvm/…

---

## [CPS doesn't work with Boost::headers](https://discourse.cmake.org/t/cps-doesnt-work-with-boost-headers/15720)

<div class="topic-metadata">

**Author:** [@Yanzhao\_Wang](https://discourse.cmake.org/u/Yanzhao_Wang)\
**Replies:** 4\
**Last updated:** [June 25, 2026, 1:30pm UTC](https://discourse.cmake.org/t/cps-doesnt-work-with-boost-headers/15720 "2026-06-25T13:30:17Z")

</div>

Hi, I have a project which uses the Boost library through the target Boost::headers . I really like the idea of CPS and I would like to use it to install the project. But I encountered a configuration error: CMake Erro…

---

## [How to get macOS/iOS framework root directory at install time?](https://discourse.cmake.org/t/how-to-get-macos-ios-framework-root-directory-at-install-time/15640)

<div class="topic-metadata">

**Author:** [@emaschino](https://discourse.cmake.org/u/emaschino)\
**Replies:** 1\
**Last updated:** [May 7, 2026, 3:39pm UTC](https://discourse.cmake.org/t/how-to-get-macos-ios-framework-root-directory-at-install-time/15640 "2026-05-07T15:39:13Z")

</div>

Hi, Let’s have a cross-platform command-line test application TestApp. This app depends on OpenCV, built as a dynamic framework on Apple. To install the app and runtime dependencies, I have: install(TARGETS TestApp …

---

## [error: C++26 was enabled in precompiled file 'CMakeFiles/\_\_cmake\_cxx23.dir/std.pcm' but is currently disabled](https://discourse.cmake.org/t/error-c-26-was-enabled-in-precompiled-file-cmakefiles-cmake-cxx23-dir-std-pcm-but-is-currently-disabled/15467)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 7\
**Last updated:** [April 16, 2026, 9:03am UTC](https://discourse.cmake.org/t/error-c-26-was-enabled-in-precompiled-file-cmakefiles-cmake-cxx23-dir-std-pcm-but-is-currently-disabled/15467 "2026-04-16T09:03:14Z")

</div>

I see this strange error when I try to build with an installed CXX\_MODULES, The installed module was build with: # CMake requires the language standard to be specified as compile feature # when a target provides C++23 …

---

## [Why is CMAKE\_MACOSX\_BUNDLE set to ON by default if CMAKE\_SYSTEM\_NAME equals to iOS, tvOS, visionOS or watchOS?](https://discourse.cmake.org/t/why-is-cmake-macosx-bundle-set-to-on-by-default-if-cmake-system-name-equals-to-ios-tvos-visionos-or-watchos/15578)

<div class="topic-metadata">

**Author:** [@jasjuang](https://discourse.cmake.org/u/jasjuang)\
**Replies:** 0\
**Last updated:** [March 25, 2026, 6:35am UTC](https://discourse.cmake.org/t/why-is-cmake-macosx-bundle-set-to-on-by-default-if-cmake-system-name-equals-to-ios-tvos-visionos-or-watchos/15578 "2026-03-25T06:35:38Z")

</div>

Why is CMAKE\_MACOSX\_BUNDLE set to ON by default if CMAKE\_SYSTEM\_NAME equals to iOS, tvOS, visionOS or watchOS? To me this creates unnecessary confusion, and I couldn’t find any explanation or justification about it anywh…

---

## [Experimental \`import std\` support not enabled when detecting toolchain clang-22.1?](https://discourse.cmake.org/t/experimental-import-std-support-not-enabled-when-detecting-toolchain-clang-22-1/15534)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 1\
**Last updated:** [March 1, 2026, 1:00pm UTC](https://discourse.cmake.org/t/experimental-import-std-support-not-enabled-when-detecting-toolchain-clang-22-1/15534 "2026-03-01T13:00:41Z")

</div>

bash-5.3$ ~/.local/bin/cmake --workflow llvm-release --fresh Executing workflow step 1 of 3: configure preset "llvm-release" -- CXXFLAGS=-stdlib=libc++ 'brew' '--prefix' 'llvm' -- LLVM\_DIR=/usr/local/Cellar/llvm/22.1.0 …

---

## [CMAKE\_CXX\_MODULE\_STD: cmake cmake v4.3.0-rc1 generate 30 times more targets?](https://discourse.cmake.org/t/cmake-cxx-module-std-cmake-cmake-v4-3-0-rc1-generate-30-times-more-targets/15512)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 4\
**Last updated:** [February 27, 2026, 3:43pm UTC](https://discourse.cmake.org/t/cmake-cxx-module-std-cmake-cmake-v4-3-0-rc1-generate-30-times-more-targets/15512 "2026-02-27T15:43:36Z")

</div>

@ben.boeckel the dependency scan seems to be the overkill at the moment? bash-5.3$ make release cmake --preset release --log-level=VERBOSE --fresh Preset CMake variables: BEMAN\_USE\_MODULES:BOOL="TRUE" BEMAN\_USE\_STD…

---

## [Linker error with import std example](https://discourse.cmake.org/t/linker-error-with-import-std-example/14224)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 7\
**Last updated:** [February 20, 2026, 3:07pm UTC](https://discourse.cmake.org/t/linker-error-with-import-std-example/14224 "2026-02-20T15:07:16Z")

</div>

I have this simple main.cxx: import std; int main(int argc, char\* argv\[\]) { if (argc \> 0 && argv\[0\]) { std::string argv0 = argv\[0\]; std::print("program: {}/n", argv0); } return 0; } and this CMakeLists.t…

---

## [set xcode "Library Search Paths" form cmake?](https://discourse.cmake.org/t/set-xcode-library-search-paths-form-cmake/12846)

<div class="topic-metadata">

**Author:** [@shokarta](https://discourse.cmake.org/u/shokarta)\
**Replies:** 4\
**Last updated:** [February 20, 2026, 3:34am UTC](https://discourse.cmake.org/t/set-xcode-library-search-paths-form-cmake/12846 "2026-02-20T03:34:42Z")

</div>

Hello guys, after I configure the project from QT, in xcode I need to manualy go to project BUILD SETTINGS, locate LIBRARY SEARCH PATHS and set some stuff manualy… can this be automated from cmake? I need to set follo…

---

## [How to correctly generate compile\_commands.json for library dependency using PkgConfig?](https://discourse.cmake.org/t/how-to-correctly-generate-compile-commands-json-for-library-dependency-using-pkgconfig/15135)

<div class="topic-metadata">

**Author:** [@skittishdev](https://discourse.cmake.org/u/skittishdev)\
**Replies:** 3\
**Last updated:** [February 19, 2026, 9:01pm UTC](https://discourse.cmake.org/t/how-to-correctly-generate-compile-commands-json-for-library-dependency-using-pkgconfig/15135 "2026-02-19T21:01:24Z")

</div>

Hi, I am on MacOS, and I use nix as my package manager. I am building a C project, and I’d like to use Criterion for my tests. I am able to build my project and run the tests, but my compile\_commands.json file is not ge…

---

## [cmake does not treat Boost as a system library on github runner macos-15-intel](https://discourse.cmake.org/t/cmake-does-not-treat-boost-as-a-system-library-on-github-runner-macos-15-intel/15496)

<div class="topic-metadata">

**Author:** [@ralfkonrad](https://discourse.cmake.org/u/ralfkonrad)\
**Replies:** 4\
**Last updated:** [February 12, 2026, 12:49pm UTC](https://discourse.cmake.org/t/cmake-does-not-treat-boost-as-a-system-library-on-github-runner-macos-15-intel/15496 "2026-02-12T12:49:26Z")

</div>

In the repo GitHub - ralfkonrad/cmake\_missing\_warning I am describing a situation which I would assume to be a bug: While the other GitHub runners suppress a Boost deprecation warning correctly due to target\_include\_di…

---

## [@\*.cppm.o.modmap files not found by clang-tidy?](https://discourse.cmake.org/t/cppm-o-modmap-files-not-found-by-clang-tidy/15354)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 2\
**Last updated:** [February 9, 2026, 3:54am UTC](https://discourse.cmake.org/t/cppm-o-modmap-files-not-found-by-clang-tidy/15354 "2026-02-09T03:54:16Z")

</div>

is it a clang-tidy problem oder a wrong CMake generated compile\_commands.jsonfile? Running clang-tidy for 4 files out of 4 in compilation database ... \[1/4\]\[6.3s\] /usr/local/Cellar/llvm/21.1.6/bin/clang-tidy -checks=-\*,…

---

## [The FindGTest.cmake module does not respect the version parameter?](https://discourse.cmake.org/t/the-findgtest-cmake-module-does-not-respect-the-version-parameter/15476)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 2\
**Last updated:** [January 24, 2026, 9:39pm UTC](https://discourse.cmake.org/t/the-findgtest-cmake-module-does-not-respect-the-version-parameter/15476 "2026-01-24T21:39:33Z")

</div>

bash-5.3$ cmake -S . -B build --log-level=DEBUG --fresh -- The C compiler identification is AppleClang 16.0.0.16000026 -- The CXX compiler identification is AppleClang 16.0.0.16000026 -- Detecting C compiler ABI info -- …

---

## [Why are the build and installed BMI files not used?](https://discourse.cmake.org/t/why-are-the-build-and-installed-bmi-files-not-used/15367)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 11\
**Last updated:** [December 6, 2025, 10:12pm UTC](https://discourse.cmake.org/t/why-are-the-build-and-installed-bmi-files-not-used/15367 "2025-12-06T22:12:05Z")

</div>

bash-5.3$ ninja -t deps | egrep -vw '(Cellar|Library)' | sort -u /Users/clausklein/Workspace/cpp/cxx20/fmt-module/stagedir/include/fmt/args.h /Users/clausklein/Workspace/cpp/cxx20/fmt-module/stagedir/include/fmt…

---

## [CMake Automatically Links Each New C File with Previous File - Have to Delete Cache for Every New File (CLion)](https://discourse.cmake.org/t/cmake-automatically-links-each-new-c-file-with-previous-file-have-to-delete-cache-for-every-new-file-clion/15293)

<div class="topic-metadata">

**Author:** [@Kunal](https://discourse.cmake.org/u/Kunal)\
**Replies:** 4\
**Last updated:** [November 20, 2025, 9:31am UTC](https://discourse.cmake.org/t/cmake-automatically-links-each-new-c-file-with-previous-file-have-to-delete-cache-for-every-new-file-clion/15293 "2025-11-20T09:31:56Z")

</div>

Note: I’m new to coding and CMake, so I might be missing something obvious. Please be patient with me! I’m working on a C programming practice project in CLion where I have multiple independent .c files (q1.c, q2.c, q3.…

---

## [CXX-Modules: import std does still not work on OSX with g++-15](https://discourse.cmake.org/t/cxx-modules-import-std-does-still-not-work-on-osx-with-g-15/15265)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 5\
**Last updated:** [October 27, 2025, 2:09pm UTC](https://discourse.cmake.org/t/cxx-modules-import-std-does-still-not-work-on-osx-with-g-15/15265 "2025-10-27T14:09:58Z")

</div>

I have this simple example copied form https://www.kitware.com/import-std-in-cmake-3-30/: # CMake 3.30 is required for C++23 \`import std\` support; we use 3.29.20240416 # here so that in-development versions satisfy it. …

---

## [CMAKE\_OSX\_ARCHITECTURES documentation page leaves a lot to be desired for newbie](https://discourse.cmake.org/t/cmake-osx-architectures-documentation-page-leaves-a-lot-to-be-desired-for-newbie/15177)

<div class="topic-metadata">

**Author:** [@ipatch](https://discourse.cmake.org/u/ipatch)\
**Replies:** 6\
**Last updated:** [October 13, 2025, 7:37am UTC](https://discourse.cmake.org/t/cmake-osx-architectures-documentation-page-leaves-a-lot-to-be-desired-for-newbie/15177 "2025-10-13T07:37:18Z")

</div>

dumb question from a dumb person. when working with cmake i often use the following cmake command, cmake -L to print a list of “variables” / “args” i can pass to my cmake based project. so i do a google for CMAKE\_OSX\_…

---

## [Find newer Python using old FindPython](https://discourse.cmake.org/t/find-newer-python-using-old-findpython/15221)

<div class="topic-metadata">

**Author:** [@Andrej730](https://discourse.cmake.org/u/Andrej730)\
**Replies:** 1\
**Last updated:** [October 7, 2025, 11:57am UTC](https://discourse.cmake.org/t/find-newer-python-using-old-findpython/15221 "2025-10-07T11:57:53Z")

</div>

In my cmake I fetch a couple Python components - Development, Interpreter and for simplicity I wanted to provide Python installation by just prefixing the PATH (e.g. -DCMAKE\_PREFIX\_PATH="/my/install/python-3.13.6") inst…

---

## [Question about Xcode project generator for Frameworks, Libraries and Embedded Content](https://discourse.cmake.org/t/question-about-xcode-project-generator-for-frameworks-libraries-and-embedded-content/15100)

<div class="topic-metadata">

**Author:** [@Seto](https://discourse.cmake.org/u/Seto)\
**Replies:** 1\
**Last updated:** [September 30, 2025, 6:20pm UTC](https://discourse.cmake.org/t/question-about-xcode-project-generator-for-frameworks-libraries-and-embedded-content/15100 "2025-09-30T18:20:41Z")

</div>

Hi. For static libraries, I found that the .a files are added as Other Linker Flags instead of adding them to Frameworks, Libraries and Embedded Content in General tab of Xcode projects if I use target\_link\_libraries(). …

---

## [File Copy Error, claiming files do not exist or are unmodifiable](https://discourse.cmake.org/t/file-copy-error-claiming-files-do-not-exist-or-are-unmodifiable/15193)

<div class="topic-metadata">

**Author:** [@SamCoutteauHybrid](https://discourse.cmake.org/u/SamCoutteauHybrid)\
**Replies:** 0\
**Last updated:** [September 24, 2025, 9:59am UTC](https://discourse.cmake.org/t/file-copy-error-claiming-files-do-not-exist-or-are-unmodifiable/15193 "2025-09-24T09:59:07Z")

</div>

Whilst running project in CI, I get weird errors related to file copy on specific platform generator combinations. Error cases 1 (only sometimes) Ubuntu CMAKE\_C\_COMPILER=/usr/bin/gcc CMAKE\_CXX\_COMPILER=/usr/bin/g++ CMAK…

---

## [MacOS deployment target as a usage requirement?](https://discourse.cmake.org/t/macos-deployment-target-as-a-usage-requirement/15092)

<div class="topic-metadata">

**Author:** [@benthevining](https://discourse.cmake.org/u/benthevining)\
**Replies:** 0\
**Last updated:** [August 21, 2025, 7:45pm UTC](https://discourse.cmake.org/t/macos-deployment-target-as-a-usage-requirement/15092 "2025-08-21T19:45:20Z")

</div>

The only way I’m aware of to set the MacOS deployment target is the CMAKE\_OSX\_DEPLOYMENT\_TARGET variable. But it occurs to me that certain C++ features require a minimum OS version, so why can’t libraries express their m…

---

## [macOS hdiutil packaging on GitHub Actions can fail if prepackage scripts are used](https://discourse.cmake.org/t/macos-hdiutil-packaging-on-github-actions-can-fail-if-prepackage-scripts-are-used/14990)

<div class="topic-metadata">

**Author:** [@Gonzalo\_Garramuno](https://discourse.cmake.org/u/Gonzalo_Garramuno)\
**Replies:** 3\
**Last updated:** [August 16, 2025, 2:05am UTC](https://discourse.cmake.org/t/macos-hdiutil-packaging-on-github-actions-can-fail-if-prepackage-scripts-are-used/14990 "2025-08-16T02:05:09Z")

</div>

When the prepackage.cmake scripts are used on macOS and these do a lot of file I/O macOS on GitHub actions can make hdiutil fail with a resource busy. Note that this happens sometimes only and I’ve been unable to reprodu…

---

## [Is there's a way to generate a xcode project which will use ninja to compile?](https://discourse.cmake.org/t/is-theres-a-way-to-generate-a-xcode-project-which-will-use-ninja-to-compile/15002)

<div class="topic-metadata">

**Author:** [@pbskycrystal](https://discourse.cmake.org/u/pbskycrystal)\
**Replies:** 1\
**Last updated:** [August 14, 2025, 5:48pm UTC](https://discourse.cmake.org/t/is-theres-a-way-to-generate-a-xcode-project-which-will-use-ninja-to-compile/15002 "2025-08-14T17:48:14Z")

</div>

I’m trying to switch our generator from Xcode to Ninja Multi-config, which makes compile much faster. But some of our teammates said they prefer using Xcode for develop/debug. Is there’s a way to generate a xcode projec…

---

## [Why does install() raise an error when RESOURCE is given a directory but CMake happily builds the app bundle?](https://discourse.cmake.org/t/why-does-install-raise-an-error-when-resource-is-given-a-directory-but-cmake-happily-builds-the-app-bundle/11374)

<div class="topic-metadata">

**Author:** [@MarkCallow](https://discourse.cmake.org/u/MarkCallow)\
**Replies:** 3\
**Last updated:** [July 27, 2025, 11:49am UTC](https://discourse.cmake.org/t/why-does-install-raise-an-error-when-resource-is-given-a-directory-but-cmake-happily-builds-the-app-bundle/11374 "2025-07-27T11:49:58Z")

</div>

One of the items I add to the RESOURCE property for my macOS app bundle is a directory. CMake happily creates the bundle with that directory and its hierarchy in the “Resources” directory. The app works fine. However wh…

---

## ["Show Live Issues" problem in Xcode with CMake generator and possible improvement](https://discourse.cmake.org/t/show-live-issues-problem-in-xcode-with-cmake-generator-and-possible-improvement/14176)

<div class="topic-metadata">

**Author:** [@Chinouo](https://discourse.cmake.org/u/Chinouo)\
**Replies:** 1\
**Last updated:** [July 20, 2025, 2:47am UTC](https://discourse.cmake.org/t/show-live-issues-problem-in-xcode-with-cmake-generator-and-possible-improvement/14176 "2025-07-20T02:47:03Z")

</div>

By default, CMake generates a .xcodeproj file, Xcode can index the code properly, but the Show Live Issues feature doesn’t work with this file. Code issues are only shown after building, However, if I create a new Xcode…

---

## [Using Intentdefinition Compiler using cmake for code generation](https://discourse.cmake.org/t/using-intentdefinition-compiler-using-cmake-for-code-generation/10229)

<div class="topic-metadata">

**Author:** [@Vipul\_Gupta](https://discourse.cmake.org/u/Vipul_Gupta)\
**Replies:** 5\
**Last updated:** [July 19, 2025, 2:06pm UTC](https://discourse.cmake.org/t/using-intentdefinition-compiler-using-cmake-for-code-generation/10229 "2025-07-19T14:06:00Z")

</div>

In Xcode, when we create an intent definition file, a corresponding swift file gets generated for the intent defined in the intent definition file. This happens with the help of IntentDefinition Compiler , which can be s…

---

## [Problems with fortran an Xcode generator](https://discourse.cmake.org/t/problems-with-fortran-an-xcode-generator/11112)

<div class="topic-metadata">

**Author:** [@Fabian188](https://discourse.cmake.org/u/Fabian188)\
**Replies:** 2\
**Last updated:** [July 17, 2025, 4:06pm UTC](https://discourse.cmake.org/t/problems-with-fortran-an-xcode-generator/11112 "2025-07-17T16:06:28Z")

</div>

I don’t know if this a bug, principally not possible or if I’m doing something wrong. I have a C,C++,Fortran cmake project which builds nicely with Apple clang and gfortran from brew on macOS. Usually I use Eclipse wit…

---

## [CXX\_MODULES: FAILED: CMakeFiles/Algo.dir/algo-impl.cpp.o.ddi](https://discourse.cmake.org/t/cxx-modules-failed-cmakefiles-algo-dir-algo-impl-cpp-o-ddi/14262)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 4\
**Last updated:** [July 4, 2025, 8:03pm UTC](https://discourse.cmake.org/t/cxx-modules-failed-cmakefiles-algo-dir-algo-impl-cpp-o-ddi/14262 "2025-07-04T20:03:44Z")

</div>

I have an import std; example based on C++20 Modules, CMake, And Shared Libraries It builds on CI windows (MS cl), ubuntu (gcc-15, gcc-16), but not with clang-20/21! @ben.boeckel But on my local iMac i368 (OSX) it bui…

---

## [Strange errors while build examples with CXX\_MODULEs on main branch](https://discourse.cmake.org/t/strange-errors-while-build-examples-with-cxx-modules-on-main-branch/14181)

<div class="topic-metadata">

**Author:** [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Replies:** 6\
**Last updated:** [June 7, 2025, 6:59pm UTC](https://discourse.cmake.org/t/strange-errors-while-build-examples-with-cxx-modules-on-main-branch/14181 "2025-06-07T18:59:59Z")

</div>

bash-5.2$ cd Tests/RunCMake/CXXModules/examples/import-std bash-5.2$ !CXX CXX=g++-15 cmake -S . -B build --fresh -D CMAKE\_CXX\_STANDARD\_LIBRARY=libstdc++ -- The CXX compiler identification is GNU 15.1.0 -- Checking whethe…

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