Procházet zdrojové kódy

scons: Define _ALLOW_KEYWORD_MACROS on MSVC builds.

scons/llvm.py defines inline globally to workaround issues with LLVM C
binding headers, so the only way to is to avoid
aggravating xkeycheck.h errors is to set _ALLOW_KEYWORD_MACROS.

This fixes MSVC 2012 build with LLVM.

Reviewed-by: Brian Paul <brianp@vmware.com>
tags/mesa-9.2-rc1
José Fonseca před 12 roky
rodič
revize
a35a19a6ea
2 změnil soubory, kde provedl 4 přidání a 5 odebrání
  1. 3
    5
      include/c99_compat.h
  2. 1
    0
      scons/gallium.py

+ 3
- 5
include/c99_compat.h Zobrazit soubor

@@ -37,12 +37,10 @@
* Visual Studio 2012 will complain if we define the `inline` keyword, but
* actually it only supports the keyword on C++.
*
* We could skip this check by defining _ALLOW_KEYWORD_MACROS, but there is
* probably value in checking this for other keywords. So simply include
* the checking before we define it below.
* To avoid this the _ALLOW_KEYWORD_MACROS must be set.
*/
# if _MSC_VER >= 1700
# include <xkeycheck.h>
# if (_MSC_VER >= 1700) && !defined(_ALLOW_KEYWORD_MACROS)
# define _ALLOW_KEYWORD_MACROS
# endif

/*

+ 1
- 0
scons/gallium.py Zobrazit soubor

@@ -289,6 +289,7 @@ def generate(env):
'_CRT_SECURE_NO_DEPRECATE',
'_SCL_SECURE_NO_WARNINGS',
'_SCL_SECURE_NO_DEPRECATE',
'_ALLOW_KEYWORD_MACROS',
]
if env['build'] in ('debug', 'checked'):
cppdefines += ['_DEBUG']

Načítá se…
Zrušit
Uložit