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

[tbb] Add shared library support for Linux and OSX #6510

Merged
merged 5 commits into from
Jul 3, 2019

Conversation

lebdron
Copy link
Contributor

@lebdron lebdron commented May 17, 2019

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

Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
@@ -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")
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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?

@lebdron
Copy link
Contributor Author

lebdron commented May 27, 2019

@cenit @grdowns any updates on this? OS condition seemed to work OK here https://github.com/microsoft/vcpkg/pull/6529/files#diff-e6f07c58ae4388f46fd046cd2c435d4bR43

@cenit
Copy link
Contributor

cenit commented May 27, 2019

IMHO they are broken there like here...

@grdowns
Copy link
Contributor

grdowns commented Jul 2, 2019

/azp run

@grdowns
Copy link
Contributor

grdowns commented Jul 3, 2019

Thanks for enabling this for us, @lebdron!

@grdowns grdowns merged commit f9fedc9 into microsoft:master Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants