gtest.mk (1190B)
1 #! gmake 2 # 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 include $(CORE_DEPTH)/cmd/platlibs.mk 8 9 MKPROG = $(CCC) 10 MKSHLIB = $(CCC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS) 11 12 # gtests pick up errors with signed/unsigned comparisons on some platforms 13 # even though we disabled -Wsign-compare. 14 # This catches that by enabling the warning. 15 # Only add -Wsign-compare if -Werror is enabled, lest we add it on the wrong 16 # platform. 17 ifeq (-Werror,$(filter -Werror -Wsign-compare,$(WARNING_CFLAGS))) 18 WARNING_CFLAGS += -Wsign-compare 19 endif 20 WARNING_CFLAGS := $(filter-out -w44018,$(WARNING_CFLAGS)) 21 22 ifeq (WINNT,$(OS_ARCH)) 23 # -EHsc because gtest has exception handlers 24 OS_CFLAGS += -EHsc -nologo 25 # http://www.suodenjoki.dk/us/archive/2010/min-max.htm 26 OS_CFLAGS += -DNOMINMAX 27 28 # Linking to winsock to get htonl 29 OS_LIBS += Ws2_32.lib 30 31 # On windows, we need to create the parent directory 32 # Needed because we include files from a subdirectory 33 MAKE_OBJDIR = $(INSTALL) -D $(dir $@) 34 else 35 CXXFLAGS += -std=c++0x 36 endif