Open EduMenges opened 3 months ago
There is an issue I've noticed tho, when compiling for a different architecture. CMAKE_SYSTEM_NAME
wouldn't get replaced when an x86_64
mac is trying to compile for an aarch64
mac, which wouldn't turn CMAKE_CROSSCOMPILING
on (I think?).
I could add an extra check, but it seems more of a workaround than a definite solution.
Please rebase your changes on the latest origin/master. I'd completely missed the deprecation of the macos-11 runner that many of the tests were relying on :/ Sorry for the inconvenience.
As stated on CMake's documentation:
This is problematic when building on a mac for a mac because
CMAKE_CROSSCOMPILING
will be enabled, causing wonky behavior when building projects that relies on this variable, such as gRPC.By firstly assigning the
CMAKE_SYSTEM_NAME
to a variable and checking it againstCMAKE_HOST_SYSTEM_NAME
, we prevent this behavior andCMAKE_CROSSCOMPILING
will only be set when it is actually necessary.