diff --git a/BUILD.bazel b/BUILD.bazel index 965c518d..3c9a228f 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -38,6 +38,11 @@ licenses(["notice"]) exports_files(["LICENSE"]) +config_setting( + name = "qnx", + constraint_values = ["@platforms//os:qnx"], +) + config_setting( name = "windows", constraint_values = ["@platforms//os:windows"], @@ -86,6 +91,7 @@ cc_library( "googlemock/include/gmock/*.h", ]), copts = select({ + ":qnx": [], ":windows": [], "//conditions:default": ["-pthread"], }), @@ -104,6 +110,7 @@ cc_library( "googletest/include", ], linkopts = select({ + ":qnx": [], ":windows": [], "//conditions:default": ["-pthread"], }), diff --git a/googlemock/test/BUILD.bazel b/googlemock/test/BUILD.bazel index efb7306b..6193ed4d 100644 --- a/googlemock/test/BUILD.bazel +++ b/googlemock/test/BUILD.bazel @@ -41,6 +41,7 @@ cc_test( size = "small", srcs = glob(include = ["gmock-*.cc"]), linkopts = select({ + "//:qnx": [], "//:windows": [], "//conditions:default": ["-pthread"], }), diff --git a/googletest/test/BUILD.bazel b/googletest/test/BUILD.bazel index b06a00a1..7b78555e 100644 --- a/googletest/test/BUILD.bazel +++ b/googletest/test/BUILD.bazel @@ -95,6 +95,7 @@ cc_test( "googletest/test", ], linkopts = select({ + "//:qnx": [], "//:windows": [], "//conditions:default": ["-pthread"], }),