Re: Integer version macro in header for conditional compilation

2016-08-22 Thread Zhitao Li
Hi all,

Yan has helped to commit https://reviews.apache.org/r/50992/. After its
release (scheduled in 1.1.0), if you need conditional compilation in your
module based on version, you should be able to do something like:

```

#ifdef MESOS_MAJOR_VERSION_NUM
#if MESOS_MAJOR_VERSION_NUM >= 1
..
#endif
#endif


```

The above samples shows if you are using code which only compiles after
Mesos 1.0.

Please let me know if you have more questions.

Cheers,

Zhitao Li

On Thu, Aug 11, 2016 at 12:25 PM, Vinod Kone  wrote:

> +kapil,till,adam
>
> On Thu, Aug 11, 2016 at 10:51 AM, Zhitao Li  wrote:
>
> > Hi all,
> >
> > I sent a review request https://reviews.apache.org/r/50992/ to change
> the
> > MAJOR/MINOR/PATCH version macro in version.hpp to be integer rather than
> > string, so module writers can perform easier version comparison during
> > conditional compilation.
> >
> > These macros are not directly referred in mesos codebase itself.
> >
> > Can anyone who has a module which already refers these macros let us know
> > whether this can break existing builds?
> >
> > Thanks!
> >
> > --
> > Cheers,
> >
> > Zhitao Li
> >
>



-- 
Cheers,

Zhitao Li


Re: Integer version macro in header for conditional compilation

2016-08-11 Thread Vinod Kone
+kapil,till,adam

On Thu, Aug 11, 2016 at 10:51 AM, Zhitao Li  wrote:

> Hi all,
>
> I sent a review request https://reviews.apache.org/r/50992/ to change the
> MAJOR/MINOR/PATCH version macro in version.hpp to be integer rather than
> string, so module writers can perform easier version comparison during
> conditional compilation.
>
> These macros are not directly referred in mesos codebase itself.
>
> Can anyone who has a module which already refers these macros let us know
> whether this can break existing builds?
>
> Thanks!
>
> --
> Cheers,
>
> Zhitao Li
>