20 // Determines what compiler is being used.
26 #if !defined(OPENNURBS_SYSTEM_COMPILER_INC_) 27 #define OPENNURBS_SYSTEM_COMPILER_INC_ 29 #if !defined(_GNU_SOURCE) 38 // BEGIN - ON_COMPILER_* defines
40 // ON_COMPILER_* specifies the C/C++ compiler used.
41 // At most one the ON_COMPILER_* should be defined.
50 #define ON_CALLBACK_CDECL 56 #define ON_VARGS_FUNC_CDECL 63 #define ON_NOEXCEPT noexcept 69 #define ON_HAS_RVALUEREF 71 #if defined (_MSC_VER) 80 #define ON_COMPILER_MSC 89 #define ON_PRAGMA_WARNING_PUSH warning( push ) 90 #define ON_PRAGMA_WARNING_POP warning( pop ) 91 #define ON_PRAGMA_WARNING_DISABLE_MSC(ON_PRAGMA_WARNING_DISABLE_param) warning( disable : ON_PRAGMA_WARNING_DISABLE_param ) // Microsoft CL warning disable 95 #define ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE warning( push, 1 ) 96 #define ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE warning( pop ) 98 #if !defined(_CRT_SECURE_NO_DEPRECATE) 99 #define _CRT_SECURE_NO_DEPRECATE 114 #undef ON_VARGS_FUNC_CDECL 115 #define ON_VARGS_FUNC_CDECL __cdecl 123 #undef ON_CALLBACK_CDECL 124 #define ON_CALLBACK_CDECL __cdecl 127 #undef ON_HAS_RVALUEREF 130 #if _MSC_VER >= 1700 && _MSC_VER < 1900 143 #define ON_NOEXCEPT throw() 147 #define ON_COMPILER_MSC1300 150 #define ON_COMPILER_MSC1400 153 #define ON_COMPILER_MSC1600 156 #define ON_COMPILER_MSC1700 159 #define ON_COMPILER_MSC1800 162 #define ON_COMPILER_MSC1900 164 #if !defined(OPENNURBS_WALL) && !defined(ON_COMPILING_OPENNURBS) 170 #pragma ON_PRAGMA_WARNING_DISABLE_MSC(4456) 174 #pragma ON_PRAGMA_WARNING_DISABLE_MSC(4100) 177 #pragma ON_PRAGMA_WARNING_DISABLE_MSC(4061) 180 #pragma ON_PRAGMA_WARNING_DISABLE_MSC(4062) 183 #pragma ON_PRAGMA_WARNING_DISABLE_MSC(4711) 186 #pragma ON_PRAGMA_WARNING_DISABLE_MSC(4820) 204 #pragma warning(default:4263) 207 #pragma warning(default:4264) 217 #pragma warning(default:4265) 219 #if defined(OPENNURBS_WALL) 232 #pragma warning(default:4266) 238 #define ON_CLANG_CONSTRUCTOR_BUG 248 #define ON_SIZEOF_WCHAR_T 2 250 #elif defined(__clang__) | defined(ON_COMPILER_CLANG) 263 #if !defined(ON_COMPILER_CLANG) 264 #define ON_COMPILER_CLANG 274 #define ON_PRAGMA_WARNING_PUSH clang diagnostic push // Apple CLang warning state push 275 #define ON_PRAGMA_WARNING_POP clang diagnostic pop // Apple CLang warning state pop 276 #define ON_PRAGMA_WARNING_DISABLE_CLANG(ON_PRAGMA_WARNING_DISABLE_param) clang diagnostic ignored ON_PRAGMA_WARNING_DISABLE_param // Apple CLang warning disable 304 #define ON_CLANG_CONSTRUCTOR_BUG 306 #if defined(__has_feature) && __has_feature(cxx_noexcept) 308 #define ON_NOEXCEPT noexcept 311 #if defined(__has_extension) && __has_extension(cxx_rvalue_references) && !defined(ON_HAS_RVALUEREF) 312 #define ON_HAS_RVALUEREF 313 #elif defined(ON_HAS_RVALUEREF) 314 #undef ON_HAS_RVALUEREF 317 #elif defined( ON_COMPILER_ANDROIDNDK ) 322 // ON_COMPILER_ANDROIDNDK
330 #if defined(__GNUC__) && (__GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 7)) 333 #define ON_NOEXCEPT noexcept 334 #if !defined(ON_HAS_RVALUEREF) 335 #define ON_HAS_RVALUEREF 339 #undef ON_HAS_RVALUEREF 352 #elif defined(__GNUG_) || defined(__GNUG__) || defined(__GNUC_) || defined(__GNUC__) || defined(_GNU_SOURCE) || defined(__GNU_SOURCE) 361 #define ON_COMPILER_GNU 362 #if !defined(_GNU_SOURCE) 373 #define ON_PRAGMA_WARNING_PUSH GCC diagnostic push // Gnu gcc warning state push 374 #define ON_PRAGMA_WARNING_POP GCC diagnostic pop // Gnu gcc warning state pop 375 #define ON_PRAGMA_WARNING_DISABLE_GNU(ON_PRAGMA_WARNING_DISABLE_param) GCC diagnostic ignored ON_PRAGMA_WARNING_DISABLE_param // Apple CLang warning disable 378 #if defined(__GNUC__) && (__GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 7)) 381 #define ON_NOEXCEPT noexcept 382 #if !defined(ON_HAS_RVALUEREF) 383 #define ON_HAS_RVALUEREF 387 #undef ON_HAS_RVALUEREF 393 #elif defined(__BORLANDC__) 398 // ON_COMPILER_BORLANDC
401 #define ON_COMPILER_BORLANDC 406 #if defined(ON_CLANG_CONSTRUCTOR_BUG) 432 #define ON_CLANG_CONSTRUCTOR_BUG_INIT(ctor) = ctor() 434 #define ON_CLANG_CONSTRUCTOR_BUG_INIT(ctor) 441 #if !defined(ON_PRAGMA_WARNING_PUSH) && !defined(ON_PRAGMA_WARNING_POP) 442 #define ON_PRAGMA_WARNING_PUSH 443 #define ON_PRAGMA_WARNING_POP 444 #elif !defined(ON_PRAGMA_WARNING_PUSH) || !defined(ON_PRAGMA_WARNING_POP) 445 #error mistake in the compiler specific define setup above 448 #if !defined(ON_PRAGMA_WARNING_DISABLE_MSC) 449 #define ON_PRAGMA_WARNING_DISABLE_MSC(ON_PRAGMA_WARNING_DISABLE_param) 452 #if !defined(ON_PRAGMA_WARNING_DISABLE_CLANG) 453 #define ON_PRAGMA_WARNING_DISABLE_CLANG(ON_PRAGMA_WARNING_DISABLE_param) 456 #if !defined(ON_PRAGMA_WARNING_DISABLE_GNU) 457 #define ON_PRAGMA_WARNING_DISABLE_GNU(ON_PRAGMA_WARNING_DISABLE_param) 460 #if !defined(ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE) && !defined(ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE) 461 #define ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE ON_PRAGMA_WARNING_PUSH 462 #define ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE ON_PRAGMA_WARNING_POP