mirror of
https://github.com/google/googletest.git
synced 2024-12-27 10:11:03 +08:00
Don't link pthread on QNX
On QNX, pthread is part of libc [1]. There's no separate pthread library to link. [1] https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.lib_ref/topic/p/pthread_create.html
This commit is contained in:
parent
355d57d90d
commit
4281d2149c
@ -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"],
|
||||
}),
|
||||
|
@ -41,6 +41,7 @@ cc_test(
|
||||
size = "small",
|
||||
srcs = glob(include = ["gmock-*.cc"]),
|
||||
linkopts = select({
|
||||
"//:qnx": [],
|
||||
"//:windows": [],
|
||||
"//conditions:default": ["-pthread"],
|
||||
}),
|
||||
|
@ -95,6 +95,7 @@ cc_test(
|
||||
"googletest/test",
|
||||
],
|
||||
linkopts = select({
|
||||
"//:qnx": [],
|
||||
"//:windows": [],
|
||||
"//conditions:default": ["-pthread"],
|
||||
}),
|
||||
|
Loading…
x
Reference in New Issue
Block a user