summaryrefslogtreecommitdiff
path: root/scripts/main.mk
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 /scripts/main.mk
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 'scripts/main.mk')
-rw-r--r--scripts/main.mk6
1 files changed, 1 insertions, 5 deletions
diff --git a/scripts/main.mk b/scripts/main.mk
index a215be635f..0891734543 100644
--- a/scripts/main.mk
+++ b/scripts/main.mk
@@ -79,15 +79,11 @@ GYP_FLAGS += -Dheadless_lib=$(HEADLESS)
GYP_FLAGS += -Dtest=$(BUILD_TEST)
GYP_FLAGS += -Drender=$(BUILD_RENDER)
GYP_FLAGS += -Doffline=$(BUILD_OFFLINE)
+GYP_FLAGS += -Dcoverage=$(ENABLE_COVERAGE)
GYP_FLAGS += -Dcxx_host=$(CXX_HOST)
GYP_FLAGS += --depth=.
GYP_FLAGS += -Goutput_dir=.
GYP_FLAGS += --generator-output=./build/$(HOST_SLUG)
-ifeq ($(ENABLE_COVERAGE),1)
-GYP_FLAGS += -Denable_coverage=1
-else ifneq ($(ENABLE_COVERAGE),1)
-GYP_FLAGS += -Denable_coverage=0
-endif
.PHONY: Makefile/__project__
Makefile/__project__: print-env $(SUBMODULES) config/$(HOST_SLUG).gypi