2017-05-11 10:20:24 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#if defined(__clang__)
|
|
|
|
|
2017-05-11 12:25:02 +01:00
|
|
|
#if __clang_major__ < 3
|
2017-05-11 10:20:24 +01:00
|
|
|
#error "This clang++ version is known to not work with Grid due to compiler bugs"
|
|
|
|
#endif
|
|
|
|
|
2017-05-11 12:25:02 +01:00
|
|
|
#if __clang_major__ == 3
|
|
|
|
#if __clang_minor__ < 5
|
2017-05-11 10:20:24 +01:00
|
|
|
#error "This clang++ version is known to not work with Grid due to compiler bugs"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Intel compiler *ALSO* has __GNUC__ defined so must if/else GCC checks
|
2017-05-11 11:21:11 +01:00
|
|
|
#elif defined(__INTEL_COMPILER)
|
2017-05-11 10:20:24 +01:00
|
|
|
|
2017-05-11 11:21:11 +01:00
|
|
|
#if __INTEL_COMPILER < 1603
|
|
|
|
#error "This icpc version is known to not work with Grid due to compiler bugs"
|
|
|
|
#endif
|
2017-05-11 10:20:24 +01:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
2017-05-11 11:30:14 +01:00
|
|
|
// This macro is annoying many other compilers just define __GNUC__ and claim GCC compat
|
|
|
|
// but this defeats the use of __GNUC__ to really detect G++
|
2017-05-11 10:20:24 +01:00
|
|
|
#if defined(__GNUC__)
|
|
|
|
|
|
|
|
#if __GNUC__ < 4
|
|
|
|
#error "g++ prior to version 4 is known to not work with Grid due to compiler bugs"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if __GNUC__ == 4
|
|
|
|
#if __GNUC_MINOR__ != 9
|
|
|
|
#error "g++ 4.9 is the only gcc-4.x version known to work with Grid due to compiler bugs"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if __GNUC__ == 5
|
|
|
|
#warning "g++ version 5 is known to not work with Grid due to compiler bugs under -O3 : ensure you run make check"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if __GNUC__ == 6
|
|
|
|
#if __GNUC_MINOR__ < 3
|
|
|
|
#warning "This g++6.3 is the first recent g++ version known to work with Grid: ensure you run make check"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2017-05-11 11:30:14 +01:00
|
|
|
#else
|
|
|
|
|
|
|
|
#warning "Unknown compiler detected: cannot guarantee compatability since Grid tends to break compilers"
|
|
|
|
#warning "Ensure to run : make check"
|
2017-05-11 11:21:11 +01:00
|
|
|
|
2017-05-11 11:30:14 +01:00
|
|
|
#endif
|
2017-05-11 10:20:24 +01:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|