summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-02-17 10:32:50 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-02-18 15:01:58 +0200
commitec97264431a3b29327332072b5328d81768547c9 (patch)
tree3f295a43c94caed0238149c821980379ae56a56f
parentd5da86b0980ce84c1d64507452eaf7a301f3c85d (diff)
downloadqtlocation-mapboxgl-ec97264431a3b29327332072b5328d81768547c9.tar.gz
[osx] Enable coverage support for debug build
-rw-r--r--.gitignore2
-rw-r--r--gyp/common.gypi4
-rw-r--r--platform/linux/mapboxgl-app.gypi9
-rw-r--r--test/test.gypi7
4 files changed, 20 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 17531a3c3d..1b6ed5386b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,8 @@
*.actual.png
*.diff.png
*.pyc
+*.gcno
+*.gcda
offline.db
/platform/android/debug
/platform/android/sdk
diff --git a/gyp/common.gypi b/gyp/common.gypi
index 530fbf6f5a..685242057b 100644
--- a/gyp/common.gypi
+++ b/gyp/common.gypi
@@ -106,7 +106,9 @@
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
'DEAD_CODE_STRIPPING': 'NO',
- 'OTHER_CPLUSPLUSFLAGS': [ '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common']
+ 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES',
+ 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES',
+ 'OTHER_CPLUSPLUSFLAGS': [ '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common', '-fprofile-arcs', '-ftest-coverage' ],
}
},
'Release': {
diff --git a/platform/linux/mapboxgl-app.gypi b/platform/linux/mapboxgl-app.gypi
index 3788efba43..449329932e 100644
--- a/platform/linux/mapboxgl-app.gypi
+++ b/platform/linux/mapboxgl-app.gypi
@@ -47,7 +47,14 @@
'OTHER_LDFLAGS': [ '<@(ldflags)' ],
'SDKROOT': 'macosx',
'MACOSX_DEPLOYMENT_TARGET': '10.10',
- }
+ },
+ 'configurations': {
+ 'Debug': {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [ '-lgcov' ],
+ },
+ },
+ },
}, {
'cflags_cc': [ '<@(cflags_cc)' ],
'libraries': [ '<@(libraries)', '<@(ldflags)' ],
diff --git a/test/test.gypi b/test/test.gypi
index 9b5bceea72..f648657c85 100644
--- a/test/test.gypi
+++ b/test/test.gypi
@@ -126,6 +126,13 @@
'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ],
'OTHER_LDFLAGS': [ '<@(ldflags)' ],
},
+ 'configurations': {
+ 'Debug': {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [ '--coverage' ],
+ },
+ },
+ },
}, {
'cflags_cc': [ '<@(cflags_cc)' ],
'libraries': [ '<@(ldflags)' ],