Are there any compile-time macros that show the OFED version?

MLNX_OFED has many of its interfaces changed since v5.0 (namely, migrated to RDMA-Core). Some RDMA code written on OFED v4.x that uses ibv_exp_* interfaces will not compile on newer versions of OFED. I think it would be good if we can distinguish OFED versions with compile-time macros defined in some header files, however I can’t find any.
So are there any such macros? If not, is it possible (or unrecommended) to detect OFED version at compile time?