Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] CMAKE_SYSTEM_NAME is set to Darwin on iOS (watch and tv OS) #7875

Closed
a4z opened this issue Oct 13, 2020 · 6 comments · Fixed by #7924
Closed

[bug] CMAKE_SYSTEM_NAME is set to Darwin on iOS (watch and tv OS) #7875

a4z opened this issue Oct 13, 2020 · 6 comments · Fixed by #7924

Comments

@a4z
Copy link
Contributor

a4z commented Oct 13, 2020

Coming from here, #4550 I can see that the change was not enough.

The CMAKE_SYSTEM_NAME is always set to Darwin, even for iOS (cross) builds, what is wrong

please check
https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-or-watchos
that clearly specifies what should be used

and for example the help to the cmake IOS variable
https://cmake.org/cmake/help/latest/variable/IOS.html

Set to 1 when the target system (CMAKE_SYSTEM_NAME) is iOS

clearly, setting this to Darwin for iOS is not good.

Environment Details (include every applicable attribute)

  • Operating System+version: OSX 10.15.7
  • Compiler+version: apple clang 12
  • Conan version: 1.30.1
  • Python version: 3.8.5
@jgsogo
Copy link
Contributor

jgsogo commented Oct 13, 2020

We modified it here (#7827) but didn't change the values you are referring to. I think @czoido can help here, he is having to Conan toolchains for iOS.

@a4z
Copy link
Contributor Author

a4z commented Oct 13, 2020

if you want to build for iOS there is also this PR
conan-io/conan-center-index#1137

@czoido
Copy link
Contributor

czoido commented Oct 13, 2020

Yes, I think those should be changed to the corresponding platform since CMake 3.14+ has native support setting CMAKE_SYSTEM_NAME with iOS, tvOS, or watchOS.

@memsharded
Copy link
Member

Yes, I think those should be changed to the corresponding platform since CMake 3.14+ has native support setting CMAKE_SYSTEM_NAME with iOS, tvOS, or watchOS.

Please keep in mind that there are Conan users with versions lower than CMake 3.14, and this change shouldn't break them

@jgsogo jgsogo changed the title [bug] MAKE_SYSTEM_NAME is set to Darwin on iOS (watch and tv OS) [bug] CMAKE_SYSTEM_NAME is set to Darwin on iOS (watch and tv OS) Oct 14, 2020
@czoido
Copy link
Contributor

czoido commented Oct 22, 2020

Hi @a4z,

I have opened a PR to fix this issue assigned to Conan 1.31: #7924

@a4z
Copy link
Contributor Author

a4z commented Oct 22, 2020

Thanks, looks good!
Of course, I do not know what happens for cmake > 3.14 users, if they try to use the cmake-ios toolchain, but I think I am not interested to find out, they shall update cmake in this case , what makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants