Skip to content

Commit f70544c

Browse files
committed
Force building with GCC 5
Make sure that we're building with GCC 5 everywhere Differential Revision: [D17953640](https://our.internmc.facebook.com/intern/diff/D17953640/) ghstack-source-id: 92013998 Pull Request resolved: #28098
1 parent e4f5224 commit f70544c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

c10/util/C++17.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
#include <functional>
1212
#include <c10/macros/Macros.h>
1313

14+
15+
#if !defined(__clang__) && !defined(_MSC_VER) && defined(__GNUC__) && \
16+
__GNUC__ < 5
17+
#error "You're trying to build PyTorch with a too old version of GCC. We need GCC 5 or later."
18+
#endif
19+
1420
/*
1521
* This header adds some polyfills with C++14 and C++17 functionality
1622
*/

0 commit comments

Comments
 (0)