You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/09/24 00:58:28 UTC

[GitHub] szha commented on a change in pull request #12642: Enable C++ coverage

szha commented on a change in pull request #12642: Enable C++ coverage
URL: https://github.com/apache/incubator-mxnet/pull/12642#discussion_r219718536
 
 

 ##########
 File path: Makefile
 ##########
 @@ -92,6 +92,10 @@ endif
 CFLAGS += -I$(TPARTYDIR)/mshadow/ -I$(TPARTYDIR)/dmlc-core/include -fPIC -I$(NNVM_PATH)/include -I$(DLPACK_PATH)/include -I$(TPARTYDIR)/tvm/include -Iinclude $(MSHADOW_CFLAGS)
 LDFLAGS = -pthread $(MSHADOW_LDFLAGS) $(DMLC_LDFLAGS)
 
+ifeq ($(ENABLE_TESTCOVERAGE), 1)
+        CFLAGS += --coverage
+        LDFLAGS += --coverage
+endif
 
 Review comment:
   need to make sure this flag is portable to other compilers/linkers. I checked for gcc and clang, both of which supports gcov.
   https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#Instrumentation-Options
   https://clang.llvm.org/docs/SourceBasedCodeCoverage.html

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services