Commit 015e8b63 authored by Jose Fonseca's avatar Jose Fonseca

scons: Define YY_USE_CONST on MSVC.

This prevents the MSVC from

  warning C4090: 'function' : different 'const' qualifiers

when compiling flex generated lexers.
Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
parent 357d1fc8
......@@ -622,6 +622,14 @@ def generate(env):
# Load tools
env.Tool('lex')
if env['msvc']:
env.Append(LEXFLAGS = [
# Force flex to use const keyword in prototypes, as relies on
# __cplusplus or __STDC__ macro to determine whether it's safe to
# use const keyword, but MSVC never defines __STDC__ unless we
# disable all MSVC extensions.
'-DYY_USE_CONST=',
])
env.Tool('yacc')
if env['llvm']:
env.Tool('llvm')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment