diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/unittest/Makefile | 2 | ||||
-rw-r--r-- | utils/unittest/UnitTestMain/Makefile | 19 | ||||
-rw-r--r-- | utils/unittest/UnitTestMain/TestMain.cpp | 15 |
3 files changed, 35 insertions, 1 deletions
diff --git a/utils/unittest/Makefile b/utils/unittest/Makefile index 2f3e601b41..6a09341832 100644 --- a/utils/unittest/Makefile +++ b/utils/unittest/Makefile @@ -8,6 +8,6 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. -PARALLEL_DIRS = googletest +PARALLEL_DIRS = googletest UnitTestMain include $(LEVEL)/Makefile.common diff --git a/utils/unittest/UnitTestMain/Makefile b/utils/unittest/UnitTestMain/Makefile new file mode 100644 index 0000000000..07a74e3c0d --- /dev/null +++ b/utils/unittest/UnitTestMain/Makefile @@ -0,0 +1,19 @@ +##===- utils/unittest/UnitTestMain/Makefile ----------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL = ../../.. + +include $(LEVEL)/Makefile.config + +LIBRARYNAME = UnitTestMain +BUILD_ARCHIVE = 1 +CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include +CPP.Flags += -Wno-variadic-macros + +include $(LEVEL)/Makefile.common diff --git a/utils/unittest/UnitTestMain/TestMain.cpp b/utils/unittest/UnitTestMain/TestMain.cpp new file mode 100644 index 0000000000..d97dca872a --- /dev/null +++ b/utils/unittest/UnitTestMain/TestMain.cpp @@ -0,0 +1,15 @@ +//===--- utils/unittest/UnitTestMain/TestMain.cpp - unittest driver -------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "gtest/gtest.h" + +int main(int argc, char **argv) { + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} |