Misha Brukman | 3aae44e | 2009-01-01 01:29:44 +0000 | [diff] [blame] | 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 | |
| 10 | LEVEL := ../../.. |
Daniel Dunbar | 848454a | 2009-09-20 06:17:12 +0000 | [diff] [blame] | 11 | |
Misha Brukman | 3aae44e | 2009-01-01 01:29:44 +0000 | [diff] [blame] | 12 | include $(LEVEL)/Makefile.config |
Mike Stump | 44460da | 2009-02-05 20:45:27 +0000 | [diff] [blame] | 13 | |
Daniel Dunbar | bb53bbb | 2011-12-15 23:35:08 +0000 | [diff] [blame] | 14 | LIBRARYNAME = gtest |
Misha Brukman | 3aae44e | 2009-01-01 01:29:44 +0000 | [diff] [blame] | 15 | BUILD_ARCHIVE = 1 |
Chris Lattner | 43b5f93 | 2010-01-24 20:43:08 +0000 | [diff] [blame] | 16 | REQUIRES_RTTI = 1 |
Chandler Carruth | f10e43e | 2010-03-09 19:24:49 +0000 | [diff] [blame] | 17 | |
| 18 | # Note that these flags are duplicated when building individual tests in |
Chandler Carruth | 315b1bb | 2010-03-09 22:45:10 +0000 | [diff] [blame] | 19 | # unittests/Makefile.unittest and ../UnitTestMain/Makefile; ensure that any |
| 20 | # changes are made to both. |
Benjamin Kramer | b0d3f25 | 2009-07-27 09:39:18 +0000 | [diff] [blame] | 21 | CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include |
Mike Stump | d907e49 | 2009-02-05 20:49:49 +0000 | [diff] [blame] | 22 | CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VARIADIC_MACROS) |
Chandler Carruth | f10e43e | 2010-03-09 19:24:49 +0000 | [diff] [blame] | 23 | CPP.Flags += -DGTEST_HAS_RTTI=0 |
Benjamin Kramer | 8ef297e | 2010-06-03 07:51:58 +0000 | [diff] [blame] | 24 | # 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. |
| 26 | CPP.Flags += -DGTEST_USE_OWN_TR1_TUPLE |
Misha Brukman | 3aae44e | 2009-01-01 01:29:44 +0000 | [diff] [blame] | 27 | |
Benjamin Kramer | 2e3f44e | 2010-06-03 15:17:04 +0000 | [diff] [blame] | 28 | # Disable pthreads if LLVM was configured without them. |
| 29 | ifneq ($(HAVE_PTHREAD), 1) |
| 30 | CPP.Flags += -DGTEST_HAS_PTHREAD=0 |
| 31 | endif |
| 32 | |
Anton Korobeynikov | e55db74 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 33 | ifeq ($(HOST_OS),MingW) |
Julien Lerouge | e0a056b | 2009-02-12 08:02:35 +0000 | [diff] [blame] | 34 | CPP.Flags += -DGTEST_OS_WINDOWS=1 |
| 35 | endif |
| 36 | |
Chris Lattner | c891465 | 2009-05-08 17:32:47 +0000 | [diff] [blame] | 37 | NO_INSTALL = 1 |
| 38 | |
Misha Brukman | 3aae44e | 2009-01-01 01:29:44 +0000 | [diff] [blame] | 39 | include $(LEVEL)/Makefile.common |