blob: 22c8f36fccb69d62ba484434a276914b7b1cd8de [file] [log] [blame]
Misha Brukman3aae44e2009-01-01 01:29:44 +00001##===- 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 := ../../..
Daniel Dunbar848454a2009-09-20 06:17:12 +000011
Misha Brukman3aae44e2009-01-01 01:29:44 +000012include $(LEVEL)/Makefile.config
Mike Stump44460da2009-02-05 20:45:27 +000013
Daniel Dunbarbb53bbb2011-12-15 23:35:08 +000014LIBRARYNAME = gtest
Misha Brukman3aae44e2009-01-01 01:29:44 +000015BUILD_ARCHIVE = 1
Chris Lattner43b5f932010-01-24 20:43:08 +000016REQUIRES_RTTI = 1
Chandler Carruthf10e43e2010-03-09 19:24:49 +000017
18# Note that these flags are duplicated when building individual tests in
Chandler Carruth315b1bb2010-03-09 22:45:10 +000019# unittests/Makefile.unittest and ../UnitTestMain/Makefile; ensure that any
20# changes are made to both.
Benjamin Kramerb0d3f252009-07-27 09:39:18 +000021CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include
Mike Stumpd907e492009-02-05 20:49:49 +000022CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VARIADIC_MACROS)
Chandler Carruthf10e43e2010-03-09 19:24:49 +000023CPP.Flags += -DGTEST_HAS_RTTI=0
Benjamin Kramer8ef297e2010-06-03 07:51:58 +000024# libstdc++'s TR1 <tuple> header depends on RTTI and uses C++'0x features not
25# supported by Clang, so force googletest to use its own tuple implementation.
26CPP.Flags += -DGTEST_USE_OWN_TR1_TUPLE
Misha Brukman3aae44e2009-01-01 01:29:44 +000027
Benjamin Kramer2e3f44e2010-06-03 15:17:04 +000028# Disable pthreads if LLVM was configured without them.
29ifneq ($(HAVE_PTHREAD), 1)
30 CPP.Flags += -DGTEST_HAS_PTHREAD=0
31endif
32
Anton Korobeynikove55db742009-08-18 00:40:33 +000033ifeq ($(HOST_OS),MingW)
Julien Lerougee0a056b2009-02-12 08:02:35 +000034 CPP.Flags += -DGTEST_OS_WINDOWS=1
35endif
36
Chris Lattnerc8914652009-05-08 17:32:47 +000037NO_INSTALL = 1
38
Misha Brukman3aae44e2009-01-01 01:29:44 +000039include $(LEVEL)/Makefile.common