mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: This PR replaces PR #464. It requires C+11 support using the new CMake variables (`CMAKE_CXX_STANDARD`, `CMAKE_CXX_STANDARD_REQUIRED`, etc.) when CMake is version 3.1 or above. Otherwise, if CMake is older (e.g. Ubuntu 14.04) it falls back to using the -std=c++11 flag and issues a warning. This PR is based on the comment from Yangqing: https://github.com/caffe2/caffe2/pull/464#issuecomment-305376923 The corresponding line in cmake/MiscCheck.cmake is removed in order to reduce redundancy. Another option would be to move the C++11 logic to MiscCheck.cmake. Closes https://github.com/caffe2/caffe2/pull/1027 Differential Revision: D5590646 Pulled By: Yangqing fbshipit-source-id: 11ac63fbeaab7a1da02115549e214f9c529f1873