diff options
Diffstat (limited to 'build/SConscript.main')
-rw-r--r-- | build/SConscript.main | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/build/SConscript.main b/build/SConscript.main index 3f7623f..eb18a5f 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -338,6 +338,10 @@ elif env['PLATFORM'] == 'posix': # We need pthread for threading, and rt for clock_gettime. LIBS = ['pthread', 'rt'], ) + # Build with support for gcov when COVERAGE=1. + if ARGUMENTS.get('COVERAGE') == '1': + env.Append(CCFLAGS=['-fprofile-arcs', '-ftest-coverage']) + env.Append(LINKFLAGS=['-fprofile-arcs']) else: |