[x265] [PATCH 2 of 2] cmake: add build option for Windows to target Win7 to enable NUMA APIs

Steve Borho steve at borho.org
Tue Apr 14 05:41:19 CEST 2015


On 04/13, Tim W. wrote:
> On Mon, Apr 13, 2015 at 10:30 PM, Steve Borho <steve at borho.org> wrote:
> 
> > On 04/13, Xinyue Lu wrote:
> > > Hi,
> > >
> > > That's correct.
> > >
> > > Per our discussion on IRC channel:
> > >
> > > The NUMA API is only available on Win7 and above.
> > >
> > > So either compiling against Win7 and you get the NUMA API, or
> > > compiling against Vista (or even XP) which doesn't come with NUMA
> > > support.
> >
> > I've modified the patch locally to simplify the situation by targeting
> > Win7 (with NUMA) by default unless WINXP_SUPPORT is enabled. So Vista
> > gets glommed together with XP as a "legacy" O/S option.
> >
> 
> Seems reasonable, except the option name is somewhat wrong now; people may
> decide not to specify WINXP_SUPPORT only to get bitten when it doesn't run
> under Vista?

I'm open to suggestions (perhaps LEGACY_WINDOWS) but you have to keep in
mind the cmake cache which keeps old options around until you manually
delete the cache or delete the build folder. So WINXP_SUPPORT will still
show up in the list of options for everyone for quite some time, and
they might be quite confused if they turned on WINXP_SUPPORT and it had
no effect.

We could change the logic to be something like this:

option(LEGACY_WINDOWS "Make binaries compatible with Windows XP and Vista" OFF)
if(LEGACY_WINDOWS OR WINXP_SUPPORT)
 ...

which keeps the old option still effective, but then we have two options
that have the same effect. This is why I left the old option name in
place and just updated the description to mention XP and Vista.

-- 
Steve Borho


More information about the x265-devel mailing list