-
Notifications
You must be signed in to change notification settings - Fork 851
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
Define OSX if TARGET_OS_OSX for convenience #1658
Define OSX if TARGET_OS_OSX for convenience #1658
Conversation
This comment has been minimized.
This comment has been minimized.
A TODO note: consider #1243. |
I just had a look at that, the suggestion seems to be to use the CMAKE_SYSTEM_NAME variable throughout. That strikes me as inferior to using the standard Apple definitions that are defined in TargetConditionals.h and which most of the code is already including via platform_sys.h. Best solution, IMO would be to:
Otherwise you've got to basically define "CMAKE_SYSTEM_NAME" if you are using this code but not using the CMAKE system. If that is not a valid use case then fair enough, bit it seems a little back-to-front to me.... |
Ok, I updated the PR with what in my view is the proper solution, but it's entirely up to you guys if you take it 👍 |
Maybe a single
|
That makes sense, I've updated the PR. |
Sorry, one more suggestion, given that we are looking at these definitions. 🙂 Comparing For example: #elif (TARGET_OS_MAC == 1) can be #elif TARGET_OS_MAC Another example condition: #elif defined(BSD) || TARGET_OS_MAC |
Thank you for your input, @oviano! |
It's convenient when not using the CMAKE system for platform_sys.h to define OSX when TARGET_OS_OSX is defined, to avoid having to define OSX, which really shouldn't be necessary.