$NetBSD$ * Part of patchset to build electron on NetBSD * Based on OpenBSD's chromium patches, and FreeBSD's electron patches --- third_party/electron_node/deps/googletest/BUILD.gn.orig 2025-04-18 18:41:29.000000000 +0000 +++ third_party/electron_node/deps/googletest/BUILD.gn @@ -1,14 +1,64 @@ -############################################################################## -# # -# DO NOT EDIT THIS FILE! # -# # -############################################################################## - -# This file is used by GN for building, which is NOT the build system used for -# building official binaries. -# Please modify the gyp files if you are making changes to build system. +config("gtest_config") { + include_dirs = [ "include" ] + defines = [ "UNIT_TEST" ] +} + +static_library("gtest") { + include_dirs = [ + "include", + "." # src + ] + + public_configs = [ ":gtest_config" ] -import("unofficial.gni") + cflags_cc = [ + "-Wno-c++98-compat-extra-semi", + "-Wno-unused-const-variable", + "-Wno-unreachable-code-return", + ] + + defines = [ + "GTEST_HAS_POSIX_RE=0", + "GTEST_LANG_CXX11=1", + ] + + sources = [ + "include/gtest/gtest_pred_impl.h", + "include/gtest/gtest_prod.h", + "include/gtest/gtest-death-test.h", + "include/gtest/gtest-matchers.h", + "include/gtest/gtest-message.h", + "include/gtest/gtest-param-test.h", + "include/gtest/gtest-printers.h", + "include/gtest/gtest-spi.h", + "include/gtest/gtest-test-part.h", + "include/gtest/gtest-typed-test.h", + "include/gtest/gtest.h", + "include/gtest/internal/gtest-death-test-internal.h", + "include/gtest/internal/gtest-filepath.h", + "include/gtest/internal/gtest-internal.h", + "include/gtest/internal/gtest-param-util.h", + "include/gtest/internal/gtest-port-arch.h", + "include/gtest/internal/gtest-port.h", + "include/gtest/internal/gtest-string.h", + "include/gtest/internal/gtest-type-util.h", + "include/gtest/internal/custom/gtest-port.h", + "include/gtest/internal/custom/gtest-printers.h", + "include/gtest/internal/custom/gtest.h", + "src/gtest-all.cc", + "src/gtest-death-test.cc", + "src/gtest-filepath.cc", + "src/gtest-internal-inl.h", + "src/gtest-matchers.cc", + "src/gtest-port.cc", + "src/gtest-printers.cc", + "src/gtest-test-part.cc", + "src/gtest-typed-test.cc", + "src/gtest.cc", + ] +} -googletest_gn_build("googletest") { +static_library("gtest_main") { + deps = [ ":gtest" ] + sources = [ "src/gtest_main.cc" ] }