summaryrefslogtreecommitdiff
path: root/external_tests/google_test/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'external_tests/google_test/Makefile')
-rw-r--r--external_tests/google_test/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/external_tests/google_test/Makefile b/external_tests/google_test/Makefile
index ac7276e78..8a3c1fae6 100644
--- a/external_tests/google_test/Makefile
+++ b/external_tests/google_test/Makefile
@@ -42,4 +42,13 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
-MKSHLIB = $(CCC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
+MKSHLIB = $(CCC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
+ifeq (WINNT,$(OS_ARCH))
+ # -MTd (not -MD) because that makes it link to the right library
+ # -EHsc because gtest has exception handlers
+ OS_CFLAGS := $(filterout -MD,$(OS_CFLAGS))
+ OS_CFLAGS += -MTd -EHsc
+ # On windows, we need to create the parent directory
+ # Needed because we include files from a subdirectory
+ MAKE_OBJDIR = $(INSTALL) -D $(dir $@)
+endif