• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1##===- utils/unittest/googletest/Makefile ------------------*- Makefile -*-===##
2#
3#                     The LLVM Compiler Infrastructure
4#
5# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
7#
8##===----------------------------------------------------------------------===##
9
10LEVEL := ../../..
11
12include $(LEVEL)/Makefile.config
13
14LIBRARYNAME = gtest
15BUILD_ARCHIVE = 1
16REQUIRES_RTTI = 1
17
18# Note that these flags are duplicated when building individual tests in
19# unittests/Makefile.unittest and ../UnitTestMain/Makefile; ensure that any
20# changes are made to both.
21CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include
22CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest
23CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VARIADIC_MACROS)
24CPP.Flags += -DGTEST_HAS_RTTI=0
25# libstdc++'s TR1 <tuple> header depends on RTTI and uses C++'0x features not
26# supported by Clang, so force googletest to use its own tuple implementation.
27CPP.Flags += -DGTEST_USE_OWN_TR1_TUPLE
28
29# Disable pthreads if LLVM was configured without them.
30ifneq ($(HAVE_PTHREAD), 1)
31  CPP.Flags += -DGTEST_HAS_PTHREAD=0
32endif
33
34ifeq ($(HOST_OS),MingW)
35  CPP.Flags += -DGTEST_OS_WINDOWS=1
36endif
37
38NO_INSTALL = 1
39
40SOURCES = src/gtest-all.cc
41
42include $(LEVEL)/Makefile.common
43