apple-compiler-selection.rst 1.1 KB

12345678910111213141516171819
  1. apple-compiler-selection
  2. ------------------------
  3. * Builds targeting macOS no longer choose any SDK or pass an ``-isysroot``
  4. flag to the compiler by default. Instead, compilers are expected to
  5. choose a default macOS SDK on their own. In order to use a compiler that
  6. does not do this, users must now specify ``-DCMAKE_OSX_SYSROOT=macosx``
  7. when configuring their build.
  8. * On macOS with :ref:`Ninja Generators` and :ref:`Makefile Generators`, when
  9. a compiler is found in ``/usr/bin``, it is now used as-is and is no longer
  10. mapped to the corresponding compiler inside Xcode. The mapping was
  11. introduced by CMake 3.2 to allow build trees to continue to work with their
  12. original compiler even when ``xcode-select`` switches to a different
  13. Xcode installation. However, the compilers inside Xcode cannot be used
  14. without explicit ``-isysroot`` flags and are therefore not suitable for
  15. passing to arbitrary third-party build systems. Furthermore, the mapping
  16. behavior can override user-specified compiler paths. Therefore, this
  17. behavior has been reverted.