brintos

brintos / llvm-project-archived public Read only

0
0
Text · 890 B · d4efb45 Raw
35 lines · plain
1import("//llvm/utils/gn/build/libs/pthread/enable.gni")2 3# Used to push the gtest include directories to things depending on :googletest.4config("googletest_config") {5  include_dirs = [6    "googlemock/include",7    "googletest/include",8  ]9 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" ]18}19 20static_library("gtest") {21  deps = [ "//llvm/lib/Support" ]22  include_dirs = [23    "googletest",  # For including src/gtest.cc24    "googlemock",  # For including src/gmock.cc25  ]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 = true34}35