Misha Brukman | 922e349 | 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 | b18efec | 2009-09-20 06:17:12 +0000 | [diff] [blame] | 11 | |
Misha Brukman | 922e349 | 2009-01-01 01:29:44 +0000 | [diff] [blame] | 12 | include $(LEVEL)/Makefile.config |
Mike Stump | 67f5cea | 2009-02-05 20:45:27 +0000 | [diff] [blame] | 13 | |
Daniel Dunbar | 06bb798 | 2011-12-15 23:35:08 +0000 | [diff] [blame] | 14 | LIBRARYNAME = gtest |
Misha Brukman | 922e349 | 2009-01-01 01:29:44 +0000 | [diff] [blame] | 15 | BUILD_ARCHIVE = 1 |
Chris Lattner | 823aed1 | 2010-01-24 20:43:08 +0000 | [diff] [blame] | 16 | REQUIRES_RTTI = 1 |
Chandler Carruth | 28d5f76 | 2010-03-09 19:24:49 +0000 | [diff] [blame] | 17 | |
| 18 | # Note that these flags are duplicated when building individual tests in |
Chandler Carruth | 25fcb61 | 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 | 729749d | 2009-07-27 09:39:18 +0000 | [diff] [blame] | 21 | CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include |
Mike Stump | 354d3de | 2009-02-05 20:49:49 +0000 | [diff] [blame] | 22 | CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VARIADIC_MACROS) |
Chandler Carruth | 28d5f76 | 2010-03-09 19:24:49 +0000 | [diff] [blame] | 23 | CPP.Flags += -DGTEST_HAS_RTTI=0 |
Benjamin Kramer | 1add5f3 | 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 | 922e349 | 2009-01-01 01:29:44 +0000 | [diff] [blame] | 27 | |
Benjamin Kramer | 7cd082a | 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 | 90e17e7 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 33 | ifeq ($(HOST_OS),MingW) |
Julien Lerouge | cbc2491 | 2009-02-12 08:02:35 +0000 | [diff] [blame] | 34 | CPP.Flags += -DGTEST_OS_WINDOWS=1 |
| 35 | endif |
| 36 | |
Chris Lattner | 8bbd76b | 2009-05-08 17:32:47 +0000 | [diff] [blame] | 37 | NO_INSTALL = 1 |
| 38 | |
Alexey Samsonov | 9ddc304 | 2012-12-06 23:59:54 +0000 | [diff] [blame^] | 39 | Source = $(filter-out gtest-all.cc,$(wildcard *.cc)) |
| 40 | |
Misha Brukman | 922e349 | 2009-01-01 01:29:44 +0000 | [diff] [blame] | 41 | include $(LEVEL)/Makefile.common |