-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[tbb] Add shared library support for Linux and OSX #6510
Conversation
Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
ports/tbb/portfile.cmake
Outdated
@@ -23,7 +23,13 @@ if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStor | |||
vcpkg_install_cmake() | |||
|
|||
# Settings for TBBConfigInternal.cmake.in | |||
set(TBB_LIB_EXT a) | |||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") |
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.
are you sure you want to chain a condition on linkage with a condition on os (two lines below)? it doesn't look like a clean approach
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.
https://github.com/intel/tbb/blob/cc2c04e2f5363fb8b34c10718ce406814810d1e6/cmake/TBBInstallConfig.cmake#L82-L87
I did not think of a better approach, could you suggest a better solution?
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.
Perhaps changing the string replacements below to be just:
string(REPLACE "set(_tbb_release_lib \"" ...)
instead of trying to exactly match the library name would make this way simpler?
@cenit @grdowns any updates on this? OS condition seemed to work OK here https://github.com/microsoft/vcpkg/pull/6529/files#diff-e6f07c58ae4388f46fd046cd2c435d4bR43 |
IMHO they are broken there like here... |
/azp run |
Thanks for enabling this for us, @lebdron! |
It is recommended to link TBB as a shared library. Reasoning is provided in section "Is there a version of TBB that provides statically linked libraries?" of https://www.threadingbuildingblocks.org/faq/11