8159340: Add extension to CompileGtest.gmk
authorehelin
Mon, 13 Jun 2016 11:22:23 +0200
changeset 39393 93730d02bec3
parent 39392 eb15425824c3
child 39394 044a0eb96215
8159340: Add extension to CompileGtest.gmk Reviewed-by: dholmes, gtriantafill, jwilhelm
hotspot/make/lib/CompileGtest.gmk
--- a/hotspot/make/lib/CompileGtest.gmk	Mon Jun 20 00:07:51 2016 -0400
+++ b/hotspot/make/lib/CompileGtest.gmk	Mon Jun 13 11:22:23 2016 +0200
@@ -23,7 +23,10 @@
 # questions.
 #
 
-GTEST_TEST_SRC := $(HOTSPOT_TOPDIR)/test/native
+$(eval $(call IncludeCustomExtension, hotspot, lib/CompileGtest.gmk))
+
+GTEST_TEST_SRC += $(HOTSPOT_TOPDIR)/test/native
+GTEST_LAUNCHER_SRC := $(HOTSPOT_TOPDIR)/test/native/gtestLauncher.cpp
 GTEST_FRAMEWORK_SRC := $(SRC_ROOT)/test/fmw/gtest
 
 # On Windows, there are no internal debug symbols so must set copying to true
@@ -65,7 +68,7 @@
         $(BUILD_LIBJVM_ALL_OBJS)), \
     CFLAGS := $(JVM_CFLAGS) -I$(GTEST_FRAMEWORK_SRC) \
         -I$(GTEST_FRAMEWORK_SRC)/include \
-        -I$(GTEST_TEST_SRC), \
+        $(addprefix -I,$(GTEST_TEST_SRC)), \
     CFLAGS_windows := /EHsc, \
     CFLAGS_solaris := -DGTEST_HAS_EXCEPTIONS=0 -library=stlport4, \
     CFLAGS_macosx := -DGTEST_OS_MAC=1, \
@@ -93,7 +96,7 @@
     TOOLCHAIN := $(JVM_TOOLCHAIN), \
     PROGRAM := gtestLauncher, \
     OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
-    EXTRA_FILES := $(GTEST_TEST_SRC)/gtestLauncher.cpp, \
+    EXTRA_FILES := $(GTEST_LAUNCHER_SRC), \
     OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/launcher-objs, \
     CFLAGS := $(JVM_CFLAGS) -I$(GTEST_FRAMEWORK_SRC) \
         -I$(GTEST_FRAMEWORK_SRC)/include, \