-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Stop propagating std flags to downstream gcc/nvcc #10098
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
Conversation
|
Hi @achalshah20, we can't take this PR as is because we support more versions cmake than 3.12 or later. Do you know a way to apply this treatment in a way that's compatible with older versions of cmake? |
|
Hi @ezyang Which is the minimum cmake version required right now? I just realized the pthread thing is a bug from cmake, we can't do anything about that but we can control std flags as it only requires cmake 3.3. How does it sound? |
1e74a5d to
921cfce
Compare
|
The top level cmake seems to imply it's 3.5. |
|
@pytorchbot retest this please |
pthread bug is coming from cmake, so reverting pthread issue is coming from cmake so reverting Compile language doesnt support windows build, so adding condition
|
Fixed the windows build as compile language does not support windows yet, so added condition! |
| TARGET Threads::Threads | ||
| PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread") | ||
| set_property(TARGET Threads::Threads | ||
| PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread") |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
facebook-github-bot
left a comment
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.
ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: When we directly use -std=c++11, it propagates to the downstream applications. Problems: 1. Gcc flags propagating to nvcc. 2. nvcc flags propagating to nvcc. (Which throws an error like redeclaration of std flag) This PR will fix these propagation issues! Similar problem: FloopCZ/tensorflow_cc#92 CGAL/cgal#2775 Requires: Cmake 3.12 Pull Request resolved: pytorch/pytorch#10098 Differential Revision: D9187110 Pulled By: ezyang fbshipit-source-id: 0e00e6aa3119c77a5b3ea56992ef3bbfecd71d80
Summary: When we directly use -std=c++11, it propagates to the downstream applications. Problems: 1. Gcc flags propagating to nvcc. 2. nvcc flags propagating to nvcc. (Which throws an error like redeclaration of std flag) This PR will fix these propagation issues! Similar problem: FloopCZ/tensorflow_cc#92 CGAL/cgal#2775 Requires: Cmake 3.12 Pull Request resolved: pytorch#10098 Differential Revision: D9187110 Pulled By: ezyang fbshipit-source-id: 0e00e6aa3119c77a5b3ea56992ef3bbfecd71d80
When we directly use -std=c++11, it propagates to the downstream applications.
Problems:
This PR will fix these propagation issues!
Similar problem:
FloopCZ/tensorflow_cc#92
CGAL/cgal#2775
Requires: Cmake 3.12