[NFC][Py Reformat] Reformat python files in llvm
[llvm-project.git] / llvm / utils / gn / secondary / third-party / unittest / BUILD.gn
blobd4efb45ec4b55eab1507c068563839b5afdeecad
1 import("//llvm/utils/gn/build/libs/pthread/enable.gni")
3 # Used to push the gtest include directories to things depending on :googletest.
4 config("googletest_config") {
5   include_dirs = [
6     "googlemock/include",
7     "googletest/include",
8   ]
10   defines = []
11   if (host_os == "win") {
12     defines += [ "GTEST_OS_WINDOWS" ]
13   }
14   if (!llvm_enable_threads) {
15     defines += [ "GTEST_HAS_PTHREAD=0" ]
16   }
17   defines += [ "GTEST_HAS_RTTI=0" ]
20 static_library("gtest") {
21   deps = [ "//llvm/lib/Support" ]
22   include_dirs = [
23     "googletest",  # For including src/gtest.cc
24     "googlemock",  # For including src/gmock.cc
25   ]
26   public_configs = [ ":googletest_config" ]
27   configs -= [ "//llvm/utils/gn/build:warn_covered_switch_default" ]
28   configs -= [ "//llvm/utils/gn/build:no_rtti" ]
29   sources = [
30     "googlemock/src/gmock-all.cc",
31     "googletest/src/gtest-all.cc",
32   ]
33   testonly = true