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") {
11 if (host_os == "win") {
12 defines += [ "GTEST_OS_WINDOWS" ]
14 if (!llvm_enable_threads) {
15 defines += [ "GTEST_HAS_PTHREAD=0" ]
17 defines += [ "GTEST_HAS_RTTI=0" ]
20 static_library("gtest") {
21 deps = [ "//llvm/lib/Support" ]
23 "googletest", # For including src/gtest.cc
24 "googlemock", # For including src/gmock.cc
26 public_configs = [ ":googletest_config" ]
27 configs -= [ "//llvm/utils/gn/build:warn_covered_switch_default" ]
28 configs -= [ "//llvm/utils/gn/build:no_rtti" ]
30 "googlemock/src/gmock-all.cc",
31 "googletest/src/gtest-all.cc",