-
Notifications
You must be signed in to change notification settings - Fork 1k
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
cmake apple framework support #1319
cmake apple framework support #1319
Conversation
Oopsie, will sort out the copyright CI failures first thing tomorrow. |
Missing copyright updates in the edited files is fixed now. |
It appears VS code auto-formatted utils_dynamic_libs.h and broke it :(. |
cmake/README.md
Outdated
@@ -19,6 +19,7 @@ TBB_INSTALL_VARS:BOOL - Enable auto-generated vars installation(packages generat | |||
TBB_VALGRIND_MEMCHECK:BOOL - Enable scan for memory leaks using Valgrind (OFF by default) | |||
TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH - Disable HWLOC automatic search by pkg-config tool (OFF by default) | |||
TBB_ENABLE_IPO - Enable Interprocedural Optimization (IPO) during the compilation (ON by default) | |||
TBB_BUILD_APPLE_FRAMEWORKS - Enable building Apple .frameworks instead of dylibs, only available on Apple platform. (OFF by default) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBB_BUILD_APPLE_FRAMEWORKS - Enable building Apple .frameworks instead of dylibs, only available on Apple platform. (OFF by default) | |
TBB_BUILD_APPLE_FRAMEWORKS - Enable the Apple* frameworks instead of dylibs, only available on the Apple platform. (OFF by default) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aepanchi I'm not sure why Apple needs a asterisk. Is it to mark it as copyright? If so, shouldn't the 2nd Apple in this string also have an asterisk?
Tbh, I'm also not 100% about the 'the' in front of Apple in this sentence. But then again, I'm not a native English speaker :).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@geertbleyen Yes, it is for the copyright purposes. Just one for the first mention in the file is enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, fixed.
test/common/utils_dynamic_libs.h
Outdated
@@ -46,9 +46,17 @@ namespace utils { | |||
#endif | |||
#define EXT ".dll" | |||
#else | |||
#if TBB_USE_APPLE_FRAMEWORKS | |||
#define PREFIX // When build as Apple Framework, the binary has no lib prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define PREFIX // When build as Apple Framework, the binary has no lib prefix | |
#define PREFIX // When built as Apple* Framework, the binary has no lib prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
test/common/utils_dynamic_libs.h
Outdated
#if __APPLE__ | ||
#if TBB_USE_APPLE_FRAMEWORKS | ||
#define EXT // When build as Apple Framework, the binary has no lib prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define EXT // When build as Apple Framework, the binary has no lib prefix | |
#define EXT // When built as Apple* Framework, the binary has no lib prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@isaevil Is anything else required from me to get this PR completed? |
Hi @isaevil , any progress on this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, sorry for late review. Generally, it looks good, left some minor comment.
Add * to Apple to indicate trademark Co-authored-by: Ilya Isaev <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Add cmake option TBB_BUILD_APPLE_FRAMEWORKS to build oneTBB as Apple Frameworks.
This is needed to be able to create iOS compatible app bundles which need to embed TBB as framework, as using dylibs is prohibited by Apple.
Fixes #1252
Type of change
Tests
Documentation
Breaks backward compatibility
Notify the following users
@isaevil
Other information
I've also ran into various integer type mismatches when building (mainly long <-> int) when I was working on this (using a M2 MacBook Pro). Not sure if I should include these fixes (just static_cast'ing to the expected types) in this PR or not?