Skip to content
  • Xavier Leroy's avatar
    Define macros with CompCert's version number (#284) · d5c0b405
    Xavier Leroy authored
    As suggested in #282, it can be useful to #ifdef code depending on
    specific versions of CompCert.
    
    Assuming a version number of the form MM.mm ,
    the following macros are predefined:
    
    __COMPCERT_MAJOR__=MM       (the major version number)
    __COMPCERT_MINOR__=mm       (the minor version number)
    __COMPCERT_VERSION__=MMmm (two decimal digits for the minor, e.g. 305 for version 3.5)
    
    We also define __COMPCERT_BUILDNR__ if the build number is not empty in file ./VERSION.
    
    Closes: #282 
    d5c0b405