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

fPIC to follow cmake rules #1269

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sinkingsugar
Copy link

Description

Small change to allow STATIC compilation on Windows

Type of change

simple Clang.cmake change

@GrossoMoreira
Copy link

This might solve an issue mentioned here: conan-io/conan-center-index#21320

Comment on lines +60 to +64
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security $<$<NOT:$<BOOL:${EMSCRIPTEN}>>:-fstack-protector-strong>)

if(CMAKE_POSITION_INDEPENDENT_CODE)
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fPIC)
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't even need to set it explicitly since POSITION_INDEPENDENT_CODE is True by default for SHARED libraries (https://cmake.org/cmake/help/v3.28/prop_tgt/POSITION_INDEPENDENT_CODE.html), so let's just remove it from TBB_COMMON_COMPILE_FLAGS.

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

Successfully merging this pull request may close these issues.

None yet

5 participants