X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2FSConstruct;h=e7aa4717c5b08611528879cc54b17dcc74b7948d;hb=938c7ac3f302ccfa3044ce0720aeed9a4336ac0e;hp=566b4793bad21d3bedfe72f5aa6a1f39b14bc273;hpb=ae7b9a3bd3f54b5d0ba2db428944e38a3cd7b6a2;p=apps%2Fagl-service-can-low-level.git diff --git a/tests/SConstruct b/tests/SConstruct index 566b4793..e7aa4717 100644 --- a/tests/SConstruct +++ b/tests/SConstruct @@ -50,6 +50,7 @@ if not env.GetOption('clean'): stdint = conf.CheckCHeader('stdint.h') stddef = conf.CheckCHeader('stddef.h') string = conf.CheckCHeader('string.h') + stdlib = conf.CheckCHeader('stdlib.h') if not stdbool or not stdint or not stddef or not string: conf.env.Append(CPPDEFINES = {'PB_SYSTEM_HEADER': '\\"pb_syshdr.h\\"'}) conf.env.Append(CPPPATH = "#../extra") @@ -58,7 +59,8 @@ if not env.GetOption('clean'): if stdint: conf.env.Append(CPPDEFINES = {'HAVE_STDINT_H': 1}) if stddef: conf.env.Append(CPPDEFINES = {'HAVE_STDDEF_H': 1}) if string: conf.env.Append(CPPDEFINES = {'HAVE_STRING_H': 1}) - + if stdlib: conf.env.Append(CPPDEFINES = {'HAVE_STDLIB_H': 1}) + # Check if we can use pkg-config to find protobuf include path status, output = conf.TryAction('pkg-config protobuf --variable=includedir > $TARGET') if status: @@ -70,10 +72,11 @@ if not env.GetOption('clean'): if 'gcc' in env['CC']: if conf.CheckLib('mudflap'): conf.env.Append(CCFLAGS = '-fmudflap') - conf.env.Append(LINKFLAGS = '-lmudflap -fmudflap') + conf.env.Append(LINKFLAGS = '-fmudflap') # Check if we can use extra strict warning flags (only with GCC) extra = '-Wcast-qual -Wlogical-op -Wconversion' + extra += ' -fstrict-aliasing -Wstrict-aliasing=1' extra += ' -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls' extra += ' -Wstack-protector ' if 'gcc' in env['CC']: @@ -88,9 +91,9 @@ if 'gcc' in env['CC']: # GNU Compiler Collection # Debug info, warnings as errors - env.Append(CFLAGS = '-ansi -pedantic -g -O0 -Wall -Werror --coverage -fstack-protector-all') + env.Append(CFLAGS = '-ansi -pedantic -g -O0 -Wall -Werror -fprofile-arcs -ftest-coverage -fstack-protector-all') env.Append(CORECFLAGS = '-Wextra') - env.Append(LINKFLAGS = '--coverage') + env.Append(LINKFLAGS = '-g --coverage') # We currently need uint64_t anyway, even though ANSI C90 otherwise.. env.Append(CFLAGS = '-Wno-long-long')