Skip to content

CMake 4.0 CMAKE_OSX_SYSROOT default is now empty #18

@Ygrik2003

Description

@Ygrik2003

In file 3_bidirectional_cxx_interop/cmake/modules/InitializeSwift.cmake using

set(SDK_FLAGS "-sdk" "${CMAKE_OSX_SYSROOT}")

But in cmake 4.0 CMAKE_OSX_SYSROOT is empty for MacOS target platform
From documentation:

Changed in version 4.0: The default is now empty. Previously a default was computed based on the CMAKE_OSX_DEPLOYMENT_TARGET or the host platform.

So if try build with cmake, build failed with error:

xcrun: error: argument to '--sdk' is missing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions