🔨 added macro to disable compiler check #1128
This commit is contained in:
parent
bab5826504
commit
396a914f9e
3 changed files with 20 additions and 14 deletions
|
@ -820,6 +820,8 @@ Please note:
|
||||||
|
|
||||||
- For GCC running on MinGW or Android SDK, the error `'to_string' is not a member of 'std'` (or similarly, for `strtod`) may occur. Note this is not an issue with the code, but rather with the compiler itself. On Android, see above to build with a newer environment. For MinGW, please refer to [this site](http://tehsausage.com/mingw-to-string) and [this discussion](https://github.com/nlohmann/json/issues/136) for information on how to fix this bug. For Android NDK using `APP_STL := gnustl_static`, please refer to [this discussion](https://github.com/nlohmann/json/issues/219).
|
- For GCC running on MinGW or Android SDK, the error `'to_string' is not a member of 'std'` (or similarly, for `strtod`) may occur. Note this is not an issue with the code, but rather with the compiler itself. On Android, see above to build with a newer environment. For MinGW, please refer to [this site](http://tehsausage.com/mingw-to-string) and [this discussion](https://github.com/nlohmann/json/issues/136) for information on how to fix this bug. For Android NDK using `APP_STL := gnustl_static`, please refer to [this discussion](https://github.com/nlohmann/json/issues/219).
|
||||||
|
|
||||||
|
- Unsupported versions of GCC and Clang are rejected by `#error` directives. This can be switched off by defining `JSON_SKIP_UNSUPPORTED_COMPILER_CHECK`. Note that you can expect no support in this case.
|
||||||
|
|
||||||
The following compilers are currently used in continuous integration at [Travis](https://travis-ci.org/nlohmann/json) and [AppVeyor](https://ci.appveyor.com/project/nlohmann/json):
|
The following compilers are currently used in continuous integration at [Travis](https://travis-ci.org/nlohmann/json) and [AppVeyor](https://ci.appveyor.com/project/nlohmann/json):
|
||||||
|
|
||||||
| Compiler | Operating System | Version String |
|
| Compiler | Operating System | Version String |
|
||||||
|
|
|
@ -4,13 +4,15 @@
|
||||||
// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them
|
// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them
|
||||||
|
|
||||||
// exclude unsupported compilers
|
// exclude unsupported compilers
|
||||||
#if defined(__clang__)
|
#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK)
|
||||||
#if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400
|
#if defined(__clang__)
|
||||||
#error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers"
|
#if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400
|
||||||
#endif
|
#error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers"
|
||||||
#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))
|
#endif
|
||||||
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900
|
#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))
|
||||||
#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
|
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900
|
||||||
|
#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -119,13 +119,15 @@ using json = basic_json<>;
|
||||||
// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them
|
// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them
|
||||||
|
|
||||||
// exclude unsupported compilers
|
// exclude unsupported compilers
|
||||||
#if defined(__clang__)
|
#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK)
|
||||||
#if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400
|
#if defined(__clang__)
|
||||||
#error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers"
|
#if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400
|
||||||
#endif
|
#error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers"
|
||||||
#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))
|
#endif
|
||||||
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900
|
#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))
|
||||||
#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
|
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900
|
||||||
|
#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue