-
Notifications
You must be signed in to change notification settings - Fork 315
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
[SofaKernel] FIX: A few fix to compile on Mac OSX Xcode 9 and Linux gcc 7.3.0 #969
Conversation
…FixCompilingError
|
||
# is this a compiler/linker version specific problem? | ||
if(CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread" ) |
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.
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.
-pthread should be passed as linking options:
target_link_options(${PROJECT_NAME} PUBLIC "-pthread")
This doesn't work because the target_link_options is available only starting from CMake 3.13
…conv) and use the target_link_options to add link flags
This PR:
Reviewers will merge only if all these checks are true.