summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-02-21 17:15:31 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-02-21 17:22:26 +0200
commitbfd5ad3220e7abe928daca98605012c1a12ae377 (patch)
tree1238c17671e7c069c87208b506fa092385fab13b /test
parent8219d72135c007c44b61a781c95c817a8618c478 (diff)
downloadqtlocation-mapboxgl-bfd5ad3220e7abe928daca98605012c1a12ae377.tar.gz
[gyp] Coverage only if BUILDTYPE=Debug and ENABLE_COVERAGE=1
Coverage compiler and linker flags are used only when (1) in debug build and (2) with ENABLE_COVERAGE set to 1. Besides, because OS X's libtool is unable to understand '--coverage', this linker flag is only used genrating executable targets. Also, using 'link_settings' to specify linker options and separate instructions for OSX and Linux.
Diffstat (limited to 'test')
-rw-r--r--test/test.gypi33
1 files changed, 15 insertions, 18 deletions
diff --git a/test/test.gypi b/test/test.gypi
index 1842a807fb..f12588890a 100644
--- a/test/test.gypi
+++ b/test/test.gypi
@@ -100,11 +100,6 @@
'sprite/sprite_parser.cpp',
'sprite/sprite_store.cpp',
],
- 'libraries': [
- '<@(gtest_static_libs)',
- '<@(sqlite_static_libs)',
- '<@(geojsonvt_static_libs)',
- ],
'variables': {
'cflags_cc': [
'<@(gtest_cflags)',
@@ -119,29 +114,31 @@
'<@(gtest_ldflags)',
'<@(sqlite_ldflags)',
],
+ 'libraries': [
+ '<@(gtest_static_libs)',
+ '<@(sqlite_static_libs)',
+ '<@(geojsonvt_static_libs)',
+ ],
},
'conditions': [
['OS == "mac"', {
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags_cc)' ],
- 'OTHER_LDFLAGS': [ '<@(ldflags)' ],
- },
- 'configurations': {
- 'Debug': {
- 'xcode_settings': {
- 'conditions': [
- ['enable_coverage=="1"', {
- 'OTHER_LDFLAGS': [ '--coverage' ],
- }],
- ],
- },
- },
},
}, {
'cflags_cc': [ '<@(cflags_cc)' ],
- 'libraries': [ '<@(ldflags)' ],
}],
],
+ 'link_settings': {
+ 'conditions': [
+ ['OS == "mac"', {
+ 'libraries': [ '<@(libraries)' ],
+ 'xcode_settings': { 'OTHER_LDFLAGS': [ '<@(ldflags)' ] }
+ }, {
+ 'libraries': [ '<@(libraries)', '<@(ldflags)' ],
+ }]
+ ],
+ },
},
]
}