blob: cec654f73afcc529cb5a859cf2640b6751fd8406 [file] [log] [blame]
Daniel Dunbarf845c742009-09-13 21:31:21 +00001##===- utils/unittest/UnitTestMain/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 = UnitTestMain
15BUILD_ARCHIVE = 1
Chris Lattner43b5f932010-01-24 20:43:08 +000016REQUIRES_RTTI = 1
Chandler Carruth315b1bb2010-03-09 22:45:10 +000017
Daniel Dunbarf845c742009-09-13 21:31:21 +000018CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include
Daniel Dunbar848454a2009-09-20 06:17:12 +000019CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VARIADIC_MACROS)
Chandler Carruth315b1bb2010-03-09 22:45:10 +000020CPP.Flags += -DGTEST_HAS_RTTI=0
Benjamin Kramer8ef297e2010-06-03 07:51:58 +000021# libstdc++'s TR1 <tuple> header depends on RTTI and uses C++'0x features not
22# supported by Clang, so force googletest to use its own tuple implementation.
23CPP.Flags += -DGTEST_USE_OWN_TR1_TUPLE
Daniel Dunbarf845c742009-09-13 21:31:21 +000024
Benjamin Kramer2e3f44e2010-06-03 15:17:04 +000025# Disable pthreads if LLVM was configured without them.
26ifneq ($(HAVE_PTHREAD), 1)
27 CPP.Flags += -DGTEST_HAS_PTHREAD=0
28endif
29
Daniel Dunbarf845c742009-09-13 21:31:21 +000030include $(LEVEL)/Makefile.common