Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:19

0001 #ifndef FWCore_Utilities_GCCPrerequisite_h
0002 #define FWCore_Utilities_GCCPrerequisite_h
0003 
0004 /* Convenience macro to test the version of gcc.
0005    Use it like this:
0006    #if GCC_PREREQUISITE(3,4,4)
0007    ... code requiring gcc 3.4.4 or later ...
0008    #endif
0009    Note - it won't work for gcc1 since the _MINOR macros
0010    were not defined then.  */
0011 #if defined __GNUC__ && defined __GNUC_MINOR__ && defined __GNUC_PATCHLEVEL__
0012 #define GCC_PREREQUISITE(maj, min, patch) \
0013   ((__GNUC__ << 16) + (__GNUC_MINOR__ << 8) + __GNUC_PATCHLEVEL__ >= ((maj) << 16) + ((min) << 8) + (patch))
0014 #elif defined __GNUC__ && defined __GNUC_MINOR__
0015 #define GCC_PREREQUISITE(maj, min, patch) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
0016 #else
0017 #define GCC_PREREQUISITE(maj, min, patch) 0
0018 #endif
0019 
0020 #endif