Skip to content

Commit b7031d5

Browse files
committed
deps: extract gtest source files to deps/googletest
nodejs/node#39386
1 parent 7bf0c48 commit b7031d5

File tree

1 file changed

+69
-2
lines changed

1 file changed

+69
-2
lines changed

patches/node/build_add_gn_build_files.patch

+69-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ This adds GN build files for Node, so we don't have to build with GYP.
77

88
diff --git a/BUILD.gn b/BUILD.gn
99
new file mode 100644
10-
index 0000000000000000000000000000000000000000..bd26c3623d3314539609a978270d3ced1d167777
10+
index 0000000000000000000000000000000000000000..52fb22305bb67c75c9a1cf4bc39cd901420cf7a9
1111
--- /dev/null
1212
+++ b/BUILD.gn
13-
@@ -0,0 +1,400 @@
13+
@@ -0,0 +1,401 @@
1414
+import("//electron/build/asar.gni")
1515
+import("//v8/gni/v8.gni")
1616
+
@@ -205,6 +205,7 @@ index 0000000000000000000000000000000000000000..bd26c3623d3314539609a978270d3ced
205205
+ ":node_js2c",
206206
+ "deps/cares",
207207
+ "deps/histogram",
208+
+ "deps/googletest:gtest",
208209
+ "deps/llhttp",
209210
+ "deps/nghttp2",
210211
+ "deps/uvwasi",
@@ -550,6 +551,72 @@ index 0000000000000000000000000000000000000000..367d537c91be1f62e161a41e737a60cb
550551
+ sources += [ "config/darwin/ares_config.h" ]
551552
+ }
552553
+}
554+
diff --git a/deps/googletest/BUILD.gn b/deps/googletest/BUILD.gn
555+
new file mode 100644
556+
index 0000000000000000000000000000000000000000..bdc102f9c400cc8bb1788d1ca5a2953b234f83b7
557+
--- /dev/null
558+
+++ b/deps/googletest/BUILD.gn
559+
@@ -0,0 +1,60 @@
560+
+config("gtest_config") {
561+
+ include_dirs = [ "include" ]
562+
+ defines = [ "UNIT_TEST" ]
563+
+}
564+
+
565+
+static_library("gtest") {
566+
+ include_dirs = [
567+
+ "include",
568+
+ "." # src
569+
+ ]
570+
+
571+
+ public_configs = [ ":gtest_config" ]
572+
+
573+
+ cflags_cc = [ "-Wno-c++98-compat-extra-semi" ]
574+
+
575+
+ defines = [
576+
+ "GTEST_HAS_POSIX_RE=0",
577+
+ "GTEST_LANG_CXX11=1",
578+
+ ]
579+
+
580+
+ sources = [
581+
+ "include/gtest/gtest_pred_impl.h",
582+
+ "include/gtest/gtest_prod.h",
583+
+ "include/gtest/gtest-death-test.h",
584+
+ "include/gtest/gtest-matchers.h",
585+
+ "include/gtest/gtest-message.h",
586+
+ "include/gtest/gtest-param-test.h",
587+
+ "include/gtest/gtest-printers.h",
588+
+ "include/gtest/gtest-spi.h",
589+
+ "include/gtest/gtest-test-part.h",
590+
+ "include/gtest/gtest-typed-test.h",
591+
+ "include/gtest/gtest.h",
592+
+ "include/gtest/internal/gtest-death-test-internal.h",
593+
+ "include/gtest/internal/gtest-filepath.h",
594+
+ "include/gtest/internal/gtest-internal.h",
595+
+ "include/gtest/internal/gtest-param-util.h",
596+
+ "include/gtest/internal/gtest-port-arch.h",
597+
+ "include/gtest/internal/gtest-port.h",
598+
+ "include/gtest/internal/gtest-string.h",
599+
+ "include/gtest/internal/gtest-type-util.h",
600+
+ "include/gtest/internal/custom/gtest-port.h",
601+
+ "include/gtest/internal/custom/gtest-printers.h",
602+
+ "include/gtest/internal/custom/gtest.h",
603+
+ "src/gtest-all.cc",
604+
+ "src/gtest-death-test.cc",
605+
+ "src/gtest-filepath.cc",
606+
+ "src/gtest-internal-inl.h",
607+
+ "src/gtest-matchers.cc",
608+
+ "src/gtest-port.cc",
609+
+ "src/gtest-printers.cc",
610+
+ "src/gtest-test-part.cc",
611+
+ "src/gtest-typed-test.cc",
612+
+ "src/gtest.cc",
613+
+ ]
614+
+}
615+
+
616+
+static_library("gtest_main") {
617+
+ deps = [ ":gtest" ]
618+
+ sources = [ "src/gtest_main.cc" ]
619+
+}
553620
diff --git a/deps/histogram/BUILD.gn b/deps/histogram/BUILD.gn
554621
new file mode 100644
555622
index 0000000000000000000000000000000000000000..e741a2a9c238a782a674ddcb9a1f98de5b36db79

0 commit comments

Comments
 (0)