Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
cbd15d41
Commit
cbd15d41
authored
Jan 07, 2018
by
Loo Rong Jie
Browse files
[Bazel] Detect Windows with cpu value x64_windows and x64_windows_msvc
and x64_windows_msvc
parent
c3bb0ee2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
BUILD.bazel
BUILD.bazel
+10
-3
googlemock/test/BUILD.bazel
googlemock/test/BUILD.bazel
+2
-1
googletest/test/BUILD.bazel
googletest/test/BUILD.bazel
+6
-3
No files found.
BUILD.bazel
View file @
cbd15d41
...
...
@@ -37,7 +37,12 @@ package(default_visibility = ["//visibility:public"])
licenses
([
"notice"
])
config_setting
(
name
=
"win"
,
name
=
"windows"
,
values
=
{
"cpu"
:
"x64_windows"
},
)
config_setting
(
name
=
"windows_msvc"
,
values
=
{
"cpu"
:
"x64_windows_msvc"
},
)
...
...
@@ -65,7 +70,8 @@ cc_library(
]),
copts
=
select
(
{
":win"
:
[],
":windows"
:
[],
":windows_msvc"
:
[],
"//conditions:default"
:
[
"-pthread"
],
},
),
...
...
@@ -76,7 +82,8 @@ cc_library(
"googletest/include"
,
],
linkopts
=
select
({
":win"
:
[],
":windows"
:
[],
":windows_msvc"
:
[],
"//conditions:default"
:
[
"-pthread"
,
],
...
...
googlemock/test/BUILD.bazel
View file @
cbd15d41
...
...
@@ -45,7 +45,8 @@ cc_test(
],
),
linkopts
=
select
({
"//:win"
:
[],
"//:windows"
:
[],
"//:windows_msvc"
:
[],
"//conditions:default"
:
[
"-pthread"
,
],
...
...
googletest/test/BUILD.bazel
View file @
cbd15d41
...
...
@@ -57,13 +57,15 @@ cc_test(
"gtest-param-test_test.cc"
,
],
)
+
select
({
"//:win"
:
[],
"//:windows"
:
[],
"//:windows_msvc"
:
[],
"//conditions:default"
:
[
"gtest-tuple_test.cc"
,
],
}),
copts
=
select
({
"//:win"
:
[
"-DGTEST_USE_OWN_TR1_TUPLE=0"
],
"//:windows"
:
[
"-DGTEST_USE_OWN_TR1_TUPLE=0"
],
"//:windows_msvc"
:
[
"-DGTEST_USE_OWN_TR1_TUPLE=0"
],
"//conditions:default"
:
[
"-DGTEST_USE_OWN_TR1_TUPLE=1"
],
}),
includes
=
[
...
...
@@ -73,7 +75,8 @@ cc_test(
"googletest/test"
,
],
linkopts
=
select
({
"//:win"
:
[],
"//:windows"
:
[],
"//:windows_msvc"
:
[],
"//conditions:default"
:
[
"-pthread"
,
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment